Thank you!
As Fishcake mentioned, npubs and nsec and other identifiers are encoded with Bech32, as specified in nip-19:
https://github.com/nostr-protocol/nips/blob/master/19.md
You can read short description on Bech32 (as it pertains to Bitcoin) here: https://en.bitcoin.it/wiki/Bech32
And as an example, see how the NDK does parsing of bech32-encoded identifiers here: https://github.com/nostr-dev-kit/ndk/blob/56f938a53146d77c12f98265e12a06c51ce8f4db/ndk-svelte-components/src/lib/utils/notes.ts#L86
Discussion
No replies yet.