Why Nostr? What is Njump?
2024-04-14 15:59:00
in reply to

mleku on Nostr: i think the technical term for these encodings is "entities" and i'm gonna clone this ...

i think the technical term for these encodings is "entities" and i'm gonna clone this repo and search it to see if i can help

https://pypi.org/project/nostr-sdk/

so i looked at this, and the link leads to the rust-nostr

not sure this is the best library to be using, it's not python native for a start... i don't think bech32 encoding is so complex that it benefits that much from an FFI like this one

https://github.com/nostr-protocol/nips/blob/master/19.md

this is the NIP that specifies all of the Bech32 encoded things... nevent and naddr in particular binary encode addresses to relays into a thing that are "relay hints"

https://github.com/davestgermain/aionostr/blob/8ee0c3f1eaee1365eea1df614961bb95b5da0d2d/aionostr/util.py#L7 this seems sorta interesting

yeah, that looks like it might be a better option for you, idk

https://mleku.dev/git/nostr/src/branch/main/bech32encoding/nip19.go is the code i work with for #golang - i haven't touched it, it's the same code as https://github.com/nbd-wtf/go-nostr for nip-19

HTH
Author Public Key
npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku