From a465c73178dc621578d10312f263355f0f2d5309 Mon Sep 17 00:00:00 2001 From: polwex Date: Tue, 18 Nov 2025 09:43:16 +0700 Subject: fixes to profile handling and rendering --- gui/src/logic/nostr.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gui/src/logic') diff --git a/gui/src/logic/nostr.ts b/gui/src/logic/nostr.ts index b85047f..7da9b91 100644 --- a/gui/src/logic/nostr.ts +++ b/gui/src/logic/nostr.ts @@ -12,6 +12,16 @@ export function generateNevent(event: Event) { return nev; } +export function generateNpub(pubkey: string) { + const npub = nip19.npubEncode(pubkey); + return npub; +} +export function generateNprofile(pubkey: string) { + const prof = { pubkey }; + const nprofile = nip19.nprofileEncode(prof); + return nprofile; +} + // let sk = generateSecretKey() // let nsec = nip19.nsecEncode(sk) // let { type, data } = nip19.decode(nsec) -- cgit v1.2.3