BECH32(3em)

πŸ“¦ version 1.1.1, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to the bech32 page from the 3em manual section β€” it's the bech32 codec, and that's the entire name situation. periodt. πŸ’…

✨ SYNOPSIS ✨

First you pull in the module, like:

local bech32 = require 'bech32'

Then there are two segwit_encode forms, numbered and everything:

bech32.segwit_encode(output: byte_span, hrp: string, witver: integer, input: byte_span) -> byte_span (1)
bech32.segwit_encode(hrp: string, witver: integer, input: byte_span) -> string (2)

πŸŽ€ DESCRIPTION πŸŽ€

okay so the whole mission is: encode a SegWit address. that's it, that's the vibe. πŸ¦‹

output should have at least segwit_encode_output_length(hrp, input) bytes. like, give it the room it needs, no cap.

🚨 caveat time: hrp must be all-lower case. lowercase only, bestie β€” uppercase is not on the guest list. πŸ™ˆ

And what does it return? The slice of output that was used to encode the bech32 address. exactly that slice, iconic. πŸ’–


kisses, this cutie came from Emilua 0.12.1 and is dated 1980-01-01 β€” BECH32(3em) forever πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from