diff options
| author | Adam Soltys <[email protected]> | 2026-10-19 12:21:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-19 12:21:47 -0700 |
| commit | eca472c893fd128fa863b5d92835b6d9e71b445f (patch) | |
| tree | 5eb66ba68522969402dfc9aef7a4291d4b914ca4 /src/lnurl.js | |
| parent | 38d99f6e7f61bfc854e0349ac75d33f2b76ae1f8 (diff) | |
| download | coinosv3-eca472c893fd128fa863b5d92835b6d9e71b445f.tar.gz coinosv3-eca472c893fd128fa863b5d92835b6d9e71b445f.zip | |
Add timestamp comments, reactions and zaps with audio waveform seeking
Diffstat (limited to 'src/lnurl.js')
| -rw-r--r-- | src/lnurl.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lnurl.js b/src/lnurl.js index 7b1a798..592d143 100644 --- a/src/lnurl.js +++ b/src/lnurl.js @@ -1,3 +1,4 @@ +import { momentTags } from './media-timeline.js'; // LNURL-pay + NIP-57 ("lightning zap") logic — no DOM, so it stays testable. // // The wallet already pays bolt11 invoices over a Boltz submarine swap; this @@ -123,13 +124,14 @@ export async function fetchPayParams(url) { } // A signed kind-9734 zap request (NIP-57). signFn(partial) → finalized event. -export function buildZapRequest({ amountMsat, relays, lnurlBech32, recipientPk, eventId, comment, signFn }) { +export function buildZapRequest({ amountMsat, relays, lnurlBech32, recipientPk, eventId, comment, signFn, moment }) { const tags = [['relays', ...relays], ['amount', String(amountMsat)], ['p', recipientPk]]; if (lnurlBech32) tags.push(['lnurl', lnurlBech32]); if (eventId) tags.push(['e', eventId]); // a live stream's address too, so its chat and zap.stream count the zap const addr = zapAddrOf(eventId); if (addr) tags.push(['a', addr]); + tags.push(...momentTags(moment)); return signFn({ kind: 9734, content: comment || '', tags }); } |
