Skip to content

Astria APIs

Astria uses Protobuf for its API definitions. These APIs are used throughout the Astria stack for communication between different services.

See the Astria Protobuf API definitions here.

Primitives

The Primitives Protobufs defined the different types that are used within all other Astria APIs. This includes types such as:

  • Address: An Astria address type
  • Denom: A denom type used by the Astria Sequencer
  • Proof: A proof that a node is included in a Merkle tree.
  • RollupId: An Id for the sequencer to identify a rollup namespace.
  • TransactionId: A unique identifier for transaction source tracking.
  • Uint128: An unsigned 128bit integer type for numerical values.

See the Astria primitives Protobuf definitions here.

Protocol-APIs

The Protocol APIs are used by services communicating directly with the Astria Sequencer. This includes message definitions for things like:

See the Astria protocol-apis Protobuf definitions here.

Sequencerblock-APIs

The Sequencerblock APIs are used by the Astria Conductor, Astria Bridge Withdrawer, to retrieve sequencer block information from the Astria Sequencer. The main methods defined are:

  • GetSequencerBlock: Query the Astria Sequencer for a sequencer block.
  • GetFilteredSequencerBlock: Query the Astria Sequencer for a sequencer block only containing the subset of transactions relevant to a specific rollup.
  • GetPendingNonce: Return the pending nonce for a specific sequencer account.

See the Astria sequencerblock-apis Protobuf definitions here.

Composer-APIs

The Composer APIs are used for passing new transactions that have been submitted to the rollup, and passing them on to the Composer. The main method used here is:

See the Astria composer-apis Protobuf definitions here.

Execution-APIs

The Execution APIs are used to drive deterministic production of blocks for any rollup that utilizes The Astria Sequencer and is connected to the Astria Conductor. This includes methods such as:

  • GetGenesisInfo: For the Conductor to get the necessary genesis information from the rollup.
  • GetBlock: Retrieves information about a block from the sequencer.
  • BatchGetBlocks: Retrieve the information about a collection of blocks from the sequencer.
  • ExecuteBlock: Get all the transaction information required to create a new rollup block for execution.
  • GetCommitmentState: Retrieve the current commitment state of the rollup.
  • UpdateCommitmentState: Pass the updated commitment state to the rollup.

See the Astria execution-apis Protobuf definitions here.