LogoLogo
  • INTRODUCTION
  • LEARN
    • Espresso in the Modular Stack
    • The Espresso Network
      • System Overview
      • Properties of HotShot
        • EspressoDA
          • How It Works
      • Interfaces
        • Espresso ↔ Rollup
        • Espresso ↔ L1
        • Rollup ↔ L1
      • Internal Functionality
        • Espresso Node
        • Light Client Contract
        • Fee Token Contract
        • Stake Table
          • How the Stake Table Contract Works
        • Smart Contract Upgradeability
    • Rollup Stacks
      • Integrating a ZK Rollup
        • ZK Rollup Architecture
        • Using Espresso
        • Summary of Changes
      • Integrating an Optimistic Rollup
        • Optimistic Rollup Architecture
        • Using Espresso
        • Summary of Changes
  • Guides
    • Using the Espresso Network
      • Integrating Arbitrum Orbit Chain
        • Quickstart with Arbitrum Nitro Rollups
        • Reading Confirmations from the Espresso Network
        • Arbitrum Nitro Integration Overview
          • Using TEE with Nitro
          • Arbitrum Nitro Trust & Liveness Dependencies
        • Migrating Arbitrum Orbit Chains to Espresso
          • Arbitrum Testnet
            • Nitro Testnet
            • Local Deployment (`docker compose`)
      • Using the Espresso Network as a Cartesi application
    • Running an Espresso Node
    • Running a Builder
    • Bridging with the Espresso Network
  • API Reference
    • Espresso API
      • Status API
      • Catchup API
      • Availability API
      • Node API
      • State API
      • Events API
      • Submit API
      • Earlier Versions
        • v0
          • Status API
          • Catchup API
          • Availability API
          • Node API
          • State API
          • Events API
          • Submit API
    • Builder API
  • Releases
    • Mainnet 1
      • Running a Mainnet 1 Node
      • Contracts
      • Rollup Migration Guide
    • Mainnet 0
      • Running a Mainnet 0 Node
      • Contracts
    • Testnets
      • Decaf Testnet Release
        • Running a Node
        • Contracts
      • Cappuccino Testnet Release
        • Running a Node
        • Deploying a Rollup on Cappuccino
        • Benchmarks
      • Gibraltar Testnet Release
        • Interacting with Gibraltar
        • Arbitrum Nitro integration
        • Deploying a Rollup on Gibraltar
      • Cortado Testnet Release
        • Interacting with Cortado
        • OP Stack Integration
          • Optimism Leader Election RFP
      • Doppio Testnet Release
        • Interacting with Doppio
        • Polygon zkEVM Stack Integration
        • Minimal Rollup Example
        • Benchmarks
      • Americano Testnet Release
  • Appendix
    • Interacting with L1
      • Trustless Sync
      • Fork Recovery
      • Bridging
    • Glossary of Key Terms
Powered by GitBook
On this page
  • Endpoints
  • GET /fee-state
  • GET /fee-state/block-height
  • GET /fee-state/fee-balance/latest/:account
  • GET /block-state
  • GET /block-state/block-height
  1. API Reference
  2. Espresso API
  3. Earlier Versions
  4. v0

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.

Returns integer

GET /fee-state/fee-balance/latest/:account

Convenience endpoint to get the current balance of an account from a trusted node.

Name
Type
Description

account

hex

Fee account to look up

Returns the balance as a plain integer, without proof.

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.

Returns integer

PreviousNode APINextEvents API

Last updated 1 month ago

Note that this may be less than the block height indicated by other APIs, such as or , since the fee state storage is updated asynchronously.

Note that this may be less than the block height indicated by other APIs, such as or , since the block state storage is updated asynchronously.

status
node
status
node