Skip to content

Instantly share code, notes, and snippets.

View StellarStoic's full-sized avatar
:octocat:
Interested in everything interesting

StellarStoic StellarStoic

:octocat:
Interested in everything interesting
View GitHub Profile
@StellarStoic
StellarStoic / The AI generated notes about my nostr note1 & nevent decoder
Last active March 13, 2025 18:03
Nostr Nip-19 note1 and nevent playground in JavaScript. I needed a note1 & nevent1 decoder like the fiatjaf's NAK tool. There's not many how-to's about encoding, decoding bech32-encoded entities
Workflow Notes
1. Objective
Goal:
Build a converter that can transform Nostr event identifiers between three formats:
HEX: A 64‑character hexadecimal string (32 bytes).
note1: A human‑friendly display format using standard bech32 encoding.
nevent: A format using bech32m that includes TLV (type–length–value) metadata (such as relay URIs, public key, and event kind).
2. Challenges and Struggles
Different Encoding Schemes: