Indexer API Reference
The Indexer module provides an interface for querying the Midnight GraphQL indexer to fetch blocks, transactions, and UTXOs.
Indexer Client
noxipher.indexer.client.IndexerClient
GraphQL client for Midnight Indexer v4.
Supports: - HTTP queries (block, transaction, UTXO, DUST) - WebSocket subscriptions (blocks, shielded transactions, ZSwap events)
Source code in src/noxipher/indexer/client.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
connect_wallet_session(viewing_key)
async
Open shielded wallet session with Indexer.
Viewing key format: hex-encoded (coinPublicKey + encryptionPublicKey) — 64 bytes hex Returns: session_id string
Source code in src/noxipher/indexer/client.py
disconnect_wallet_session(session_id)
async
Close shielded wallet session.
Source code in src/noxipher/indexer/client.py
get_block(height=None, hash_hex=None)
async
Get block by height or hash. Default: latest block.
Source code in src/noxipher/indexer/client.py
get_dust_status(cardano_stake_keys)
async
Query DUST generation status for Cardano stake keys.
Source code in src/noxipher/indexer/client.py
get_transactions(hash=None, address=None, limit=10)
async
Get transactions by hash or address.
Source code in src/noxipher/indexer/client.py
get_utxos(address)
async
Get unshielded UTXOs for an address.
Source code in src/noxipher/indexer/client.py
subscribe_blocks()
async
Subscribe to new blocks via WebSocket.
Source code in src/noxipher/indexer/client.py
subscribe_shielded_transactions(session_id)
async
Stream shielded transactions for wallet session. Returns ShieldedTransactionFound + ShieldedTransactionProgress events.
Source code in src/noxipher/indexer/client.py
Indexer Models
noxipher.indexer.models
Indexer data models — Pydantic models for Midnight Indexer v4 responses.
Block
DustGenerationStatus
Bases: BaseModel
DUST generation status for a Cardano stake key.
Source code in src/noxipher/indexer/models.py
TokenBalance
Transaction
Bases: BaseModel
Transaction data from Indexer.
Source code in src/noxipher/indexer/models.py
TransactionResult
Bases: BaseModel
Transaction execution result.
Source code in src/noxipher/indexer/models.py
normalize_status(v)
classmethod
Normalize status string — Indexer returns mixed case.