aboutsummaryrefslogtreecommitdiffstats
path: root/names/withdraw.js
Commit message (Collapse)AuthorAgeFilesLines
* names: a withdraw-link claim with no route right now is tried again for up ↵Adam Soltys2026-11-141-7/+31
| | | | | | | to ten minutes. "I made a transaction for 1,000,000 sats using the Withdraw link method, but they never arrived" (a user via Adam, 2026-11-14). The claim's invoice sat behind a private channel; at that moment this node's own channels couldn't carry 1M ("could not find a usable set of paths", answered in a tenth of a second), so the payout failed at once and the sats went back on the link, while the claimer's wallet, told OK as LUD-03 has it, waited for nothing. Minutes later a route was there. Now a payout to another node that definitely failed (no part pending or complete) is paid again after 30 s, 90 s, 3 min and 5 min, as long as the invoice has a minute to spare; the claim stays 'paying' meanwhile and settlePending leaves it alone. Reclaims are not retried (the creator is waiting on them). The claim's view carries tries, so the app can say it's still trying Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS
* names: prepaid Lightning withdraw links (LNURL-withdraw, LUD-03). "Do we ↵Adam Soltys2026-11-071-0/+264
have lnurl withdraw links somewhere? can we add them?" → "Prepaid" (Adam, 2026-11-07). A self-custodial wallet asleep in a pocket can't answer a withdraw link days later, so the creator pays the whole amount up front (POST /withdraw/new → a CLN invoice for sat × uses; the settle loop, or the creator's POST /withdraw/funded checking listinvoices, opens the link) and this service pays each claim out of that reserve: GET /w/<id> serves the withdrawRequest (up to the per-claim amount, never past what's left), GET /w/<id>/cb?k1&pr pays it — a plain pay with the routing fee capped at max(10 sat, 1%) and borne here, or, for an invoice on this very node (any coinos wallet's Lightning receive), round the float top-up's circular route, read back with waitsendpay. The reserve is taken before a payment starts and handed back only on a definite failure; an unknown outcome stays reserved for a minute-ly listsendpays check. No invoice is ever paid twice, one claim per link at a time. The creator lists theirs (GET /withdraw/mine) and takes back the remainder with an invoice of their own (POST /withdraw/reclaim), which closes the link first and reopens it if that payment fails. All NIP-98 by the wallet key. Mainnet and (play money) mutinynet, on the hat stand's nodes. names/withdraw.test.js covers it against a fake node Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q