IndexerClient
Client for the Midnight indexer GraphQL API.
Provides access to ledger events, blocks, and network state for light wallet implementation.
Light Wallet Architecture:
Subscribe to transaction events via WebSocket
Track UTXOs locally
Calculate balances from UTXO set
No full node required
GraphQL Endpoints (composed from NetworkConfig.forNetwork(...).indexerBaseUrl):
HTTP Queries:
{baseUrl}/graphqlWebSocket Subscriptions:
{baseUrl}/graphql/ws(scheme switched tows(s)://)
See also
for implementation details
for the canonical URL source
Inheritors
Functions
The hash of the block at height — the discriminator for detecting a chain RESET (a localnet docker down/up replaces the chain). ChainResetGuard pins a CHECKPOINT block above genesis and re-looks-it-up here on each sync: after a reset the fresh chain is shorter (the pinned height returns BlockHashLookup.NotOnChain) or, once it re-climbs, that height carries a different hash (BlockHashLookup.Found with a new value).
Get current block with ledger parameters.
Get historical events in range.
Get current network synchronization state.
Query the current on-chain state of a deployed contract.
Query all dust events via WebSocket subscription.
Query dust events starting from a specific event ID (delta sync).
Query all zswap (shielded) events from the blockchain via subscription.
Reset the WebSocket connection (close all active subscriptions).
Subscribe to new blocks.
Subscribe to dust ledger events via WebSocket.
Subscribe to unshielded transactions for an address.
Subscribe to zswap ledger events.