common

package
v1.11.11 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchOwners

func MatchOwners(
	owners *secp256k1fx.OutputOwners,
	addrs set.Set[ids.ShortID],
	minIssuanceTime uint64,
) ([]uint32, bool)

MatchOwners attempts to match a list of addresses up to the provided threshold.

Types

type ChainUTXOs

type ChainUTXOs interface {
	AddUTXO(ctx context.Context, destinationChainID ids.ID, utxo *avax.UTXO) error
	RemoveUTXO(ctx context.Context, sourceChainID, utxoID ids.ID) error

	UTXOs(ctx context.Context, sourceChainID ids.ID) ([]*avax.UTXO, error)
	GetUTXO(ctx context.Context, sourceChainID, utxoID ids.ID) (*avax.UTXO, error)
}

func NewChainUTXOs

func NewChainUTXOs(chainID ids.ID, utxos UTXOs) ChainUTXOs

type Option

type Option func(*Options)

func UnionOptions

func UnionOptions(first, second []Option) []Option

func WithAssumeDecided

func WithAssumeDecided() Option

func WithBaseFee

func WithBaseFee(baseFee *big.Int) Option

func WithChangeOwner

func WithChangeOwner(changeOwner *secp256k1fx.OutputOwners) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithCustomAddresses

func WithCustomAddresses(addrs set.Set[ids.ShortID]) Option

func WithCustomEthAddresses

func WithCustomEthAddresses(addrs set.Set[ethcommon.Address]) Option

func WithMemo

func WithMemo(memo []byte) Option

func WithMinIssuanceTime

func WithMinIssuanceTime(minIssuanceTime uint64) Option

func WithPollFrequency

func WithPollFrequency(pollFrequency time.Duration) Option

func WithPostIssuanceFunc

func WithPostIssuanceFunc(f PostIssuanceFunc) Option

func WithStakeableLocked

func WithStakeableLocked() Option

type Options

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

func NewOptions

func NewOptions(ops []Option) *Options

func (*Options) Addresses

func (o *Options) Addresses(defaultAddresses set.Set[ids.ShortID]) set.Set[ids.ShortID]

func (*Options) AllowStakeableLocked

func (o *Options) AllowStakeableLocked() bool

func (*Options) AssumeDecided

func (o *Options) AssumeDecided() bool

func (*Options) BaseFee

func (o *Options) BaseFee(defaultBaseFee *big.Int) *big.Int

func (*Options) ChangeOwner

func (o *Options) ChangeOwner(defaultOwner *secp256k1fx.OutputOwners) *secp256k1fx.OutputOwners

func (*Options) Context

func (o *Options) Context() context.Context

func (*Options) EthAddresses

func (o *Options) EthAddresses(defaultAddresses set.Set[ethcommon.Address]) set.Set[ethcommon.Address]

func (*Options) Memo

func (o *Options) Memo() []byte

func (*Options) MinIssuanceTime

func (o *Options) MinIssuanceTime() uint64

func (*Options) PollFrequency

func (o *Options) PollFrequency() time.Duration

func (*Options) PostIssuanceFunc

func (o *Options) PostIssuanceFunc() PostIssuanceFunc

type PostIssuanceFunc

type PostIssuanceFunc func(ids.ID)

Signature of the function that will be called after a transaction has been issued with the ID of the issued transaction.

type UTXOs

type UTXOs interface {
	AddUTXO(ctx context.Context, sourceChainID, destinationChainID ids.ID, utxo *avax.UTXO) error
	RemoveUTXO(ctx context.Context, sourceChainID, destinationChainID, utxoID ids.ID) error

	UTXOs(ctx context.Context, sourceChainID, destinationChainID ids.ID) ([]*avax.UTXO, error)
	GetUTXO(ctx context.Context, sourceChainID, destinationChainID, utxoID ids.ID) (*avax.UTXO, error)
}

func NewUTXOs

func NewUTXOs() UTXOs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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