IndexerClientImpl
Ktor-based implementation of IndexerClient for the Midnight indexer GraphQL API.
Connection:
HTTPS endpoint:
{baseUrl}/graphql(with TLS certificate pinning)WebSocket endpoint:
{baseUrl}/graphql/ws
GraphQL Protocol:
Uses HTTPS POST for queries/mutations
Uses WebSocket for subscriptions (graphql-ws protocol)
Security:
TLS certificate pinning enabled for production
Development mode allows localhost HTTP (for local testing)
Parameters
HTTP client for making requests (injectable for testing)
Indexer API base URL. Typical values come from NetworkConfig.forNetwork(...).indexerBaseUrl.
List of SHA-256 certificate fingerprints for pinning (production only)
If true, allows HTTP to localhost (INSECURE - testing only)
Constructors
Functions
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.