Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
CDK Mintd
ALPHA This library is in early development, the API will change and should be used with caution.
Cashu mint daemon implementation for the Cashu Development Kit (CDK). This binary provides a complete Cashu mint server implementation with support for multiple database backends and Lightning Network integrations.
Features
- Multiple Database Backends: SQLite and PostgreSQL
- Lightning Network Integration: Support for CLN, LND, LNbits, and test backends
- Authentication: Optional user authentication with OpenID Connect
- Management RPC: gRPC interface for mint management
- Docker Support: Ready-to-use Docker configurations
Installation
From crates.io:
From source:
Quick Start
Using SQLite (Default)
# Start with SQLite (no additional setup required)
Using PostgreSQL
# Set environment variables
# Start the mint
Using Docker
# SQLite
# PostgreSQL
Configuration
The mint can be configured through environment variables or a configuration file. See example.config.toml for all available options.
Database Configuration
SQLite (Default)
[]
= "sqlite"
PostgreSQL
[]
= "postgres"
Set CDK_MINTD_DATABASE_URL environment variable for connection string.
ReDB
[]
= "redb"
Lightning Backend Configuration
[]
= "fakewallet" # Options: cln, lnd, lnbits, fakewallet
Logging Configuration
You can configure where mintd outputs its logs using the [info.logging] section in your config file or environment variables:
Config file:
[]
# Where to output logs: "stdout", "file", or "both" (default: "both")
= "both"
# Log level for console output (default: "info")
= "info"
# Log level for file output (default: "debug")
= "debug"
Environment variables:
# Where to output logs: "stdout", "file", or "both" (default: "both")
# Log level for console output (default: "info")
# Log level for file output (default: "debug")
Available logging outputs:
"stdout"- Output logs only to console/terminal (stderr)"file"- Output logs only to rotating daily log files in<work_dir>/logs/"both"- Output logs to both console and files (default behavior)
Available log levels: error, warn, info, debug, trace
Examples:
Console only with debug level:
File only with debug level:
[]
= "file"
= "debug"
Both console (warn) and file (debug):
Usage
# Start the mint with default configuration
# Start with custom config file
# Start with specific work directory
# Disable logging entirely
# Show help
Environment Variables
Key environment variables:
CDK_MINTD_DATABASE: Database engine (sqlite/postgres/redb)CDK_MINTD_DATABASE_URL: PostgreSQL connection stringCDK_MINTD_LN_BACKEND: Lightning backend typeCDK_MINTD_LISTEN_HOST: Host to bind toCDK_MINTD_LISTEN_PORT: Port to bind to
Documentation
License
This project is licensed under the MIT License.