statetxbuilder

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0, BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

tx builder for VM

package to build value transaction for the anchor transaction

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func New

func New(chainAddress address.Address, chainColor balance.Color, addressBalances map[valuetransaction.ID][]*balance.Balance) (*Builder, error)

func (*Builder) AddRequestSection

func (txb *Builder) AddRequestSection(req *sctransaction.RequestSection) error

AddRequestSectionWithTransfer adds request block with the request token and adds respective outputs for the colored transfers

func (*Builder) Balance

func (txb *Builder) Balance(col balance.Color) int64

func (*Builder) Build

func (txb *Builder) Build() (*sctransaction.Transaction, error)

func (*Builder) Clone

func (txb *Builder) Clone() *Builder

func (*Builder) Dump

func (txb *Builder) Dump(dumpVtxb bool) string

func (*Builder) Erase1TokenToChain

func (txb *Builder) Erase1TokenToChain(col balance.Color) bool

func (*Builder) MustValidate

func (txb *Builder) MustValidate()

func (*Builder) SetStateParams

func (txb *Builder) SetStateParams(stateIndex uint32, stateHash hashing.HashValue, timestamp int64) error

func (*Builder) TransferToAddress

func (txb *Builder) TransferToAddress(targetAddr address.Address, transfer coretypes.ColoredBalances) error

Jump to

Keyboard shortcuts

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