Crate cdk_fake_wallet

Crate cdk_fake_wallet 

Source
Expand description

CDK Fake LN Backend

Used for testing where quotes are auto filled.

The fake wallet now includes a secondary repayment system that continuously repays any-amount invoices (amount = 0) at random intervals between 30 seconds and 3 minutes to simulate real-world behavior where invoices might get multiple payments. Payments continue to be processed until they are evicted from the queue when the queue reaches its maximum size (default 100 items). This is in addition to the original immediate payment processing which is maintained for all invoice types.

§CDK Fake Wallet

crates.io Documentation MIT licensed

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

A fake Lightning wallet implementation for the Cashu Development Kit (CDK). This is intended for testing purposes only - quotes are automatically filled without actual Lightning Network interaction.

§Installation

Add this to your Cargo.toml:

[dependencies]
cdk-fake-wallet = "*"

§Warning

This is for testing purposes only. Do not use in production environments.

§License

This project is licensed under the MIT License.

Modules§

error
Fake Wallet Error

Structs§

FakeInvoiceDescription
Struct for signaling what methods should respond via invoice description
FakeWallet
Fake Wallet

Functions§

create_fake_invoice
Create fake invoice