Crate cdk_axum

Source
Expand description

Axum server for Mint

§CDK Axum

crates.io Documentation

The CDK Axum crate is a component of the Cashu Development Kit that provides a web server implementation for Cashu mints using the Axum web framework.

§Overview

This crate implements the HTTP API for Cashu mints, providing endpoints for all the Cashu NUTs (Notation, Usage, and Terminology) specifications. It handles routing, request validation, response formatting, and includes features like WebSocket support and HTTP caching.

§Features

  • Complete implementation of Cashu mint HTTP API
  • WebSocket support for real-time notifications (NUT-17)
  • HTTP response caching for improved performance (NUT-19)
  • CORS support for browser-based clients
  • Compression and decompression of HTTP payloads
  • Configurable logging and tracing

§Usage

Add this to your Cargo.toml:

[dependencies]
cdk-axum = "*"

§License

This project is licensed under the MIT License.

Modules§

cache
HTTP cache.

Structs§

MintState
CDK Mint State

Functions§

create_mint_router
Create mint Router with required endpoints for cashu mint with the default cache
create_mint_router_with_custom_cache
Create mint Router with required endpoints for cashu mint with a custom backend for cache