Skip to main content

What is Sinker?

Sinker is a two-layer transaction reliability stack for Solana. It combines:
  • A Rust sidecar that tracks every stage of the transaction lifecycle — from bundle submission to on-chain finalization — using a live Yellowstone gRPC stream.
  • An AI agent that makes tip selection, submission timing, and retry decisions grounded in real-time oracle data and historical bundle outcomes.
The TypeScript SDK gives you a clean async interface over the sidecar without dealing with raw HTTP or SSE.

Start the stack


Prerequisites

Rust sidecar running

The sidecar must be running at localhost:7777 before the SDK can connect. See the README for setup.

Model API key

Sinker’s AI agent requires a provider key. Set ANTHROPIC_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, or XAI_API_KEY in your environment.

Pre-signed transaction

The SDK never touches your keypair. Sign the transaction yourself and pass the base64-encoded wire bytes to sinker.enqueue().

Install


Submit your first transaction

The AI agent fires automatically on the tx_enqueued SSE event. You don’t need to call submit() manually — the agent selects a tip and submits the bundle.

What happens under the hood

1

Enqueue

sinker.enqueue() POSTs your transaction bytes to /tx/enqueue. The sidecar assigns a tx_id, fires a tx_enqueued SSE event, and returns immediately.
2

Agent decides

The AI agent receives the SSE event, checks the live tip oracle, reviews failure history, and selects a tip percentile. It calls POST /internal/submit with tx_ids and tip_lamports.
3

Jito bundle

The sidecar builds a Jito bundle (your tx + tip tx), submits it to the block engine, and starts a background status tracker.
4

SSE confirmation

The Yellowstone gRPC stream fires as each commitment stage is reached. The sidecar broadcasts tx_status_changed SSE events. handle.waitFor() resolves when your target state arrives.