Skip to content

Add payment_hash support and improve HODL payment handling#118

Closed
free-free-6 wants to merge 1 commit intoRGB-Tools:masterfrom
free-free-6:master
Closed

Add payment_hash support and improve HODL payment handling#118
free-free-6 wants to merge 1 commit intoRGB-Tools:masterfrom
free-free-6:master

Conversation

@free-free-6
Copy link
Copy Markdown

HODL Invoice Call Flow

C (Merchant) -- BTC Invoice --> A (Consumer/RGB User) -- swap request --> B (Gateway) -- BTC --> C
  1. POST /lninvoice — Create HODL invoice with payment_hash (extracted from C's BTC invoice). HTLC will be held, not auto-claimed.
  2. A pays B's RGB invoice — PaymentClaimable event fires, payment stays Pending (no preimage).
  3. POST /sendpayment — B pays C's original BTC invoice. C claims it, exposing preimage.
  4. Auto-claim — PaymentSent event detects matching pending inbound payment, automatically calls claim_funds(preimage).

@zoedberg
Copy link
Copy Markdown
Member

This doesn't seem to introduce/improve HODL invoices. HODL invoices are invoices that are not auto-claimed. This PR is just adding the possibility to decide the invoice payment hash, which makes sense only in the context of HODL invoices.
We already have a PR actually adding support to HODL invoices (#91), so this PR is not needed.

@zoedberg zoedberg closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants