ModulesΒ§
StructsΒ§
- Account
Context - Authenticated
User - Header
Extractor π - A header extractor that implements OpenTelemetryβs Extractor trait for axum headers.
- Rate
Limit State - State required for rate limiting middleware.
- Readiness
Middleware State - Middleware that blocks all requests (except /health, /ready, /metrics) until the service is ready.
- Signature
Middleware State - Signer
Context
ConstantsΒ§
FunctionsΒ§
- add_
rate_ πlimit_ headers - Add rate limit headers to a response.
- api_
rate_ limit_ middleware - Middleware to check general API rate limits.
- cancel_
rate_ limit_ middleware - Middleware to check order cancellation rate limits.
- extract_
wallet π - Extract wallet address from SignerContext extension.
- is_
readiness_ πbypass_ path - is_
standby_ πmonitoring_ get - json_
error_ πresponse - Helper function to create a JSON error response
- order_
rate_ limit_ middleware - Middleware to check order placement rate limits.
- rate_
limit_ πexceeded_ response - Create a 429 Too Many Requests response with rate limit headers.
- readiness_
middleware - signature_
and_ agent_ middleware - Middleware for signature-based authentication with agent authorization
- signature_
and_ πagent_ middleware_ inner - standby_
is_ πcaught_ up_ and_ unpromoted - trace_
context_ middleware - Middleware that extracts W3C Trace Context from incoming HTTP headers.
- write_
route_ rate_ limit_ middleware - Combined middleware for write routes that applies appropriate rate limit based on the request path and method.