sdk

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TxVersion is the only version supported at genesis.
	TxVersion = scale.U8(0)

	// MethodSpawn ...
	MethodSpawn = scale.U8(core.MethodSpawn)
	// MethodSpend ...
	MethodSpend = scale.U8(core.MethodSpend)
)

Functions

func Encode

func Encode(fields ...scale.Encodable) []byte

Types

type Opt

type Opt func(*Options)

Opt modifies Options.

func WithGasPrice

func WithGasPrice(price uint64) Opt

WithGasPrice modifies GasPrice.

func WithGenesisID

func WithGenesisID(id types.Hash20) Opt

WithGenesisID updates genesis id that will be used to prefix tx hash.

type Options

type Options struct {
	GasPrice  uint64
	GenesisID types.Hash20
}

Options to modify common transaction fields.

func Defaults

func Defaults() *Options

Defaults returns default Options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL