Module server

Module server 

Source
Expand description

Servers

Functionsยง

contract_handler
Simple handler that consults the metadata generator, and returns EITHER the contract metadata, or a 404
nft_handler
Simple handler that consults the metadata generator, and returns EITHER the token metadata, or a 404
return_200
Handler for healthcheck
return_404
Fallback handler that returns a 404 with body "unknown route"
serve_generator
Serve an NFT generator at the specified socket address.
serve_generator_with_span
Serve an NFT generator at the specified socket address, running in a provided span.
serve_router
Serve an app with some shared state at the specified socket address. Intended to allow full customization of the router. If a simple no-customization JSON metadata server is required, instead use serve_generator.
serve_router_with_span
Serve an app with some shared state at the specified socket address instrumented with the provided span.