Espresso Systems Logo

fee-state API 0.0.1 Reference

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.

GET getfeebalance

Routes

/hotshot-state/fee-balance/latest/:address

Parameters

addressLiteral

Description

Get current balance in fee state. Expected parameter is an Ethereum address in hex format.

GET get_height

Routes

/hotshot-state//block-height

Parameters

None

Description

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.

GET get_path

Routes

/hotshot-state//:height/:key

/hotshot-state/commit/:commit/:key

Parameters

commitTaggedBase64
heightInteger
keyLiteral

Description

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.