vtxbuilder

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package to build value 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 NewFromAddressBalances

func NewFromAddressBalances(addr *address.Address, addressBalances map[valuetransaction.ID][]*balance.Balance) (*Builder, error)

func NewFromOutputBalances

func NewFromOutputBalances(outputBalances map[valuetransaction.OutputID][]*balance.Balance) (*Builder, error)

func (*Builder) Build

func (vtxb *Builder) Build(useAllInputs bool) *valuetransaction.Transaction

func (*Builder) Clone

func (vtxb *Builder) Clone() *Builder

func (*Builder) Dump

func (vtxb *Builder) Dump() string

func (*Builder) EraseColor

func (vtxb *Builder) EraseColor(targetAddr address.Address, col balance.Color, amount int64) error

func (*Builder) EraseColorFromTransaction

func (vtxb *Builder) EraseColorFromTransaction(targetAddr address.Address, col balance.Color, amount int64, txid valuetransaction.ID) error

func (*Builder) ForEachInputBalance

func (vtxb *Builder) ForEachInputBalance(consumer func(oid *valuetransaction.OutputID, bals []*balance.Balance) bool)

ForEachInputBalance iterates through reminders

func (*Builder) GetInputBalance

func (vtxb *Builder) GetInputBalance(col balance.Color) int64

GetInputBalance what is available in inputs

func (*Builder) GetInputBalanceFromTransaction

func (vtxb *Builder) GetInputBalanceFromTransaction(col balance.Color, txid valuetransaction.ID) int64

GetInputBalanceFromTransaction calculates what is available in inputs from outputs of the given transaction

func (*Builder) MintColor

func (vtxb *Builder) MintColor(targetAddr address.Address, sourceColor balance.Color, amount int64) error

MintColor creates output of NewColor tokens out of inputs with specified color

func (*Builder) MintColorFromTransaction

func (vtxb *Builder) MintColorFromTransaction(targetAddr address.Address, col balance.Color, amount int64, txid valuetransaction.ID) error

func (*Builder) MoveToAddress

func (vtxb *Builder) MoveToAddress(targetAddr address.Address, col balance.Color, amount int64) error

MoveToAddress move token without changing color

func (*Builder) MoveToAddressFromTransaction

func (vtxb *Builder) MoveToAddressFromTransaction(targetAddr address.Address, col balance.Color, amount int64, txid valuetransaction.ID) error

func (*Builder) SetConsumerPriorityLargerBalances

func (vtxb *Builder) SetConsumerPriorityLargerBalances()

func (*Builder) SetConsumerPrioritySmallerBalances

func (vtxb *Builder) SetConsumerPrioritySmallerBalances()

Jump to

Keyboard shortcuts

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