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.

bencodedemo/v0 package

Overview

Package bencodedemo is a small gnoweb demo of the bencode codec provided by the p/moul/x/daily/bencode(/p/moul/x/daily/bencode/v0) library: the four types, the round trip that makes an infohash reproducible, and the non-canonical inputs the decoder refuses instead of tidying up.

It contains no codec logic of its own. Stateless, so Render is deterministic: every figure below is computed from the fixed tables at the top of this file, never from chain state.

Function

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render renders the demo for gnoweb.

Example
1Render("") / Render("/")        -> the types, the round trip, the refusals
2Render("/<bencoded value>")     -> decode that input and show the tree

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1magld5ptgzaktqcexxq0pgq5lmdf0kz6re8hlv/x/daily/bencodedemo/v0.Render()"

Result