Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 source realm

Package bech32demo is a small gnoweb demo of the Bech32 and Bech32m codec provided by the [p/moul/x/daily/bech32](/p/...

Readme View source

Bech32

⚠️ Experimental, generated with no human supervision by the daily pipeline to exercise gno tooling. Not audited. See r/moul/x/daily.


Takes a real gno.land address apart, shows the BIP-173 and BIP-350 vectors side by side, and reproduces the length-extension weakness that Bech32m was created to close.

/r/moul/x/daily/bech32demo/v0            → the address, the vectors, the weakness
/r/moul/x/daily/bech32demo/v0:a1lqfn3a   → decode your own string

Demo of the p/moul/x/daily/bech32 library, no codec logic lives here. Stateless, so Render is deterministic.

The last table is the argument for the library, and it is computed on the page rather than asserted: a1q3g6mnsp and a1q3g6mnsqp both come back accepted under Bech32, and the Bech32m pair beside them does not.

A human-readable part is any printable ASCII, so it can hold a pipe, a backtick or a slash. It is escaped with ui.Cell before it reaches a table cell, and the argument itself with ui.Inline, which is what the realm's own test breaks to check.

The whole render path after the colon is taken as the string to decode, and nothing is trimmed. A slash is legal in a human-readable part, so splitting on one would refuse a valid string, and trimming whitespace would render a clean decode beside a value the page had quietly altered.

The hex column comes from p/moul/x/daily/hexdump, which owns the digits: ufmt/v0 has no %x for a byte slice.

Built for gno 0.9.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

On mainnet: deployment status transactions unique callers deployed revision

Dependency graph:

gno.land/r/moul/x/daily/bech32demo/v0 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package bech32demo is a small gnoweb demo of the Bech32 and Bech32m codec provided by the p/moul/x/daily/bech32(/p/moul/x/daily/bech32/v0) library: it takes a real gno.land address apart, shows the BIP-173 and BIP-350 test vectors side by side, and reproduces the length-extension weakness that is the whole reason the second variant exists.

It contains no codec logic of its own. Stateless, so Render is deterministic.

Functions 1

func Render

1func Render(path string) string
source

Render renders the demo for gnoweb.

Example
1Render("")        / Render("/")  -> the full demo
2Render("/<string>")              -> decode that string

Dependencies

Source Files 5