IndexerService exposes a set of gRPC and REST endpoints that allow clients to query commitment transactions, inspect VTXO trees, monitor forfeit and sweep transactions, and subscribe to real-time updates for script activity. The IndexerService supports both point-in-time queries and real-time subscriptions.
API Layer Logic
Client applications use theIndexerService to:
| Operation Category | Methods | Purpose |
|---|---|---|
| Commitment Data | GetCommitmentTx, GetForfeitTxs, GetConnectors | Commitment tx analysis |
| VTXO Management | GetVtxos, GetVtxoTree, GetVtxoTreeLeaves | VTXO lifecycle and tree navigation |
| Transaction History | GetVtxoChain, GetVirtualTxs | Transaction chain analysis |
| Batch Operations | GetBatchSweepTransactions | Batch settlement tracking |
| Real-time Monitoring | SubscribeForScripts, GetSubscription | Script-based event subscriptions |
This service is essential for builders who want to provide visibility into user funds, transaction history, or batch-level activity without relying on custom indexers or database infrastructure.
API Layer Logic Explained
Commitment Data
Commitment Data
These functions provide comprehensive analysis of commitment transactions and their associated components.
GetCommitmentTxreturns information (viaGetCommitmentTxResponse) about a specific commitment transaction (identified via itsTxId), including its associated batches, input/output amounts, and start/end timestampsGetForfeitTxsreturns the list of forfeit transactions submitted for a given commitment transactionGetConnectorsreturns the tree of connector outputs with details on tree positioning for the provided commitment transaction
GetForfeitTxs and GetConnectors support pagination if results span multiple pages.VTXO Management
VTXO Management
VTXO lifecycle and tree navigation functions enable clients to query and traverse the state of virtual transactions.
GetVtxosprovides flexible VTXO querying by addresses or outpoints with filtering options for spendable, spent only, or recoverable statesGetVtxoTreereturns the complete VTXO tree structure for a given batch outpoint, including transaction details and tree positioning informationGetVtxoTreeLeavesreturns the list of leaves (VTXO outpoints) of the tree(s) for a batch outpoint, optimized for clients that only need the final outputs
Transaction History
Transaction History
Offchain transaction chain analysis tools in the virtual mempool enable tracing of VTXO spending flows and virtual transaction data
GetVirtualTxsreturns the raw virtual transactions (in hex) for a given set of Arkade transaction IDsGetVtxoChaintraces the lineage of Arkade transactions from any VTXO leaf spending through to the creation of a specified VTXO outpoint (ie. tx chain), enabling full transaction history reconstruction
Batch Operations
Batch Operations
Batch settlement tracking provides visibility into the sweep transactions that claim batch outputs back to the operator.
GetBatchSweepTransactionsreturns the list of transactions that were swept by a given batch output and includes information on whether a batch output has been claimed by the operator after expiry or if a user has initiated unrolling of the tree.
In normal operation, this contains a single transaction ID representing the complete batch claim. However, if any tree leaves were unrolled onchain before expiration, the list contains multiple transaction IDs representing the partial sweeps. For example, in a binary tree with 4+ leaves, one unroll triggers 3 sweep transactions for the remaining tree. If an entire VTXO tree was unrolled onchain, the sweep transaction list is empty.
Real-time Monitoring
Real-time Monitoring
Script-based event subscription system enables clients to receive real-time notifications for transactions affecting specific VTXO scripts.
SubscribeForScriptsallows clients to create or update subscriptions for transaction notifications related to specific VTXO scripts, returning a subscription ID for stream accessGetSubscriptionprovides server-side streaming of real-time notifications for subscribed scripts, delivering transaction details including new and spent VTXOs, transaction data, and checkpoint transactionsUnsubscribeForScriptslets a client remove specific scripts from existing subscriptions
Notes for Builders
- Use script-level subscriptions to drive reactive clients or backend workflows
- VTXO queries and chain tracing allow for full lifecycle auditing of offchain funds
- Tree navigation is optimized - use
GetVtxoTreeLeavesfor efficiency when you only need final outputs, not the full tree structure - Batch sweep tracking helps monitor operator claims -
GetBatchSweepTransactionsshows normal vs. partial sweep scenarios when leaves are unrolled onchain - Real-time subscriptions are stateful - manage the subscription lifecycle with
SubscribeForScripts/UnsubscribeForScriptsbefore usingGetSubscriptionstreams - All methods support both gRPC and REST interfaces through auto-generated gateway mappings
- All endpoints are paginated and follow REST conventions
The
IndexerService is complementary to the ArkService.
Use the IndexerService for historical transaction data and detailed analysis and ArkService for real-time updates