sample
untyped stringsample is a real mainnet address: human-readable part "g", 20 payload bytes.
Value
"g1manfred47kzduec920z88wfr64ylksmdcedlf5"
vectors
[][2]stringThe BIP-173 (Bech32) and BIP-350 (Bech32m) test vectors, paired by shape so the only difference on each row is the six-character checksum.
- OID
- 0ca0a0…b1fc:4
vectors details
extBase
untyped stringThe insertion that Bech32 accepts and Bech32m refuses. Both strings below carry a checksum Bech32 verifies; only the second has the extra "q".
Value
"a1q3g6mnsp"
extInserted
untyped stringThe insertion that Bech32 accepts and Bech32m refuses. Both strings below carry a checksum Bech32 verifies; only the second has the extra "q".
Value
"a1q3g6mnsqp"
extMBase
untyped stringThe insertion that Bech32 accepts and Bech32m refuses. Both strings below carry a checksum Bech32 verifies; only the second has the extra "q".
Value
"a1q6dp699p"
extMInsert
untyped stringThe insertion that Bech32 accepts and Bech32m refuses. Both strings below carry a checksum Bech32 verifies; only the second has the extra "q".
Value
"a1q6dp699qp"
Render
func(path string) stringRender renders the demo for gnoweb. Render("") / Render("/") -> the full demo Render("/<string>") -> decode that string
- OID
- 0ca0a0…b1fc:8
Render details
decodeOne
func(in string) stringdecodeOne renders one string's decode. Everything derived from the input is escaped: the argument reaches this realm from whoever typed the url.
- OID
- 0ca0a0…b1fc:10
decodeOne details
hexOf
func(payload []uint8) stringhexOf renders a payload through the hexdump library, which owns the digits.
- OID
- 0ca0a0…b1fc:11
hexOf details
parseArg
func(path string) stringparseArg strips the one routing slash in front of the argument and returns the rest verbatim. Nothing else is removed: a slash is legal in a human-readable part, so cutting at one refuses a valid string, and trimming whitespace would render a clean decode of a string nobody typed.
- OID
- 0ca0a0…b1fc:12