State API
Serves consensus state derived from finalized blocks
All state derived from block data is represented in the form of Merkle trees or Merkle tries, so this API is able to provide select segments of the state with a proof that will convince the client that the returned segment is accurate, as long as they know the corresponding state commitment (part of each block header).
Endpoints
GET /fee-state
/fee-state
Get a Merkle proof proving the balance of a certain fee account in a given snapshot of the state. The element in the returned Merkle proof contains the balance of the requested account, or null
if the account has no balance.
Paths
/fee-state/:height/:account
/fee-state/commit/:commit/:account
Parameters
height
integer
Block height of the state snapshot to read from
commit
tagged<MERKLE_COMM>
Commitment of the state snapshot to read from
account
hex
Fee account to look up
Returns MerkleProof
MerkleProof
GET /fee-state/block-height
/fee-state/block-height
The latest block height for which fee state is available.
Note that this may be less than the block height indicated by other APIs, such as status or node, since the fee state storage is updated asynchronously.
Returns integer
integer
GET /block-state
/block-state
Get a Merkle proof proving the inclusion of a certain block at a position in the history. The element in the returned Merkle proof contains the commitment of the block at the requested position in history.
Paths
/block-state/:height/:index
/block-state/commit/:commit/:index
Parameters
height
integer
Block height of the state snapshot to read from
commit
tagged<MERKLE_COMM>
Commitment of the state snapshot to read from
index
integer
Height of the block to look up
Returns MerkleProof
MerkleProof
GET /block-state/block-height
/block-state/block-height
The latest block height for which block state is available.
Note that this may be less than the block height indicated by other APIs, such as status or node, since the block state storage is updated asynchronously.
Returns integer
integer
Last updated