Reverend Hodl on Nostr: const nostrEvent = { kind: 1, content: "🎥 Live Stream is now available!", tags: [ ...
const nostrEvent = {
kind: 1,
content: "🎥 Live Stream is now available!",
tags: [
["r", "https://cdn.satellite.earth/839486cdf2c8b73843d7fca5bce4537fb4b860097020928e849bfd371a7daa72.json";],
["stream", "video/mp4"]
],
created_at: Math.floor(Date.now() / 1000),
pubkey: "your-nostr-pubkey"
};
// Sign the event (using a Nostr signing library)
nostrEvent.sig = signEvent(nostrEvent, "your-private-key");
// Send to relay
const relay = new WebSocket("wss://relay.nostr.info");
relay.onopen = () => {
relay.send(JSON.stringify(["EVENT", nostrEvent]));
};
kind: 1,
content: "🎥 Live Stream is now available!",
tags: [
["r", "https://cdn.satellite.earth/839486cdf2c8b73843d7fca5bce4537fb4b860097020928e849bfd371a7daa72.json";],
["stream", "video/mp4"]
],
created_at: Math.floor(Date.now() / 1000),
pubkey: "your-nostr-pubkey"
};
// Sign the event (using a Nostr signing library)
nostrEvent.sig = signEvent(nostrEvent, "your-private-key");
// Send to relay
const relay = new WebSocket("wss://relay.nostr.info");
relay.onopen = () => {
relay.send(JSON.stringify(["EVENT", nostrEvent]));
};