You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LocalStateQuery protocol queries the local node's ledger state at specific chain points. It is used for wallet queries, stake information, protocol parameters, and other state queries.
// Acquire state at tipclient.AcquireVolatileTip()
// Wait for Acquired message// Query UTxOs for an addressresult, err:=client.Query(utxosByAddressQuery)
// Release state when doneclient.Release()
Common Queries
GetCurrentPParams: Protocol parameters
GetStakeDistribution: Stake pool distribution
GetUTxOByAddress: UTxOs at specific addresses
GetUTxOByTxIn: UTxOs by transaction inputs
GetEpochNo: Current epoch number
GetGenesisConfig: Genesis configuration
GetRewardInfoPools: Pool reward information
GetRewardProvenance: Reward calculation details
GetStakePools: Registered stake pools
GetStakePoolParams: Stake pool parameters
GetOpCertCounters: On-chain operational-certificate counters (pool cold-key hash → highest accepted opcert issue number), the counter a synced node enforces
DebugChainDepState: Full consensus chain-dependent state (opcert counters, last slot, and evolving/candidate/epoch nonces); supports both the Praos (Babbage+) and TPraos (Shelley–Alonzo) serialisations
Notes
State must be acquired before queries can be executed
Multiple queries can be executed on the same acquired state
The acquired state is a snapshot; chain may advance during queries