invoke

package
v0.12.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlphabetEmit added in v0.12.0

func AlphabetEmit(cli *client.Client, con util.Uint160) error

AlphabetEmit invokes emit method on alphabet contract.

func ApprovePeer added in v0.12.0

func ApprovePeer(cli *client.Client, con util.Uint160, peer []byte) error

ApprovePeer invokes addPeer method.

func BalancePrecision added in v0.12.0

func BalancePrecision(cli *client.Client, con util.Uint160) (uint32, error)

BalancePrecision invokes Decimal method that returns precision of NEP-5 contract.

func Burn added in v0.12.0

func Burn(cli *client.Client, con util.Uint160, p *MintBurnParams) error

Burn minted assets.

func CashOutCheque

func CashOutCheque(cli *client.Client, con util.Uint160, p *ChequeParams) error

CashOutCheque invokes Cheque method.

func Epoch

func Epoch(cli *client.Client, con util.Uint160) (int64, error)

Epoch return epoch value from contract.

func InnerRingIndex added in v0.12.0

func InnerRingIndex(cli *client.Client, con util.Uint160, key *ecdsa.PublicKey) (int32, error)

InnerRingIndex returns index of the `key` in the inner ring list from sidechain. If key is not in the inner ring list, then returns `-1`.

func IsInnerRing

func IsInnerRing(cli *client.Client, con util.Uint160, key *ecdsa.PublicKey) (bool, error)

IsInnerRing returns true if 'key' is presented in inner ring list.

func LockAsset

func LockAsset(cli *client.Client, con util.Uint160, p *LockParams) error

LockAsset invokes Lock method.

func Mint added in v0.12.0

func Mint(cli *client.Client, con util.Uint160, p *MintBurnParams) error

Mint assets in contract.

func NetmapSnapshot added in v0.12.0

func NetmapSnapshot(cli *client.Client, con util.Uint160) (*netmap.Netmap, error)

NetmapSnapshot returns current netmap node infos. Consider using pkg/morph/client/netmap for this.

func RegisterContainer added in v0.12.0

func RegisterContainer(cli *client.Client, con util.Uint160, p *ContainerParams) error

RegisterContainer invokes Put method.

func RemoveContainer added in v0.12.0

func RemoveContainer(cli *client.Client, con util.Uint160, p *RemoveContainerParams) error

RegisterContainer invokes Delete method.

func SetConfig added in v0.12.0

func SetConfig(cli *client.Client, con util.Uint160, args *SetConfigArgs) error

SetConfig invokes setConfig method.

func SetNewEpoch

func SetNewEpoch(cli *client.Client, con util.Uint160, epoch uint64) error

SetNewEpoch invokes newEpoch method.

func TransferBalanceX

func TransferBalanceX(cli *client.Client, con util.Uint160, p *TransferXParams) error

TransferBalanceX invokes transferX method.

func UpdateInnerRing added in v0.12.0

func UpdateInnerRing(cli *client.Client, con util.Uint160, list []*keys.PublicKey) error

UpdateInnerRing invokes updateInnerRing method.

func UpdatePeerState added in v0.12.0

func UpdatePeerState(cli *client.Client, con util.Uint160, args *UpdatePeerArgs) error

UpdatePeerState invokes addPeer method.

Types

type ChequeParams

type ChequeParams struct {
	ID          []byte
	Amount      int64 // Fixed8
	User        util.Uint160
	LockAccount util.Uint160
}

ChequeParams for CashOutCheque invocation.

type ContainerParams added in v0.12.0

type ContainerParams struct {
	Key       *keys.PublicKey
	Container []byte
	Signature []byte
}

ContainerParams for container put invocation.

type LockParams

type LockParams struct {
	ID          []byte
	User        util.Uint160
	LockAccount util.Uint160
	Amount      int64  // in Fixed16
	Until       uint64 // epochs
}

LockParams for LockAsset invocation.

type MintBurnParams added in v0.12.0

type MintBurnParams struct {
	ScriptHash []byte
	Amount     int64 // in Fixed16
	Comment    []byte
}

MintBurnParams for Mint and Burn invocations.

type RemoveContainerParams added in v0.12.0

type RemoveContainerParams struct {
	ContainerID []byte
	Signature   []byte
}

ContainerParams for container put invocation.

type SetConfigArgs added in v0.12.0

type SetConfigArgs struct {
	Key   []byte
	Value []byte
}

type TransferXParams

type TransferXParams struct {
	Sender   []byte
	Receiver []byte
	Amount   int64 // in Fixed16
	Comment  []byte
}

TransferXParams for TransferBalanceX invocation.

type UpdatePeerArgs added in v0.12.0

type UpdatePeerArgs struct {
	Key    *keys.PublicKey
	Status uint32
}

Jump to

Keyboard shortcuts

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