Crate cdk_lnd

Crate cdk_lnd 

Source
Expand description

CDK lightning backend for LND

§CDK LND

crates.io Documentation MIT licensed

ALPHA This library is in early development, the API will change and should be used with caution.

LND (Lightning Network Daemon) backend implementation for the Cashu Development Kit (CDK).

§Installation

Add this to your Cargo.toml:

[dependencies]
cdk-lnd = "*"

§Configuration for cdk-mintd

§Config File

[ln]
ln_backend = "lnd"

[lnd]
address = "https://localhost:10009"
cert_file = "/path/to/.lnd/tls.cert"
macaroon_file = "/path/to/.lnd/data/chain/bitcoin/mainnet/admin.macaroon"
fee_percent = 0.02       # Optional, defaults to 2%
reserve_fee_min = 2      # Optional, defaults to 2 sats

§Environment Variables

All configuration can be set via environment variables:

VariableDescriptionRequired
CDK_MINTD_LN_BACKENDSet to lndYes
CDK_MINTD_LND_ADDRESSLND gRPC address (e.g., https://localhost:10009)Yes
CDK_MINTD_LND_CERT_FILEPath to LND TLS certificateYes
CDK_MINTD_LND_MACAROON_FILEPath to LND macaroon fileYes
CDK_MINTD_LND_FEE_PERCENTFee percentage (default: 0.02)No
CDK_MINTD_LND_RESERVE_FEE_MINMinimum fee in sats (default: 2)No

§Example

export CDK_MINTD_LN_BACKEND=lnd
export CDK_MINTD_LND_ADDRESS=https://127.0.0.1:10009
export CDK_MINTD_LND_CERT_FILE=/home/user/.lnd/tls.cert
export CDK_MINTD_LND_MACAROON_FILE=/home/user/.lnd/data/chain/bitcoin/mainnet/admin.macaroon
cdk-mintd

§Minimum Supported Rust Version (MSRV)

This crate supports Rust version 1.75.0 or higher.

§License

This project is licensed under the MIT License.

Modules§

error
LND Errors

Structs§

Lnd
Lnd mint backend