View Source Nostr.Bech32 (Nostr Lib v0.1.1)

Bech32 encoded entities

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

Example:

iex> Nostr.Bech32.hex_to_npub("3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d")
"npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6"

iex> Nostr.Bech32.npub_to_hex("npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6")
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"

Summary

Functions