Nostr stream provider init

This commit is contained in:
2023-07-03 16:55:43 +01:00
parent cbc49a0def
commit 7cc613646c
15 changed files with 566 additions and 198 deletions

View File

@ -40,3 +40,15 @@ export function splitByUrl(str: string) {
return str.split(urlRegex);
}
export function eventLink(ev: NostrEvent) {
const d = findTag(ev, "d") ?? "";
const naddr = encodeTLV(
NostrPrefix.Address,
d,
undefined,
ev.kind,
ev.pubkey
);
return `/${naddr}`;
}