sl.index
Decoded rows: transfers, events, contract calls, blocks, transactions, sBTC, PoX and Runes. The same data the Index API serves over HTTP.
| ftTransfers(params) | FtTransfersEnvelope<FtTransferField… | Callable: index.ftTransfers(params) ≡ index.ftTransfers.list(params). |
| ftTransfers.list(params) | FtTransfersEnvelope<FtTransferField… | Read one page of fungible-token transfers, plus the cursor for the next. |
| ftTransfers.walk(params) | AsyncIterable<FtTransferFields<F>> | Iterate every fungible-token transfer, paging for you. |
| nftTransfers(params) | NftTransfersEnvelope<NftTransferFie… | Callable: index.nftTransfers(params) ≡ index.nftTransfers.list(params). |
| nftTransfers.list(params) | NftTransfersEnvelope<NftTransferFie… | Read one page of NFT transfers, plus the cursor for the next. |
| nftTransfers.walk(params) | AsyncIterable<NftTransferFields<F>> | Iterate every NFT transfer, paging for you. |
| events(params) | EventsEnvelope<T, IndexEventFields<… | Generic decoded events by event_type (the full /v1/index/events surface). |
| events.list(params) | EventsEnvelope<T, IndexEventFields<… | Read one page of decoded events of one type. |
| events.walk(params) | AsyncIterable<IndexEventFields<T, F… | Iterate every decoded event of one type, paging for you. |
| events.consume(params) | { cursor: string | null; pages: num… | Run a checkpointed, reorg-aware indexer over decoded events. |
| contractCalls.list(params) | ContractCallsEnvelope | Read one page of decoded contract calls. |
| contractCalls.walk(params) | AsyncIterable<IndexContractCall> | Iterate every decoded contract call, paging for you. |
| contractCalls.consume(params) | { cursor: string | null; pages: num… | Run a checkpointed, reorg-aware indexer over contract calls. |
| canonical.list(params) | CanonicalEnvelope | Read one page of the canonical block-hash map. |
| canonical.walk(params) | AsyncIterable<IndexCanonicalBlock> | Iterate every canonical block hash, paging for you. |
| stateWrites.list(params) | StateWritesEnvelope | Read one page of the contract-state writes each block committed. |
| stateWrites.walk(params) | AsyncIterable<IndexStateWrite> | Iterate every state write, paging for you. |
| blocks.list(params) | BlocksEnvelope | Read one page of canonical blocks. |
| blocks.walk(params) | AsyncIterable<IndexBlock> | Iterate every canonical block, paging for you. |
| blocks.get(ref) | BlockEnvelope | null | Get one block by height or hash, or null. |
| transactions.list(params) | TransactionsEnvelope<TransactionFie… | Read one page of full transaction documents. |
| transactions.walk(params) | AsyncIterable<IndexTransaction> | Iterate every transaction document, paging for you. |
| transactions.get(txId) | TransactionEnvelope | null | Get one transaction by id, or null. |
| transactions.getProof(txId) | TransactionProof | null | Get a transaction's inclusion proof, or null. |
| stacking.list(params) | StackingEnvelope | Read one page of decoded PoX-4 stacking actions. |
| stacking.walk(params) | AsyncIterable<IndexStackingAction> | Iterate every PoX-4 stacking action, paging for you. |
| mempool.list(params) | MempoolEnvelope | Read one page of pending, unconfirmed transactions. |
| mempool.walk(params) | AsyncIterable<IndexMempoolTransacti… | Iterate every pending transaction, paging for you. |
| mempool.get(txId) | MempoolTransactionEnvelope | null | Get one pending transaction, or null. |
| sbtc.deposits.list(params) | SbtcDepositsEnvelope<SbtcDepositFie… | Read one page of completed sBTC deposits. |
| sbtc.deposits.walk(params) | AsyncIterable<IndexSbtcDeposit> | Iterate every completed sBTC deposit, paging for you. |
| sbtc.deposits.consume(params) | { cursor: string | null; pages: num… | Run a checkpointed, reorg-aware indexer over completed deposits. |
| sbtc.deposits.get(bitcoinTxid) | SbtcDepositEnvelope | null | Fetch a completed deposit by Bitcoin txid; 404 → null. |
| sbtc.withdrawals.list(params) | SbtcWithdrawalsEnvelope<SbtcWithdra… | Read one page of sBTC withdrawals, each with its current status. |
| sbtc.withdrawals.walk(params) | AsyncIterable<IndexSbtcWithdrawal> | Iterate every sBTC withdrawal, paging for you. |
| sbtc.withdrawals.get(requestId) | SbtcWithdrawalEnvelope | null | Fetch a withdrawal's full lifecycle by request id; 404 → null. |
| sbtc.events.list(params) | SbtcEventsEnvelope | Read one page of the raw sBTC peg event log. |
| sbtc.events.walk(params) | AsyncIterable<IndexSbtcEvent> | Iterate every sBTC peg event, paging for you. |
| sbtc.events.consume(params) | { cursor: string | null; pages: num… | Run a checkpointed, reorg-aware indexer over the raw peg event log. |
| sbtc.summary() | SbtcSummaryEnvelope | Get the all-time sBTC peg scoreboard. |
| pox.cycles.list(params) | PoxCyclesEnvelope | Read one page of PoX reward cycles, newest first. |
| pox.cycles.walk(params) | AsyncIterable<IndexPoxCycle> | Iterate every reward cycle, paging for you. |
| pox.cycles.get(rewardCycle) | PoxCycleEnvelope | null | Get one reward cycle by number, or null. |
| pox5.events.list(params) | Pox5EventsEnvelope<Pox5EventFields<… | Read one page of decoded PoX-5 staking events. |
| pox5.events.walk(params) | AsyncIterable<IndexPox5Event> | Iterate every PoX-5 event, paging for you. |
| pox5.events.consume(params) | { cursor: string | null; pages: num… | Run a checkpointed, reorg-aware indexer over PoX-5 events. |
| runes.activity.list(params) | RuneActivityEnvelope<IndexRuneEvent> | Read one page of Rune etch, mint, transfer, and burn events. |
| runes.activity.walk(params) | AsyncIterable<IndexRuneEvent> | Iterate every Rune event, paging for you. |
| runes.list(params) | RunesEnvelope<IndexRuneEntry> | The rune catalog. |
| runes.get(rune) | RuneEnvelope | null | Get one rune by id or name, or null. |
| runes.balances(params) | RuneBalancesEnvelope<IndexRuneBalan… | Current per-outpoint rune balances by address or outpoint. |
| bitcoin.outspend(txid, vout) | BitcoinOutputUnspent | BitcoinOutpu… | Whether a Bitcoin output is spent, and by which transaction. |
| discover() | IndexDiscovery | Get the live vocabulary of what Index can query. |
| printSchema(contractId) | PrintSchemaResponse | null | Get the print payload schema a contract actually emits. |
sl.index.ftTransfers(params)
Callable: index.ftTransfers(params) ≡ index.ftTransfers.list(params).
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. Omitting block_time also lets the server skip the blocks join. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
contractIdstring | |
assetIdentifierstring | |
senderstring | |
recipientstring | |
fromHeightnumber | |
toHeightnumber | |
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
Returns Promise<FtTransfersEnvelope<FtTransferFields<F>>>
events- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
sl.index.ftTransfers.list(params)
Read one page of fungible-token transfers, plus the cursor for the next.
Filter by contractId, assetIdentifier, sender, recipient, and a height range. Filters are equality only: there is no amount filter. order: "desc" reads newest first. Pass next_cursor back as cursor to continue. fields returns only those columns and narrows the row type; cursor, block_height, and event_type always come back. reorgs on the envelope lists forks that overlap the page.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. Omitting block_time also lets the server skip the blocks join. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
contractIdstring | |
assetIdentifierstring | |
senderstring | |
recipientstring | |
fromHeightnumber | |
toHeightnumber | |
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
Returns Promise<FtTransfersEnvelope<FtTransferFields<F>>>
events- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
sl.index.ftTransfers.walk(params)
Iterate every fungible-token transfer, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip, or with order: "desc" when it reaches fromHeight (genesis by default). batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. Omitting block_time also lets the server skip the blocks join. |
Options
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
contractIdstring | |
senderstring | |
recipientstring | |
assetIdentifierstring | |
fromCursorstring | null |
6 more options
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
sl.index.nftTransfers(params)
Callable: index.nftTransfers(params) ≡ index.nftTransfers.list(params).
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return (see FtTransfersListParams.fields). |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
contractIdstring | |
assetIdentifierstring | |
senderstring | |
recipientstring | |
fromHeightnumber | |
toHeightnumber | |
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
Returns Promise<NftTransfersEnvelope<NftTransferFields<F>>>
events- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
sl.index.nftTransfers.list(params)
Read one page of NFT transfers, plus the cursor for the next.
Filter by contractId, assetIdentifier, sender, recipient, and a height range. order: "desc" reads newest first. Pass next_cursor back as cursor to continue. fields returns only those columns and narrows the row type; cursor, block_height, and event_type always come back.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return (see FtTransfersListParams.fields). |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
contractIdstring | |
assetIdentifierstring | |
senderstring | |
recipientstring | |
fromHeightnumber | |
toHeightnumber | |
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
Returns Promise<NftTransfersEnvelope<NftTransferFields<F>>>
events- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
sl.index.nftTransfers.walk(params)
Iterate every NFT transfer, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip, or with order: "desc" when it reaches fromHeight (genesis by default). batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return (see FtTransfersListParams.fields). |
Options
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
contractIdstring | |
senderstring | |
recipientstring | |
assetIdentifierstring | |
fromCursorstring | null |
6 more options
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
sl.index.events(params)
Generic decoded events by event_type (the full /v1/index/events surface). Callable: index.events(params) ≡ index.events.list(params).
Parameters
hover a row to find it in the codeRequired
eventTyperequiredT | Decoded types or VM types (nested_contract_call, map_set, …). |
fieldsrequiredreadonly F[] | Return only these columns. The server projects the SELECT, so an unrequested field is physically absent — and the returned row type narrows to match, making a read of one a compile error rather than undefined. cursor, block_height, and event_type come back regardless: the first two are the consume contract, the third carries the discriminant. Don't list them. Cost note: this does NOT change your bill — Index meters per row read, not per field. What it buys is wire bytes, plus skipping the blocks join when block_time is omitted. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
contractIdstring | readonly string[] | One id, or several to scope the sweep to a set of contracts (max 20). Mutually exclusive with trait. |
assetIdentifierstring | |
senderstring | |
recipientstring | |
functionNamestring |
9 more options
callerstring | |
mapstring | |
varNamestring | |
txIdstring | Restrict to one transaction. |
fromHeightnumber | |
toHeightnumber | |
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
traitstring | Restrict to contracts conforming to a trait/standard (e.g. "sip-010"). Mutually exclusive with contractId; contract-keyed event types only. |
txContextboolean | Join the submitting transaction into each event — populates tx_sender, tx_type, tx_status, tx_contract_id, tx_function_name. Off by default. Avoids a /v1/index/transactions call per event; for print events it's the only source of the submitting sender. |
Returns Promise<EventsEnvelope<T, IndexEventFields<T, F>>>
events- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
sl.index.events.list(params)
Read one page of decoded events of one type.
eventType is required: a decoded type (ft_transfer, print, ...) or a VM type (nested_contract_call, map_set, ...), and a literal narrows the row type. Scope with contractId (one id or up to 20) or trait, never both, plus assetIdentifier, sender, recipient, functionName, caller, map, varName, txId, and a height range. order: "desc" reads newest first. txContext: true joins the submitting transaction onto each event. fields returns only those columns and narrows the row type; it saves wire bytes but does not change what you are billed, since rows are metered, not columns.
Parameters
hover a row to find it in the codeRequired
eventTyperequiredT | Decoded types or VM types (nested_contract_call, map_set, …). |
fieldsrequiredreadonly F[] | Return only these columns. The server projects the SELECT, so an unrequested field is physically absent — and the returned row type narrows to match, making a read of one a compile error rather than undefined. cursor, block_height, and event_type come back regardless: the first two are the consume contract, the third carries the discriminant. Don't list them. Cost note: this does NOT change your bill — Index meters per row read, not per field. What it buys is wire bytes, plus skipping the blocks join when block_time is omitted. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
contractIdstring | readonly string[] | One id, or several to scope the sweep to a set of contracts (max 20). Mutually exclusive with trait. |
assetIdentifierstring | |
senderstring | |
recipientstring | |
functionNamestring |
9 more options
callerstring | |
mapstring | |
varNamestring | |
txIdstring | Restrict to one transaction. |
fromHeightnumber | |
toHeightnumber | |
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
traitstring | Restrict to contracts conforming to a trait/standard (e.g. "sip-010"). Mutually exclusive with contractId; contract-keyed event types only. |
txContextboolean | Join the submitting transaction into each event — populates tx_sender, tx_type, tx_status, tx_contract_id, tx_function_name. Off by default. Avoids a /v1/index/transactions call per event; for print events it's the only source of the submitting sender. |
Returns Promise<EventsEnvelope<T, IndexEventFields<T, F>>>
events- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
sl.index.events.walk(params)
Iterate every decoded event of one type, paging for you.
Takes the same filters as list, including eventType. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip, or with order: "desc" when it reaches fromHeight (genesis by default). batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Return only these columns. The server projects the SELECT, so an unrequested field is physically absent — and the returned row type narrows to match, making a read of one a compile error rather than undefined. cursor, block_height, and event_type come back regardless: the first two are the consume contract, the third carries the discriminant. Don't list them. Cost note: this does NOT change your bill — Index meters per row read, not per field. What it buys is wire bytes, plus skipping the blocks join when block_time is omitted. |
eventTyperequiredT | Decoded types or VM types (nested_contract_call, map_set, …). |
Options
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
contractIdstring | readonly string[] | One id, or several to scope the sweep to a set of contracts (max 20). Mutually exclusive with trait. |
senderstring | |
recipientstring | |
assetIdentifierstring | |
fromCursorstring | null |
13 more options
functionNamestring | |
traitstring | Restrict to contracts conforming to a trait/standard (e.g. "sip-010"). Mutually exclusive with contractId; contract-keyed event types only. |
txContextboolean | Join the submitting transaction into each event — populates tx_sender, tx_type, tx_status, tx_contract_id, tx_function_name. Off by default. Avoids a /v1/index/transactions call per event; for print events it's the only source of the submitting sender. |
callerstring | |
orderIndexOrder | "desc" reads newest first. See IndexOrder. |
mapstring | |
varNamestring | |
txIdstring | Restrict to one transaction. |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Run a checkpointed, reorg-aware indexer over decoded events.
Write your rows in onBatch and commit ctx.cursor in the same transaction; resume with fromCursor. Without fromCursor or fromHeight the API serves only its recent default window, so pass fromHeight: 0 for a full backfill. A reorg at or below your checkpoint calls onReorg, then the loop re-reads from the fork point. Delivery is at-least-once, so keep writes idempotent. With a sink, the checkpoint and rollback are handled for you. finalizedOnly holds delivery to finalized rows, so no reorg handling is needed. mode: "tail" (default) keeps polling at the tip; mode: "bounded" returns on the first empty page. Resolves to { cursor, pages, emptyPolls }.
Parameters
hover a row to find it in the codeRequired
eventTyperequiredT | |
onBatchrequired(items: TItem[], envelope: TEnvelope, ctx: ConsumerBatc… |
Options
fromHeightnumber | Start a fresh sweep at this height (e.g. 0 for genesis backfill). Ignored once a cursor exists (including a sink's committed cursor). |
toHeightnumber | |
contractIdstring | readonly string[] | |
senderstring | |
recipientstring | |
assetIdentifierstring | |
functionNamestring | |
traitstring |
21 more options
txContextboolean | |
callerstring | |
mapstring | |
varNamestring | |
txIdstring | |
fromCursorstring | null | Resume from a committed checkpoint. Without it (and without fromHeight) the API serves only the recent default window. |
mode"tail" | "bounded" | tail (default) keeps polling at the tip; bounded returns on the first empty page. |
finalizedOnlyboolean | Emit only rows at or below the tip's finalized_height; the unfinalized tail is re-read each poll until it settles. Finalized data never reorgs, so onReorg is skipped entirely. |
batchSizenumber | |
sinkConsumerSink<TTx> | |
onProgress(ctx: ConsumerBatchContext) => void | Fires once per page, before onBatch and before any early return — an empty page still proves the loop is alive. Feed it to consumerHealth().record. |
onReorg(reorg: IndexReorg, ctx: { cursor: string | null }) => … | Called once per new reorg at or below the checkpoint, before the loop rewinds to ctx.cursor (null = pre-genesis) and re-reads. A reorg whose fork sits ABOVE the checkpoint is not a rollback: nothing past it was written, so it is noted and the page is read as normal. |
maxRollbackDepthnumber | Deepest rewind one reorg may make below the checkpoint before the loop refuses with ValidationError. Default 1000 blocks. The fork point is server supplied and drives a delete on every declared table, so raise this only for a source you trust. |
sleepSleep | |
emptyBackoffMsnumber | |
maxPagesnumber | |
maxEmptyPollsnumber | |
signalAbortSignal | |
retryCountnumber | Page-fetch retries after the first failure (429/5xx/network only — 4xx and handler throws always propagate). Default 3; 0 disables. |
retryDelaynumber | Base retry delay in ms; the n-th retry waits retryDelay * n. A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep. Cannot change the retry decision — the policy owns it. |
Callback context ctx: ConsumerBatchContext
cursor- Checkpoint to commit alongside your rows.
height- Highest canonical block a row was DELIVERED from.
nullbefore the first row of a fresh consume. With a sparse filter this parks at the last matching event — it measures event recency, not progress. scannedHeight- Highest canonical block the sweep has VERIFIED through: an empty page is the server confirming nothing matches between the cursor and the tip, so a caught-up tail scans to the tip even when
heightis far below it. Rolls back with reorg rewinds. tipHeight- Chain tip as of this page's read.
blocksBehindtipHeight - scannedHeight, floored at 0 — the consumer's actual backlog.nulluntil a position is known. A caught-up consumer on a quiet contract reads ~0 here whiletipHeight - heightgrows — that difference is event age, not lag.tip- The full tip for this page —
StreamsTiporIndexTipdepending on the surface. Exposed here so a handler never needs theenvelopeparameter, which is the only way to reach it today and is also how the worstfinalizedOnlymistake becomes reachable (return envelope.next_cursorjumps the cursor past events that were filtered out and never delivered). reorgs- Reorgs reported alongside this page; empty when none. Rollback still belongs in
onReorg— this is for observability inside a batch.
Read one page of decoded contract calls.
Filter by contractId (one id or up to 20) or trait, never both, plus functionName, sender, and a height range. Each row has the function name, arguments, result, and status. Pass next_cursor back as cursor to continue.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
contractIdstring | readonly string[] | One id, or several to scope the sweep to a set of contracts (max 20). Mutually exclusive with trait. |
functionNamestring | |
senderstring | |
fromHeightnumber | |
toHeightnumber | |
traitstring | Restrict to contracts conforming to a trait/standard (e.g. "sip-010"). Mutually exclusive with contractId. |
Returns Promise<ContractCallsEnvelope>
contract_calls- IndexContractCall[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
Iterate every decoded contract call, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
contractIdstring | readonly string[] | One id, or several to scope the sweep to a set of contracts (max 20). Mutually exclusive with trait. |
senderstring | |
fromCursorstring | null | |
functionNamestring | |
traitstring | Restrict to contracts conforming to a trait/standard (e.g. "sip-010"). Mutually exclusive with contractId. |
5 more options
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Run a checkpointed, reorg-aware indexer over contract calls.
Write your rows in onBatch and commit ctx.cursor in the same transaction; resume with fromCursor. Without fromCursor or fromHeight the API serves only its recent default window, so pass fromHeight: 0 for a full backfill. A reorg at or below your checkpoint calls onReorg, then the loop re-reads from the fork point. Delivery is at-least-once, so keep writes idempotent. With a sink, the checkpoint and rollback are handled for you. finalizedOnly holds delivery to finalized rows, so no reorg handling is needed. mode: "tail" (default) keeps polling at the tip; mode: "bounded" returns on the first empty page. Resolves to { cursor, pages, emptyPolls }. Calls already carry sender and function_name, so there is no txContext.
Parameters
hover a row to find it in the codeRequired
onBatchrequired(items: TItem[], envelope: TEnvelope, ctx: ConsumerBatc… |
Options
fromHeightnumber | Start a fresh sweep at this height (e.g. 0 for genesis backfill). Ignored once a cursor exists (including a sink's committed cursor). |
toHeightnumber | |
contractIdstring | readonly string[] | |
senderstring | |
functionNamestring | |
traitstring | |
fromCursorstring | null | Resume from a committed checkpoint. Without it (and without fromHeight) the API serves only the recent default window. |
mode"tail" | "bounded" | tail (default) keeps polling at the tip; bounded returns on the first empty page. |
14 more options
finalizedOnlyboolean | Emit only rows at or below the tip's finalized_height; the unfinalized tail is re-read each poll until it settles. Finalized data never reorgs, so onReorg is skipped entirely. |
batchSizenumber | |
sinkConsumerSink<TTx> | |
onProgress(ctx: ConsumerBatchContext) => void | Fires once per page, before onBatch and before any early return — an empty page still proves the loop is alive. Feed it to consumerHealth().record. |
onReorg(reorg: IndexReorg, ctx: { cursor: string | null }) => … | Called once per new reorg at or below the checkpoint, before the loop rewinds to ctx.cursor (null = pre-genesis) and re-reads. A reorg whose fork sits ABOVE the checkpoint is not a rollback: nothing past it was written, so it is noted and the page is read as normal. |
maxRollbackDepthnumber | Deepest rewind one reorg may make below the checkpoint before the loop refuses with ValidationError. Default 1000 blocks. The fork point is server supplied and drives a delete on every declared table, so raise this only for a source you trust. |
sleepSleep | |
emptyBackoffMsnumber | |
maxPagesnumber | |
maxEmptyPollsnumber | |
signalAbortSignal | |
retryCountnumber | Page-fetch retries after the first failure (429/5xx/network only — 4xx and handler throws always propagate). Default 3; 0 disables. |
retryDelaynumber | Base retry delay in ms; the n-th retry waits retryDelay * n. A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep. Cannot change the retry decision — the policy owns it. |
Callback context ctx: ConsumerBatchContext
cursor- Checkpoint to commit alongside your rows.
height- Highest canonical block a row was DELIVERED from.
nullbefore the first row of a fresh consume. With a sparse filter this parks at the last matching event — it measures event recency, not progress. scannedHeight- Highest canonical block the sweep has VERIFIED through: an empty page is the server confirming nothing matches between the cursor and the tip, so a caught-up tail scans to the tip even when
heightis far below it. Rolls back with reorg rewinds. tipHeight- Chain tip as of this page's read.
blocksBehindtipHeight - scannedHeight, floored at 0 — the consumer's actual backlog.nulluntil a position is known. A caught-up consumer on a quiet contract reads ~0 here whiletipHeight - heightgrows — that difference is event age, not lag.tip- The full tip for this page —
StreamsTiporIndexTipdepending on the surface. Exposed here so a handler never needs theenvelopeparameter, which is the only way to reach it today and is also how the worstfinalizedOnlymistake becomes reachable (return envelope.next_cursorjumps the cursor past events that were filtered out and never delivered). reorgs- Reorgs reported alongside this page; empty when none. Rollback still belongs in
onReorg— this is for observability inside a batch.
Read one page of the canonical block-hash map.
Each row is a block's hash, its parent hash, and its burn-chain anchor. Compare it with your own tables to confirm you follow the current chain.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
fromHeightnumber | |
toHeightnumber |
Returns Promise<CanonicalEnvelope>
canonical- IndexCanonicalBlock[]
next_cursor- string | null
tip- IndexTip
Iterate every canonical block hash, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
fromCursorstring | null | |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Read one page of the contract-state writes each block committed.
Rows are the exact key and value writes, in the node's write order (ordinal), so you can see which key a transaction changed when events alone do not show it. Filter by blockHeight (excludes fromHeight and toHeight) or contractId. txContext: true joins the writing transaction. Rows exist only from the height your node first subscribed to state writes.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
fromHeightnumber | |
toHeightnumber | |
blockHeightnumber | One block. Excludes fromHeight/toHeight; a cursor must sit at it. |
contractIdstring | One contract (<address>.<name>): only keys under vm::<contractId>::. |
txContextboolean | Join the writing transaction's tx_* fields onto each row. |
Returns Promise<StateWritesEnvelope>
state_writes- IndexStateWrite[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
Iterate every state write, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
contractIdstring | One contract (<address>.<name>): only keys under vm::<contractId>::. |
fromCursorstring | null | |
blockHeightnumber | One block. Excludes fromHeight/toHeight; a cursor must sit at it. |
txContextboolean | Join the writing transaction's tx_* fields onto each row. |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
4 more options
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Read one page of canonical blocks.
Each block has its hash, parent hash, burn-chain anchor, and block_time. Filter by a height range.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
fromHeightnumber | |
toHeightnumber |
Returns Promise<BlocksEnvelope>
blocks- IndexBlock[]
next_cursor- string | null
tip- IndexTip
Iterate every canonical block, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
fromCursorstring | null | |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Get one block by height or hash, or null.
Resolves to null when no such block exists (404).
Parameters
hover a row to find it in the codeRequired
refrequiredstring | number |
Returns Promise<BlockEnvelope | null>
block- IndexBlock
tip- IndexTip
sl.index.transactions.list(params)
Read one page of full transaction documents.
Filter by type, sender, contractId, and a height range. Each document has the decoded post conditions and the payload for its tx_type; enrichment fields are null when the raw transaction cannot be decoded. fields returns only those columns and narrows the row type; cursor, block_height, and tx_id always come back.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
typestring | |
senderstring | |
contractIdstring | |
fromHeightnumber | |
toHeightnumber |
Returns Promise<TransactionsEnvelope<TransactionFields<F>>>
transactions- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
Iterate every transaction document, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
contractIdstring | |
senderstring | |
fromCursorstring | null | |
fieldsreadonly ("cursor" | "sender" | "block_height" | "block… | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
typestring |
5 more options
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Get one transaction by id, or null.
Resolves to null when the transaction is not found (404).
Parameters
hover a row to find it in the codeRequired
txIdrequiredstring |
Returns Promise<TransactionEnvelope | null>
transaction- IndexTransaction
tip- IndexTip
Get a transaction's inclusion proof, or null.
The proof is the raw transaction, the Nakamoto block header, and the merkle path. Check it yourself with verifyTransactionProof; nothing in it needs to be trusted. Resolves to null on 404. A 503 (PROOF_TX_SET_INCOMPLETE or PROOF_NODE_UNAVAILABLE) throws an ApiError: the proof cannot be assembled on this deployment right now.
Parameters
hover a row to find it in the codeRequired
txIdrequiredstring |
Returns Promise<TransactionProof | null>
txid- string
index_block_hash- string
block_height- number
tx_index- number
raw_tx- Raw consensus-serialized transaction bytes (hex).
raw_header- Raw Nakamoto block-header bytes (hex) — parsed + re-hashed by the verifier.
tx_merkle_path- Authentication path from the tx leaf to
tx_merkle_root. consensus- Present when consensus-level verification is available: the reward cycle and its signer set, against which the header's signer signatures are checked.
Read one page of decoded PoX-4 stacking actions.
One row per stacking contract call. Filter by functionName, stacker, caller, and a height range. The feed is empty, with a notes hint, when the instance's PoX-4 decoder is disabled. For the current PoX, use pox5.events and pox.cycles.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
functionNamestring | |
stackerstring | |
callerstring | |
fromHeightnumber | |
toHeightnumber |
Returns Promise<StackingEnvelope>
stacking- IndexStackingAction[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
notes- Present only when the PoX-4 decoder is disabled, explaining an empty feed.
Iterate every PoX-4 stacking action, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
fromCursorstring | null | |
functionNamestring | |
stackerstring | |
callerstring | |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
4 more options
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Read one page of pending, unconfirmed transactions.
Filter by sender, type, contractId, and functionName. There is no height filter: rows carry received_at and a sequence cursor instead of a block position.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
senderstring | |
typestring | |
contractIdstring | Filter to pending calls to a single contract (e.g. SP….contract). |
functionNamestring | Filter to pending calls to a single function (composes with contractId). |
Returns Promise<MempoolEnvelope>
mempool- IndexMempoolTransaction[]
next_cursor- string | null
tip- IndexTip
Iterate every pending transaction, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
contractIdstring | Filter to pending calls to a single contract (e.g. SP….contract). |
senderstring | |
fromCursorstring | null | |
functionNamestring | Filter to pending calls to a single function (composes with contractId). |
typestring | |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
3 more options
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Get one pending transaction, or null.
Resolves to null once the transaction has confirmed or dropped.
Parameters
hover a row to find it in the codeRequired
txIdrequiredstring |
Returns Promise<MempoolTransactionEnvelope | null>
transaction- IndexMempoolTransaction
tip- IndexTip
sl.index.sbtc.deposits.list(params)
Read one page of completed sBTC deposits.
Filter by sender, bitcoinTxid, and a height range. confirmed: true keeps only deposits past the finality boundary. fields returns only those columns and narrows the row type; cursor and block_height always come back.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
confirmedboolean | Clamp to the finality boundary — only settled deposits past the reorg margin. |
senderstring | |
bitcoinTxidstring | |
fromHeightnumber | |
toHeightnumber |
Returns Promise<SbtcDepositsEnvelope<SbtcDepositFields<F>>>
deposits- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
notes- Present only when the sBTC decoder is disabled, explaining an empty feed.
Iterate every completed sBTC deposit, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
senderstring | |
fromCursorstring | null | |
fieldsreadonly ("cursor" | "sender" | "block_height" | "block… | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
confirmedboolean | Clamp to the finality boundary — only settled deposits past the reorg margin. |
bitcoinTxidstring |
5 more options
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Run a checkpointed, reorg-aware indexer over completed deposits.
Deposits are append-only, so they are safe to mirror. See IndexConsumeOptions.
Parameters
hover a row to find it in the codeRequired
onBatchrequired(items: TItem[], envelope: TEnvelope, ctx: ConsumerBatc… |
Options
fromHeightnumber | Start a fresh sweep at this height (e.g. 0 for genesis backfill). Ignored once a cursor exists (including a sink's committed cursor). |
toHeightnumber | |
senderstring | |
confirmedboolean | |
bitcoinTxidstring | |
fromCursorstring | null | Resume from a committed checkpoint. Without it (and without fromHeight) the API serves only the recent default window. |
mode"tail" | "bounded" | tail (default) keeps polling at the tip; bounded returns on the first empty page. |
finalizedOnlyboolean | Emit only rows at or below the tip's finalized_height; the unfinalized tail is re-read each poll until it settles. Finalized data never reorgs, so onReorg is skipped entirely. |
13 more options
batchSizenumber | |
sinkConsumerSink<TTx> | |
onProgress(ctx: ConsumerBatchContext) => void | Fires once per page, before onBatch and before any early return — an empty page still proves the loop is alive. Feed it to consumerHealth().record. |
onReorg(reorg: IndexReorg, ctx: { cursor: string | null }) => … | Called once per new reorg at or below the checkpoint, before the loop rewinds to ctx.cursor (null = pre-genesis) and re-reads. A reorg whose fork sits ABOVE the checkpoint is not a rollback: nothing past it was written, so it is noted and the page is read as normal. |
maxRollbackDepthnumber | Deepest rewind one reorg may make below the checkpoint before the loop refuses with ValidationError. Default 1000 blocks. The fork point is server supplied and drives a delete on every declared table, so raise this only for a source you trust. |
sleepSleep | |
emptyBackoffMsnumber | |
maxPagesnumber | |
maxEmptyPollsnumber | |
signalAbortSignal | |
retryCountnumber | Page-fetch retries after the first failure (429/5xx/network only — 4xx and handler throws always propagate). Default 3; 0 disables. |
retryDelaynumber | Base retry delay in ms; the n-th retry waits retryDelay * n. A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep. Cannot change the retry decision — the policy owns it. |
Callback context ctx: ConsumerBatchContext
cursor- Checkpoint to commit alongside your rows.
height- Highest canonical block a row was DELIVERED from.
nullbefore the first row of a fresh consume. With a sparse filter this parks at the last matching event — it measures event recency, not progress. scannedHeight- Highest canonical block the sweep has VERIFIED through: an empty page is the server confirming nothing matches between the cursor and the tip, so a caught-up tail scans to the tip even when
heightis far below it. Rolls back with reorg rewinds. tipHeight- Chain tip as of this page's read.
blocksBehindtipHeight - scannedHeight, floored at 0 — the consumer's actual backlog.nulluntil a position is known. A caught-up consumer on a quiet contract reads ~0 here whiletipHeight - heightgrows — that difference is event age, not lag.tip- The full tip for this page —
StreamsTiporIndexTipdepending on the surface. Exposed here so a handler never needs theenvelopeparameter, which is the only way to reach it today and is also how the worstfinalizedOnlymistake becomes reachable (return envelope.next_cursorjumps the cursor past events that were filtered out and never delivered). reorgs- Reorgs reported alongside this page; empty when none. Rollback still belongs in
onReorg— this is for observability inside a batch.
Fetch a completed deposit by Bitcoin txid; 404 → null.
Parameters
hover a row to find it in the codeRequired
bitcoinTxidrequiredstring |
Returns Promise<SbtcDepositEnvelope | null>
deposit- IndexSbtcDepositDetail
tip- IndexTip
sl.index.sbtc.withdrawals.list(params)
Read one page of sBTC withdrawals, each with its current status.
Filter by status (REQUESTED, ACCEPTED, REJECTED), sender, requestId, settlementConfirmed, and a height range. A row changes as the peg-out moves along, which is why withdrawals have no consume. fields returns only those columns and narrows the row type; cursor and request_id always come back.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
confirmedboolean | |
statusSbtcWithdrawalStatus | |
senderstring | |
requestIdnumber | |
settlementConfirmedboolean | Filter by BTC L1 settlement: true → only confirmed sweeps; false → not yet confirmed (pending or no sweep). |
fromHeightnumber | |
toHeightnumber |
Returns Promise<SbtcWithdrawalsEnvelope<SbtcWithdrawalFields<F>…
withdrawals- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
notes- string
Iterate every sBTC withdrawal, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
senderstring | |
fromCursorstring | null | |
statusSbtcWithdrawalStatus | |
fieldsreadonly ("cursor" | "sender" | "amount" | "status" | "… | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
confirmedboolean |
7 more options
requestIdnumber | |
settlementConfirmedboolean | Filter by BTC L1 settlement: true → only confirmed sweeps; false → not yet confirmed (pending or no sweep). |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Fetch a withdrawal's full lifecycle by request id; 404 → null.
Parameters
hover a row to find it in the codeRequired
requestIdrequirednumber |
Returns Promise<SbtcWithdrawalEnvelope | null>
withdrawal- IndexSbtcWithdrawalDetail
tip- IndexTip
Read one page of the raw sBTC peg event log.
Filter by topic, sender, requestId, bitcoinTxid, and a height range. confirmed: true keeps only events past the finality boundary.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
confirmedboolean | |
topicSbtcEventTopic | |
senderstring | |
requestIdnumber | |
bitcoinTxidstring | |
fromHeightnumber | |
toHeightnumber |
Returns Promise<SbtcEventsEnvelope>
events- IndexSbtcEvent[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
notes- string
Iterate every sBTC peg event, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
senderstring | |
fromCursorstring | null | |
confirmedboolean | |
bitcoinTxidstring | |
requestIdnumber |
6 more options
topicSbtcEventTopic | |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Run a checkpointed, reorg-aware indexer over the raw peg event log.
The log is append-only across all six topics. See IndexConsumeOptions.
Parameters
hover a row to find it in the codeRequired
onBatchrequired(items: TItem[], envelope: TEnvelope, ctx: ConsumerBatc… |
Options
fromHeightnumber | Start a fresh sweep at this height (e.g. 0 for genesis backfill). Ignored once a cursor exists (including a sink's committed cursor). |
toHeightnumber | |
senderstring | |
confirmedboolean | |
bitcoinTxidstring | |
requestIdnumber | |
topicSbtcEventTopic | |
fromCursorstring | null | Resume from a committed checkpoint. Without it (and without fromHeight) the API serves only the recent default window. |
15 more options
mode"tail" | "bounded" | tail (default) keeps polling at the tip; bounded returns on the first empty page. |
finalizedOnlyboolean | Emit only rows at or below the tip's finalized_height; the unfinalized tail is re-read each poll until it settles. Finalized data never reorgs, so onReorg is skipped entirely. |
batchSizenumber | |
sinkConsumerSink<TTx> | |
onProgress(ctx: ConsumerBatchContext) => void | Fires once per page, before onBatch and before any early return — an empty page still proves the loop is alive. Feed it to consumerHealth().record. |
onReorg(reorg: IndexReorg, ctx: { cursor: string | null }) => … | Called once per new reorg at or below the checkpoint, before the loop rewinds to ctx.cursor (null = pre-genesis) and re-reads. A reorg whose fork sits ABOVE the checkpoint is not a rollback: nothing past it was written, so it is noted and the page is read as normal. |
maxRollbackDepthnumber | Deepest rewind one reorg may make below the checkpoint before the loop refuses with ValidationError. Default 1000 blocks. The fork point is server supplied and drives a delete on every declared table, so raise this only for a source you trust. |
sleepSleep | |
emptyBackoffMsnumber | |
maxPagesnumber | |
maxEmptyPollsnumber | |
signalAbortSignal | |
retryCountnumber | Page-fetch retries after the first failure (429/5xx/network only — 4xx and handler throws always propagate). Default 3; 0 disables. |
retryDelaynumber | Base retry delay in ms; the n-th retry waits retryDelay * n. A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep. Cannot change the retry decision — the policy owns it. |
Callback context ctx: ConsumerBatchContext
cursor- Checkpoint to commit alongside your rows.
height- Highest canonical block a row was DELIVERED from.
nullbefore the first row of a fresh consume. With a sparse filter this parks at the last matching event — it measures event recency, not progress. scannedHeight- Highest canonical block the sweep has VERIFIED through: an empty page is the server confirming nothing matches between the cursor and the tip, so a caught-up tail scans to the tip even when
heightis far below it. Rolls back with reorg rewinds. tipHeight- Chain tip as of this page's read.
blocksBehindtipHeight - scannedHeight, floored at 0 — the consumer's actual backlog.nulluntil a position is known. A caught-up consumer on a quiet contract reads ~0 here whiletipHeight - heightgrows — that difference is event age, not lag.tip- The full tip for this page —
StreamsTiporIndexTipdepending on the surface. Exposed here so a handler never needs theenvelopeparameter, which is the only way to reach it today and is also how the worstfinalizedOnlymistake becomes reachable (return envelope.next_cursorjumps the cursor past events that were filtered out and never delivered). reorgs- Reorgs reported alongside this page; empty when none. Rollback still belongs in
onReorg— this is for observability inside a batch.
Get the all-time sBTC peg scoreboard.
A single aggregate, with no pagination.
Returns Promise<SbtcSummaryEnvelope>
summary- IndexSbtcSummary
tip- IndexTip
notes- string
Read one page of PoX reward cycles, newest first.
cursor is a reward_cycle number, and the page returns the cycles below it. next_cursor is the next cycle number to page from, or null at the end. This reports the current PoX (PoX-5); PoX-4 history is not served here, so read stacking for it.
Parameters
hover a row to find it in the codeOptions
cursornumber | null | A reward_cycle to page from; the page returns cycles below it (descending). |
limitnumber |
Returns Promise<PoxCyclesEnvelope>
pox_version- The PoX version this response reports. Currently 5.
cycles- IndexPoxCycle[]
next_cursor- The next
reward_cycleto page from (cycles descend), or null at the end. tip- IndexTip
Iterate every reward cycle, paging for you.
Takes the same filters as list (it pages by reward cycle number). Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursornumber | null | A reward_cycle to page from; the page returns cycles below it (descending). |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Get one reward cycle by number, or null.
Resolves to null on 404: an unknown cycle, or one below pox-5's first reward cycle (141), whose PoX-4 history is final and not served here.
Parameters
hover a row to find it in the codeRequired
rewardCyclerequirednumber |
Returns Promise<PoxCycleEnvelope | null>
pox_version- 5
cycle- IndexPoxCycle & { signers: IndexPoxCycleSigner[] }
tip- IndexTip
sl.index.pox5.events.list(params)
Read one page of decoded PoX-5 staking events.
Filter by topic, staker, signer, signerManager, bondIndex, rewardCycle, and a height range. confirmed: true keeps only rows past the finality boundary. fields returns only those columns and narrows the row type; cursor, block_height, and topic always come back.
Parameters
hover a row to find it in the codeRequired
fieldsrequiredreadonly F[] | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
Options
cursorstring | null | |
fromCursorstring | null | |
limitnumber | |
confirmedboolean | Clamp to the finality boundary — only rows past the reorg margin. |
topicIndexPox5EventTopic | |
stakerstring | |
signerstring | |
signerManagerstring |
4 more options
bondIndexnumber | |
rewardCyclenumber | |
fromHeightnumber | |
toHeightnumber |
Returns Promise<Pox5EventsEnvelope<Pox5EventFields<F>>>
events- TRow[]
next_cursor- string | null
tip- IndexTip
reorgs- IndexReorg[]
notes- Present only when the PoX-5 decoder is disabled, explaining an empty feed.
Iterate every PoX-5 event, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
fromCursorstring | null | |
fieldsreadonly ("cursor" | "block_height" | "block_time" | "t… | Columns to return. The server projects the row, so an unrequested column is physically absent — and the narrowing overload on list makes reading one a compile error rather than undefined at runtime. |
confirmedboolean | Clamp to the finality boundary — only rows past the reorg margin. |
topicIndexPox5EventTopic | |
stakerstring |
9 more options
signerstring | |
signerManagerstring | |
bondIndexnumber | |
rewardCyclenumber | |
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
Run a checkpointed, reorg-aware indexer over PoX-5 events.
The pox-5 print log is append-only across all 19 topics. See IndexConsumeOptions.
Parameters
hover a row to find it in the codeRequired
onBatchrequired(items: TItem[], envelope: TEnvelope, ctx: ConsumerBatc… |
Options
fromHeightnumber | Start a fresh sweep at this height (e.g. 0 for genesis backfill). Ignored once a cursor exists (including a sink's committed cursor). |
toHeightnumber | |
fieldsreadonly ("cursor" | "block_height" | "block_time" | "t… | |
confirmedboolean | |
topicIndexPox5EventTopic | |
stakerstring | |
signerstring | |
signerManagerstring |
18 more options
bondIndexnumber | |
rewardCyclenumber | |
fromCursorstring | null | Resume from a committed checkpoint. Without it (and without fromHeight) the API serves only the recent default window. |
mode"tail" | "bounded" | tail (default) keeps polling at the tip; bounded returns on the first empty page. |
finalizedOnlyboolean | Emit only rows at or below the tip's finalized_height; the unfinalized tail is re-read each poll until it settles. Finalized data never reorgs, so onReorg is skipped entirely. |
batchSizenumber | |
sinkConsumerSink<TTx> | |
onProgress(ctx: ConsumerBatchContext) => void | Fires once per page, before onBatch and before any early return — an empty page still proves the loop is alive. Feed it to consumerHealth().record. |
onReorg(reorg: IndexReorg, ctx: { cursor: string | null }) => … | Called once per new reorg at or below the checkpoint, before the loop rewinds to ctx.cursor (null = pre-genesis) and re-reads. A reorg whose fork sits ABOVE the checkpoint is not a rollback: nothing past it was written, so it is noted and the page is read as normal. |
maxRollbackDepthnumber | Deepest rewind one reorg may make below the checkpoint before the loop refuses with ValidationError. Default 1000 blocks. The fork point is server supplied and drives a delete on every declared table, so raise this only for a source you trust. |
sleepSleep | |
emptyBackoffMsnumber | |
maxPagesnumber | |
maxEmptyPollsnumber | |
signalAbortSignal | |
retryCountnumber | Page-fetch retries after the first failure (429/5xx/network only — 4xx and handler throws always propagate). Default 3; 0 disables. |
retryDelaynumber | Base retry delay in ms; the n-th retry waits retryDelay * n. A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep. Cannot change the retry decision — the policy owns it. |
Callback context ctx: ConsumerBatchContext
cursor- Checkpoint to commit alongside your rows.
height- Highest canonical block a row was DELIVERED from.
nullbefore the first row of a fresh consume. With a sparse filter this parks at the last matching event — it measures event recency, not progress. scannedHeight- Highest canonical block the sweep has VERIFIED through: an empty page is the server confirming nothing matches between the cursor and the tip, so a caught-up tail scans to the tip even when
heightis far below it. Rolls back with reorg rewinds. tipHeight- Chain tip as of this page's read.
blocksBehindtipHeight - scannedHeight, floored at 0 — the consumer's actual backlog.nulluntil a position is known. A caught-up consumer on a quiet contract reads ~0 here whiletipHeight - heightgrows — that difference is event age, not lag.tip- The full tip for this page —
StreamsTiporIndexTipdepending on the surface. Exposed here so a handler never needs theenvelopeparameter, which is the only way to reach it today and is also how the worstfinalizedOnlymistake becomes reachable (return envelope.next_cursorjumps the cursor past events that were filtered out and never delivered). reorgs- Reorgs reported alongside this page; empty when none. Rollback still belongs in
onReorg— this is for observability inside a batch.
Read one page of Rune etch, mint, transfer, and burn events.
Filter by rune (an id or a name), address, kind, txid, and a height range. The cursor is <block_height>:<event_index>, and the envelope's tip is a Bitcoin tip. notes says so when Runes is not configured on the instance.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromCursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
limitnumber | |
runeRuneRef | |
addressstring | |
kindreadonly IndexRuneEventKind[] | |
txidstring |
Returns Promise<RuneActivityEnvelope<IndexRuneEvent>>
events- TRow[]
next_cursor- string | null
tip- IndexBitcoinTip
reorgs- IndexBtcReorg[]
notes- string
Iterate every Rune event, paging for you.
Takes the same filters as list. Not a live index: it does not checkpoint, ignores reorgs, and ends when it catches the tip. batchSize defaults to 200 (max 1000); page fetches retry on 429 and 5xx; aborting signal rejects the iterator.
Parameters
hover a row to find it in the codeOptions
cursorstring | null | |
fromHeightnumber | |
toHeightnumber | |
fromCursorstring | null | |
runeRuneRef | |
addressstring | |
kindreadonly IndexRuneEventKind[] | |
txidstring |
5 more options
retryCountnumber | Retries after the first failure. Default 3; 0 disables. |
retryDelaynumber | Base delay in ms; the n-th retry waits retryDelay * n (matches the stacks transport). A server Retry-After overrides it. Default 1000. |
onError(err: unknown, ctx: { attempt: number; retriesLeft: num… | Void observer, called before each retry sleep (metrics/logging). The retry policy owns the decision; this cannot change it. |
batchSizenumber | Rows per page request. Default 200, max INDEX_MAX_PAGE_SIZE (1000). |
signalAbortSignal |
The rune catalog. search prefix-matches the name; sort is etch order (default) or busiest-first.
Parameters
hover a row to find it in the codeOptions
searchstring | Name prefix, spacers and case ignored (dog matches DOG•GO•TO•THE•MOON). |
sort"number" | "mints" | number (etch order, oldest first — default) or mints (busiest first). |
cursorstring | null | |
limitnumber |
Returns Promise<RunesEnvelope<IndexRuneEntry>>
runes- TRow[]
next_cursor- string | null
tip- IndexBitcoinTip
reorgs- Always empty:
listreads a reorg-corrected snapshot table, not an append-only log — there is no stale page to reconcile. notes- Present only when Runes data is not configured on this instance.
Get one rune by id or name, or null.
Resolves to null on 404: no such rune, or Runes isn't configured on this instance.
Parameters
hover a row to find it in the codeRequired
runerequiredRuneRef |
Returns Promise<RuneEnvelope | null>
rune- IndexRuneEntry
tip- IndexBitcoinTip
Current per-outpoint rune balances by address or outpoint.
Parameters
hover a row to find it in the codeRequired
paramsrequiredRuneBalancesListParams |
Returns Promise<RuneBalancesEnvelope<IndexRuneBalance>>
balances- TRow[]
next_cursor- string | null
tip- IndexBitcoinTip
reorgs- Always empty — see
RunesEnvelope.reorgs. notes- string
Whether a Bitcoin output is spent, and by which transaction.
A mempool spend shows on the next read (mempool: true); a confirmed one names its block. Resolves to null on 404: no such transaction, no output at vout, or an OP_RETURN output.
Parameters
hover a row to find it in the codeRequired
txidrequiredstring | |
voutrequirednumber |
Returns Promise<BitcoinOutputUnspent | BitcoinOutputSpent | nul…
txid- string
vout- number
spent- false
Get the live vocabulary of what Index can query.
The discovery doc lists every endpoint and each event type's columns, allowed and equality filters, and required-non-null fields. Read it to learn what's queryable (and which types accept trait) instead of hardcoding.
Returns Promise<IndexDiscovery>
event_type_filters- Record<string, IndexEventTypeFilters>
sl.index.printSchema(contractId)
Get the print payload schema a contract actually emits.
Lists the topics it emits and each field's observed Clarity, TS, and column types. Anonymous read; resolves to null on 404.
Parameters
hover a row to find it in the codeRequired
contractIdrequiredstring |
Returns Promise<PrintSchemaResponse | null>
contract_id- string
topics- InferredTopicSchema[]
sampled- boolean
total_events- number
total_events_capped- True when the count hit the server-side cap (total_events is the cap).
sample- { size: number; newest_height: number | null; oldest_height: number | null }
tip- IndexTip
BitcoinOutputSpentBitcoinOutputUnspentBlockEnvelopeBlocksEnvelopeBlocksListParamsBlocksWalkParamsBlocksListParams without limit, plus walk options.CanonicalEnvelopeCanonicalListParamsCanonicalWalkParamsCanonicalListParams without limit, plus walk options.ColumnTypeConsumerBatchContextonBatch.ConsumerSinkContractCallsEnvelopeContractCallsListParamsContractCallsWalkParamsContractCallsListParams without limit, plus walk options.EventsEnvelopeEventsListParamsEventsWalkParamsEventsListParams without limit, plus walk options.FtTransferFtTransferFieldsFtTransfersEnvelopeFtTransfersListParamsFtTransfersWalkParamsFtTransfersListParams without limit, plus walk options.IndexBitcoinTipIndexTip: Runes ingest tracks Bitcoin blocks, not Stacks ones.IndexBlockIndexBtcReorgIndexCanonicalBlockIndexConsumeOptionsindex.events.consume and index.contractCalls.consume.IndexContractCallIndexDiscoveryGET /v1/index discovery doc: live endpoints and filter vocabulary.IndexEventFieldsfields selection (plus what always ships).IndexEventOfevent_type literal.IndexEventTypeFiltersIndexDiscovery doc.IndexFtBurnIndexFtMintIndexFtTransferIndexMapDeleteIndexMapInsertIndexMapSetIndexMempoolTransactionIndexNestedContractCallIndexNftBurnIndexNftMintIndexNftTransferIndexOrderIndexPostCondition{ type: "stx"; principal: string; condition_code: number; condition_code_name: string | null; amount: string;…IndexPox5EventIndexPoxCycleIndexPoxCycleSignerIndexPrintprint event with its topic and value.IndexReorgIndexRuneBalanceIndexRuneEntryIndexRuneEventIndexRuneEventKind"rune_etch" | "rune_mint" | "rune_transfer" | "rune_burn"IndexRuneRefSummaryIndexRuneTermsnull for a premine-only rune that was never mintable.IndexSbtcDepositbitcoin_txid (deposits carry no request_id).IndexSbtcDepositDetailstatus.IndexSbtcEventIndexSbtcSummaryIndexSbtcWithdrawalIndexSbtcWithdrawalDetailrequest_id.IndexSbtcWithdrawalPhaseIndexStackingActionIndexStateWriteIndexStxBurnIndexStxLockIndexStxMintIndexStxTransferIndexTipblock_height, finalized_height, lag_secondsIndexTransactionraw_tx-decoded enrichment.IndexVarSetInferredPrintFieldname, camel_name, clarity_type, ts_type, column_type, always_present, …InferredTopicSchemaprint topic, with counts and heights.MempoolEnvelopeMempoolListParamsMempoolTransactionEnvelopeMempoolWalkParamsMempoolListParams without limit, plus walk options.MerkleProofStepNftTransferNftTransferFieldsNftTransfersEnvelopeNftTransfersListParamsNftTransfersWalkParamsNftTransfersListParams without limit, plus walk options.PageRetryOptionsPox5EventFieldsPox5EventsEnvelopePox5EventsListParamsPox5EventsWalkParamsPox5EventsListParams without limit, plus walk options.PoxCycleEnvelopePoxCyclesEnvelopePoxCyclesListParamsPoxCyclesWalkParamsPoxCyclesListParams without limit, plus walk options.PrintSchemaResponseRewardSetsigners, total_weightRewardSetSignersigning_key, weightRuneActivityEnvelopeRuneActivityListParamsRuneActivityWalkParamsRuneActivityListParams without limit, plus walk options.RuneBalancesEnvelopeRuneBalancesListParamsaddress or outpoint.RuneEnvelopeRuneRefRunesEnvelopeRunesListParamsSbtcDepositEnvelopeSbtcDepositFieldsSbtcDepositsEnvelopeSbtcDepositsListParamsSbtcDepositsWalkParamsSbtcDepositsListParams without limit, plus walk options.SbtcEventsEnvelopeSbtcEventsListParamsSbtcEventsWalkParamsSbtcEventsListParams without limit, plus walk options.SbtcSummaryEnvelopeSbtcWithdrawalEnvelopeSbtcWithdrawalFieldsSbtcWithdrawalsEnvelopeSbtcWithdrawalsListParamsSbtcWithdrawalStatus"REQUESTED" | "ACCEPTED" | "REJECTED"SbtcWithdrawalsWalkParamsSbtcWithdrawalsListParams without limit, plus walk options.Sleep(ms: number, signal?: AbortSignal) => Promise<void>StackingEnvelopeStackingListParamsStackingWalkParamsStackingListParams without limit, plus walk options.StateWritesEnvelopeStateWritesListParamsStateWritesWalkParamsStateWritesListParams without limit, plus walk options.TransactionEnvelopeTransactionFieldsTransactionProofTransactionsEnvelopeTransactionsListParamsTransactionsWalkParamsTransactionsListParams without limit, plus walk options.