diff options
| author | Adam Soltys <[email protected]> | 2026-10-02 07:19:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-02 07:19:29 -0700 |
| commit | e8d82b8b23c271aa57134d762e14fd6dcbed9c7a (patch) | |
| tree | 75ce06480f1e65552e43073647b5110ec7e76a63 /src/ark/lightning.js | |
| parent | baef720df9e34be38fc2e5b4e4837674121e5c59 (diff) | |
| download | coinosv3-e8d82b8b23c271aa57134d762e14fd6dcbed9c7a.tar.gz coinosv3-e8d82b8b23c271aa57134d762e14fd6dcbed9c7a.zip | |
NWC: lookup_invoice, so BTCPay Server can connect
BTCPay's NWC connector requires get_info, make_invoice, lookup_invoice
and list_transactions; we never offered lookup_invoice, so it refused the
connection string.
- ArkManager.lnLookup answers lookup_invoice from wallet state (by hash or
bolt11, either direction; pending/settled/expired/failed, preimage once
claimed). A retry's several actions on one hash defer to the furthest.
- The open app pushes a pending receive along before answering, so a
merchant polling sees it settle.
- The service worker now answers make_invoice and lookup_invoice too, and
claims a paid invoice's HTLCs during the lookup: a BTCPay sale settles
with the wallet closed. Its list_transactions reports receives as well.
- get_info and the 13194 info event list the new method.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dmcrt9KyNDKVWFKnb8BREo
Diffstat (limited to 'src/ark/lightning.js')
| -rw-r--r-- | src/ark/lightning.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ark/lightning.js b/src/ark/lightning.js index 0ac80a5..568d0ab 100644 --- a/src/ark/lightning.js +++ b/src/ark/lightning.js @@ -61,6 +61,7 @@ export function decodeBolt11(invoice) { amountMsat, amountSat: amountMsat != null ? Number(amountMsat / 1000n) : null, expiresAt: (ts + expiry) * 1000, + createdAt: ts * 1000, }; } |
