feat: receive L402 payments through a trusted Cashu mint #25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/mint-l402"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Allow automatic L402 invoices from a trusted Cashu mint alongside LDK. Persist the quote and invoice association, validate the payer credential and request binding, and require locally verified, durable ecash issuance before completing the receipt. Recovery safeguards paid quotes without authorizing requests that lack a valid credential.
Unify the public Lightning receiver configuration while preserving serialized LDK settings; Rust callers can convert LdkConfig with .into(). Reject unsupported manual capture and x402 before creating a quote. Document the payer preimage requirement and direct Cashu alternative, and add a compilable example.
Closes #20. Depends on #24.
Validation: quote cancellation/restart, lost responses, credential binding, issuance failure, unauthenticated paid quotes, repeated receipts, and storage contracts passed. Formatting, Clippy, tests, docs, native Nix checks, and the real Bitcoin/LDK regtest passed for the final stack (78 tests plus regtest).