Skip to main content

Module internal_api

Module internal_api 

Source
Expand description

Internal API for peer-to-peer communication and challenge broadcasting.

This module provides HTTP endpoints for validators to communicate with each other, including peer registration, listing, and challenge broadcast.

Endpoints:

  • POST /internal/peer/register - Register a peer validator
  • GET /internal/peers - List known peers
  • POST /internal/challenge/broadcast - Receive challenge from peer

Structs§

ApiResponse
Generic response for API operations
BroadcastChallengeRequest
Request payload for challenge broadcast
InternalApiState
State for the internal API, shared across peer communication handlers.
PeerInfo
Information about a peer validator in the network.
RegisterPeerRequest
Request payload for peer registration
SubmitBatchRequest
Request payload for batch submission

Functions§

internal_router
Builds the Axum router for internal API endpoints.