Version: v0.7.4 Latest Latest

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

Go to latest
Published: Jul 8, 2021 License: Apache-2.0, BSD-2-Clause Imports: 5 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type DelegateFundsOption

type DelegateFundsOption func(*DelegateFundsOptions) error

DelegateFundsOption is the type for the optional parameters for the DelegateFunds call.

func AccessManaPledgeID

func AccessManaPledgeID(nodeID string) DelegateFundsOption

AccessManaPledgeID is an option for SendFunds call that defines the nodeID to pledge access mana to.

func ConsensusManaPledgeID

func ConsensusManaPledgeID(nodeID string) DelegateFundsOption

ConsensusManaPledgeID is an option for SendFunds call that defines the nodeID to pledge consensus mana to.

func DelegateUntil

func DelegateUntil(until time.Time) DelegateFundsOption

DelegateUntil is an option for the DelegateFunds call that specifies until when the delegation should last.

func Destination

func Destination(addr address.Address, balance map[ledgerstate.Color]uint64) DelegateFundsOption

Destination is an option for the SendFunds call that defines a destination for funds that are supposed to be moved.

func Remainder

func Remainder(addr address.Address) DelegateFundsOption

Remainder is an option for the SendsFunds call that allows us to specify the remainder address that is supposed to be used in the corresponding transaction.

func WaitForConfirmation

func WaitForConfirmation(wait bool) DelegateFundsOption

WaitForConfirmation defines if the call should wait for confirmation before it returns.

type DelegateFundsOptions

type DelegateFundsOptions struct {
	Destinations          map[address.Address]map[ledgerstate.Color]uint64
	DelegateUntil         time.Time
	RemainderAddress      address.Address
	AccessManaPledgeID    string
	ConsensusManaPledgeID string
	WaitForConfirmation   bool

DelegateFundsOptions is a struct that is used to aggregate the optional parameters provided in the DelegateFunds call.

func Build

func Build(options ...DelegateFundsOption) (result *DelegateFundsOptions, err error)

Build is a utility function that constructs the DelegateFundsOptions.

func (*DelegateFundsOptions) RequiredFunds

func (s *DelegateFundsOptions) RequiredFunds() map[ledgerstate.Color]uint64

RequiredFunds derives how much funds are needed based on the Destinations to fund the transfer.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL