| Crates.io | cdk-payment-processor |
| lib.rs | cdk-payment-processor |
| version | 0.13.0 |
| created_at | 2025-03-24 19:36:00.422619+00 |
| updated_at | 2025-09-23 13:57:15.906748+00 |
| description | CDK payment processor |
| homepage | https://github.com/cashubtc/cdk |
| repository | https://github.com/cashubtc/cdk.git |
| max_upload_size | |
| id | 1604291 |
| size | 153,511 |
The cdk-payment-processor is a Rust crate that provides both a binary and a library for handling payments to and from a cdk mint.
nix develop
The server requires different environment variables depending on your chosen Lightning Network backend.
# Choose backend: CLN, LND, or FAKEWALLET
export CDK_PAYMENT_PROCESSOR_LN_BACKEND="CLN"
# Server configuration
export CDK_PAYMENT_PROCESSOR_LISTEN_HOST="127.0.0.1"
export CDK_PAYMENT_PROCESSOR_LISTEN_PORT="8090"
# Path to CLN RPC socket
export CDK_PAYMENT_PROCESSOR_CLN_RPC_PATH="/path/to/lightning-rpc"
# LND connection details
export CDK_PAYMENT_PROCESSOR_LND_ADDRESS="localhost:10009"
export CDK_PAYMENT_PROCESSOR_LND_CERT_FILE="/path/to/tls.cert"
export CDK_PAYMENT_PROCESSOR_LND_MACAROON_FILE="/path/to/macaroon"
Build and run the binary with your chosen backend:
# For CLN backend
cargo run --bin cdk-payment-processor --no-default-features --features cln
# For LND backend
cargo run --bin cdk-payment-processor --no-default-features --features lnd
# For fake wallet (testing only)
cargo run --bin cdk-payment-processor --no-default-features --features fake
To implement a new backend:
For library usage examples and API documentation, refer to the crate documentation.