Overview
sinker.enqueue() returns a Transaction handle — a lightweight object tied to a specific tx_id. Use it to wait for confirmation, inspect status, or retrieve lifecycle history without managing raw HTTP calls.
Properties
The
tx_id assigned by the sidecar on enqueue. Use this to reference the
transaction in other API calls.The slot at which the transaction was enqueued. Blockhashes are valid for 150 slots
from their reference slot — monitor
age_slots in the pending queue to detect
near-expiry transactions.Methods
handle.waitFor()
Wait until this transaction reaches the specified commitment state. Subscribes to the per-transaction filtered SSE stream atGET /tx/events/:tx_id.
Resolves as soon as the target state (or any terminal state) is observed.
The commitment level to wait for:
'confirmed'— supermajority vote. Fast (~6–8s). Safe for most use cases.'finalized'— irreversible. Slower (~9–14s). Required for settlement finality.
Maximum wait time in milliseconds before the Promise rejects with a timeout error.
Promise<WaitResult>
The actual state that triggered resolution (may be
'finalized' even if you waited for 'confirmed').The bundle ID that landed this transaction.
On-chain signatures. Use these to look up the transaction on Solscan or the Jito explorer.
Errorif the transaction reaches'failed'before the target stateErroron timeout
handle.status()
Fetch the current status of this transaction from the sidecar. Uses a 3-tier lookup: memory cache → lifecycle log → 404.Promise<TxStatus>
handle.lifecycle()
Fetch all lifecycle entries (bundle attempts) for thistx_id.
A transaction that was retried after a failure will appear in multiple entries — one per bundle attempt. Inspect the failure and ai_decision_trace fields to understand what happened.
Promise<LifecycleEntry[]>
handle.rawBytes()
Retrieve the retained base64 transaction bytes for manual retry or inspection. Bytes are captured by the sidecar at submit time and stored in memory for the lifetime of the process. They’re independent of the original signing infrastructure — no keypair needed.Promise<string>
rawBytes() returns 404 (as a SinkerError) if the transaction has never been submitted — i.e., it’s still in the pending queue. Wait for at least one submit attempt before calling this.