bark: Add Lightning receives for Ark addresses
I am working on making a bark lightning address server. In order to make it the least trusted possible I needed a way to receive to another user's ark address so I never take custody of the funds, they just try that I claim it to their address rather than my own.
Add a separate invoice flow that lets a wallet claim an incoming Lightning payment and forward the resulting Ark VTXO to another Ark address. Existing invoice creation remains unchanged, while forwarded receives persist the destination so mailbox-driven claims can complete without the recipient being online.
This was all vibe coded so feel free to roast it / tell me to do it manually
Summary by CodeRabbit
- New Features
- Added
lightning invoice-for-addressand a REST endpoint to create BOLT11 invoices that forward the claimed Ark VTXO to a specified Ark address (optional description, optional wait-to-claim, optional token). - Added support for delivering Lightning receive outputs to an optional caller-chosen destination address.
- Added
- Bug Fixes
- Improved Lightning receive progress handling for the
deliveringphase, including claimability and cancellation behavior.
- Improved Lightning receive progress handling for the
- Documentation
- Updated OpenAPI and client/CLI documentation with the new request model, endpoint, and
deliveringstate.
- Updated OpenAPI and client/CLI documentation with the new request model, endpoint, and
- Tests
- Added integration tests for forwarded receives to offline addresses and for receives to the wallet’s own address.
Edited by coderabbit