On-chain ticket sales via native lnbits on-chain (no SatsPay) #41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Upstream v1.6.8 sells tickets on-chain through SatsPay charges (per-purchase watchonly address, amount matching, hosted page, webhook back to
/tickets/{id}/satspay-webhook,onchain_zeroconf/onchain_fasttrackper event). We use our own native on-chain port (aiolabs/lnbits#53) and don't want SatsPay.Blocked on aiolabs/lnbits "purpose-bound receiving addresses": today a deposit is credited to the wallet with no
tag, soon_invoice_paidnever sees it and nothing links it to a ticket.Once core can mint a tagged, amount-annotated address per purchase:
payment_method: "onchain"inapi_ticket_create→create_onchain_address(event.wallet, tag="events", extra={"name","email","ticket_ids"}, amount_sat=price); rows created withpayment_hash = <address or txid placeholder>;TicketPaymentRequest.onchain_address/onchain_amount_sat(upstream field names) + a BIP-21 URI.on_invoice_paidmatches onextra.tagas today; zero-conf policy =lnbits_onchain_receive_confirmations.onchaintoextra.payment_methods(#36) and thetickets_payment_methodsNIP-52 tag; webapp renders an address QR.Parity note for the #33 rebase: keep upstream's
onchain_enabled/onchain_wallet_idfields out (they are SatsPay/watchonly-specific).Funding source for this is LNDRest, and the fork's
LndRestWalletalready carries the whole on-chain surface this needs —lnbits/wallets/lndrest.pyondev:So there's nothing to build on the wallet side; the gap is entirely the purpose-binding this issue already identifies.
Worth noting
onchain_deposits_streamfor whoever picks up aiolabs/lnbits#53: a push stream means the tagged-address work can credit and dispatch on arrival the wayon_invoice_paiddoes today, rather than pollinglist_onchain_depositson a timer. That's the property SatsPay's webhook was providing, and it's the reason dropping SatsPay costs us nothing architecturally.