Module consensus_api

Module consensus_api 

Source
Expand description

Consensus API endpoints.

This module provides HTTP endpoints for interacting with the consensus layer:

  • Status: Get consensus engine state, current view, leader info
  • Transactions: Submit transactions and query pending transactions
  • Blocks: Query finalized blocks by height or hash
  • Validators: Get validator set information

§Endpoint Overview

MethodPathDescription
GET/api/consensus/statusConsensus engine status
GET/api/consensus/blocksList recent finalized blocks
GET/api/consensus/blocks/{height}Get block by height
GET/api/consensus/validatorsCurrent validator set
GET/api/consensus/mempoolMempool statistics
POST/api/consensus/transactionsSubmit a transaction

Structs§

BlockInfoResponse
Block info response.
ConsensusStatusResponse
Consensus status response.
MempoolStatsResponse
Mempool statistics response.
SubmitTransactionResponse
Transaction submission response.
ValidatorInfoResponse
Validator info response.
ValidatorSetResponse
Validator set response.

Enums§

SubmitTransactionRequest
Transaction submission request.

Functions§

consensus_routes
Creates the consensus API router.