common

package
v1.12.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: BSD-3-Clause Imports: 11 Imported by: 37

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 added in v1.10.9

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 added in v1.11.0

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 added in v1.10.9

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 added in v1.10.9

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 added in v1.10.10

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 added in v1.10.9

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 added in v1.10.9

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 added in v1.10.10

func (o *Options) PostIssuanceFunc() PostIssuanceFunc

type PostIssuanceFunc added in v1.10.10

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 added in v1.11.0

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 added in v1.11.0

func NewUTXOs() UTXOs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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