pub fn define_api<State, Types: NodeType, Ver: StaticVersionType + 'static>(
_: Ver,
api_ver: Version,
) -> Result<Api<State, Error, Ver>, ApiError>where
State: 'static + Send + Sync + ReadState,
Header<Types>: ExplorerHeader<Types> + QueryableHeader<Types>,
Transaction<Types>: ExplorerTransaction<Types>,
Payload<Types>: QueryablePayload<Types>,
<State as ReadState>::State: ExplorerDataSource<Types> + Send + Sync,
Expand description
define_api
is a function that defines the API endpoints for the Explorer
module of the HotShot Query Service. It implements the specification
defined in the explorer.toml
file.