From 8b64ecab1a289b055bad3cb4b4427dc5a8a0ff96 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 18 Oct 2026 07:53:03 -0700 Subject: Live streams (NIP-53), to watch: a row of what's on above a feed (Following: your follows' streams; Everything and Popular: all), a stream's own page at /naddr1… (the HLS stream playing — hls.js where the browser has no HLS — its chat and zaps as they come, a chat line sent as kind 1311, ⚡ to the host), a card for a post linking a stream, and a LIVE line on a streamer's profile. A stream quiet for an hour is over; one that drops is retried; zaps on a stream carry its a tag. Also: the single-file build's video stub gains streamVideo (its uploads threw since the HLS uploads). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013ZDf1cyCQLkfjftYhymZAg --- src/lnurl.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lnurl.js') diff --git a/src/lnurl.js b/src/lnurl.js index bfebf0d..7b1a798 100644 --- a/src/lnurl.js +++ b/src/lnurl.js @@ -10,6 +10,7 @@ // (bolt11) → hand that to the swap engine. The recipient's server is the one // that broadcasts the receipt; we only sign the request. +import { zapAddrOf } from './live.js'; import { bech32 } from '@scure/base'; import { secp256k1 } from '@noble/curves/secp256k1'; import { hmac } from '@noble/hashes/hmac'; @@ -126,6 +127,9 @@ export function buildZapRequest({ amountMsat, relays, lnurlBech32, recipientPk, 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]); return signFn({ kind: 9734, content: comment || '', tags }); } -- cgit v1.2.3