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.

dev/v1 package

Overview

Package dev is the chain as a Plan 9 device tree.

In Plan 9 a device is not storage, it is code behind a name: reading /dev/time runs a function. Everything a gno realm normally reaches through an import of chain/runtime is published here as a file instead, so it can be read, listed, bound and unioned like anything else:

Example
1cat /dev/sysname     the chain id
2cat /dev/height      the block height
3cat /dev/session     what a delegated key is allowed to touch

The tree is posted to gno.land/r/nym-moultest123/x/plan9/ns's /srv at deploy time, so any account can bind it into their own namespace, and nobody has to import this realm to use it. That is the cross-realm mount the whole experiment turns on: an interface value published by one realm, stored by another, and called later from a read-only Render.

It is READ-ONLY, like every synthetic tree: the files have no Write, so grafting this into a stranger's namespace cannot be turned into a write against this realm.

/dev/session is the one to look at. A gno.land account session is a delegated key scoped to a list of path prefixes, which is Plan 9's "the namespace IS the capability" rediscovered thirty-four years later. Printing it as a file makes that visible.

NOTICE. Plan 9 from Bell Labs is the work of the Computing Science Research Center at Bell Labs; the name and the marks are theirs, and the copyright is held by the Plan 9 Foundation (https://p9f.org). This realm is not affiliated with, endorsed by, or sponsored by them, and contains no Plan 9 code: it borrows the vocabulary so that the design reads without a glossary, and it is an homage, asking what that ecosystem's spirit looks like on a chain. Full attribution: NOTICE.md at the root of moul/gno-contracts.

Functions

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render lists the devices, or reads one.

Example
1Render("")            the table of devices
2Render("cat/height")  one device's contents

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/plan9/dev/v1.Render()"

Result

Root

func Root() ninep.File
Ask AI Claude ChatGPT

Root returns the device tree, for a realm that would rather import it than bind it. Reading it is safe from anywhere; it has no mutating method.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/plan9/dev/v1.Root()"

Result