Query snapshot of merklized state.
The state API provides an interface for serving queries against arbitrarily old snapshots of the state. This allows a full Merkle tree to be reconstructed from storage. However, if any parent state is missing then the partial snapshot can not be queried.
/hotshot-state//block-height
The latest block height for which the merklized state is available.
Note that this may be less than the block height indicated by other APIs, such as status
or node
, since the merklized state storage is updated asynchronously.
/hotshot-state//:height/:key
/hotshot-state/commit/:commit/:key
height | Integer |
commit | TaggedBase64 |
key | Literal |
The endpoint offers two methods to query: by block height or by the tree’s commitment.
GET /:height/:key Retrieves the Merkle Path for the membership proof of a leaf based on the block height and entry index. Parameters: :height : The block height of the snapshot. :key : The index of the entry in the Merkle tree.
GET /commit/:commit/:key Retrieves the Merkle Path for the membership proof of a leaf based on the Merkle tree commitment. Parameters: :commit : The merkle tree commitment :key : The index of the entry in the Merkle tree.
Copyright © 2022 Espresso Systems. All rights reserved.