chainhelper

package
v0.0.0-...-91837a0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CChainHelper

type CChainHelper struct {
}

This helper automates some the most used functions in the CChain

func CChain

func CChain() *CChainHelper

CChain is a helper to chain request to the correct VM

func (*CChainHelper) AwaitTransactionAcceptance

func (c *CChainHelper) AwaitTransactionAcceptance(client *avalanchegoclient.Client, txID ids.ID, timeout time.Duration) error

AwaitTransactionAcceptance waits for the [txID] to be accepted within [timeout]

func (*CChainHelper) CheckBalance

func (c *CChainHelper) CheckBalance(client *avalanchegoclient.Client, address string, assetID string, expectedAmount uint64) error

CheckBalance validates the [address] balance is equal to [amount]

type PChainHelper

type PChainHelper struct {
}

This helper automates some the most used functions in the PChain

func PChain

func PChain() *PChainHelper

PChain is a helper to chain request to the correct VM

func (*PChainHelper) AwaitTransactionAcceptance

func (p *PChainHelper) AwaitTransactionAcceptance(client *avalanchegoclient.Client, txID ids.ID, timeout time.Duration) error

AwaitTransactionAcceptance waits for the [txID] to be committed within [timeout]

func (*PChainHelper) CheckBalance

func (p *PChainHelper) CheckBalance(client *avalanchegoclient.Client, address string, amount uint64) error

CheckBalance validates the [address] balance is equal to [amount]

type XChainHelper

type XChainHelper struct{}

This helper automates some the most used functions in the XChain

func XChain

func XChain() *XChainHelper

XChain is a helper to chain request to the correct VM

func (*XChainHelper) AwaitTransactionAcceptance

func (x *XChainHelper) AwaitTransactionAcceptance(client *avalanchegoclient.Client, txID ids.ID, timeout time.Duration) error

AwaitTransactionAcceptance waits for the [txID] to be accepted within [timeout]

func (*XChainHelper) CheckBalance

func (x *XChainHelper) CheckBalance(client *avalanchegoclient.Client, address string, assetID string, expectedAmount uint64) error

CheckBalance validates the [address] balance is equal to [amount]

Jump to

Keyboard shortcuts

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