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
| Method | Path | Description |
|---|---|---|
| GET | /api/consensus/status | Consensus engine status |
| GET | /api/consensus/blocks | List recent finalized blocks |
| GET | /api/consensus/blocks/{height} | Get block by height |
| GET | /api/consensus/validators | Current validator set |
| GET | /api/consensus/mempool | Mempool statistics |
| POST | /api/consensus/transactions | Submit a transaction |
Structs§
- Block
Info Response - Block info response.
- Consensus
Status Response - Consensus status response.
- Mempool
Stats Response - Mempool statistics response.
- Submit
Transaction Response - Transaction submission response.
- Validator
Info Response - Validator info response.
- Validator
SetResponse - Validator set response.
Enums§
- Submit
Transaction Request - Transaction submission request.
Functions§
- consensus_
routes - Creates the consensus API router.