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.

subtoken source realm

Package subtoken is spikes (b) and (c) of tasarim-v6 §5.5:

Overview

Package subtoken is spikes (b) and (c) of tasarim-v6 §5.5:

Example
1(b) a grc721 token created with a sub-realm identity cur.Sub("c/1"):
2    does NewToken accept it, what is Token.ID(), and can the host spend
3    coins that land on a sub-address ("roy/1") with a banker bound to
4    cur.Sub("roy/1")?
5(c) a grc721 Extension that vetoes every transfer and burn until a
6    reveal flag flips, while mints keep working.

One token, one collection, no owner: anyone may call every function. Never part of the product.

Functions 13

func Create

crossing Action
1func Create(cur realm) string
source

Create builds the token once. The rlm handed to NewToken is a sub-realm token, so the hypothesis is Token.ID() == "<this pkgpath>#c/1.SPK.<seq>".

func Mint

crossing Action
1func Mint(cur realm) string
source

Mint mints the next token to the caller; allowed while locked.

func Render

1func Render(path string) string
source

Render also answers spike §5.5-6: does gnoweb display a data: SVG image?

func Sweep

crossing Action
1func Sweep(cur realm, to address) int64
source

Sweep spends the whole roy/1 sub-treasury to `to` with a banker bound to the sub-realm identity (interrealm v2 §5.5 example).

Dependencies

Source Files 2