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

txlink source pure

Functions 2

func Call

1func Call(fn string, args ...string) string
source

Call returns a URL for the specified function with optional key-value arguments, for the current realm.

Types 2

type Realm

ident
1type Realm string
source

Realm represents a specific realm for generating tx links.

Methods on Realm

func Call

method on Realm
1func (r Realm) Call(fn string, args ...string) string
source

Call returns a URL for the specified function with optional key-value arguments.

type TxBuilder

struct
1type TxBuilder struct {
2	fn        string   // function name
3	args      []string // key-value pairs
4	send      string   // optional send amount
5	realm_XXX Realm    // realm for the URL
6}
source

TxBuilder provides a fluent interface for building transaction URLs

Methods on TxBuilder

func AddArgs

method on TxBuilder
1func (b *TxBuilder) AddArgs(args ...string) *TxBuilder
source

AddArgs adds multiple key-value pairs at once. Arguments should be provided as pairs: AddArgs("key1", "value1", "key2", "value2").

func SetSend

method on TxBuilder
1func (b *TxBuilder) SetSend(amount string) *TxBuilder
source

SetSend adds a send amount. (Only one send amount can be specified.)

func URL

method on TxBuilder
1func (b *TxBuilder) URL() string
source

URL generates the final URL using the standard $help&func=name format.

Imports 4

  • chain/runtime stdlib
  • chain/runtime/unsafe stdlib
  • net/url stdlib
  • strings stdlib

Source Files 3