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

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

Name
Type
Description

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

GET /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

GET /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

Name
Type
Description

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

GET /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

Last updated