pub async fn serve_axum<S>(
port: u16,
state: S,
modules: OptionalModules,
max_connections: Option<usize>,
) -> Result<()>where
S: RewardApi + AvailabilityApi + HotShotAvailabilityApi + BlockStateApi + FeeStateApi + StatusApi + ConfigApi + NodeApi + CatchupApi + SubmitApi + StateSignatureApi + LightClientApi + ExplorerApi + TokenApi + DatabaseApi + StatusService + TokenService + NodeService + ConfigService + DatabaseService + AvailabilityService + MerklizedStateService + RewardStateService + StateSignatureService + SubmitService + ExplorerService + CatchupService + LightClientService + Send + Sync + 'static,Expand description
Start Axum HTTP server with combined v1 and v2 APIs
This serves both APIs at /v1/* and /v2/* from a single state implementation.
catchup, like the query-service modules (status, availability, node, token,
block-state, fee-state, reward-state, database) and v2, is always on: tide-disco’s
SQL mode registered it unconditionally. light-client is always on too, since peers fetch
missing data from it. submit, config, and explorer follow Options, matching
Options::init_with_query_module_sql, and v2’s gated services follow the same flag as their
v1 module.