Documentation
¶
Index ¶
- func MatchOwners(owners *secp256k1fx.OutputOwners, addrs set.Set[ids.ShortID], ...) ([]uint32, bool)
- type ChainUTXOs
- type ConfirmationReceipt
- type IssuanceReceipt
- type Option
- func UnionOptions(first, second []Option) []Option
- func WithAssumeDecided() Option
- func WithBaseFee(baseFee *big.Int) Option
- func WithChangeOwner(changeOwner *secp256k1fx.OutputOwners) Option
- func WithConfirmationHandler(f func(ConfirmationReceipt)) Option
- func WithContext(ctx context.Context) Option
- func WithCustomAddresses(addrs set.Set[ids.ShortID]) Option
- func WithCustomEthAddresses(addrs set.Set[ethcommon.Address]) Option
- func WithIssuanceHandler(f func(IssuanceReceipt)) Option
- func WithMemo(memo []byte) Option
- func WithMinIssuanceTime(minIssuanceTime uint64) Option
- func WithPollFrequency(pollFrequency time.Duration) Option
- func WithStakeableLocked() Option
- type Options
- func (o *Options) Addresses(defaultAddresses set.Set[ids.ShortID]) set.Set[ids.ShortID]
- func (o *Options) AllowStakeableLocked() bool
- func (o *Options) AssumeDecided() bool
- func (o *Options) BaseFee(defaultBaseFee *big.Int) *big.Int
- func (o *Options) ChangeOwner(defaultOwner *secp256k1fx.OutputOwners) *secp256k1fx.OutputOwners
- func (o *Options) ConfirmationHandler() func(ConfirmationReceipt)
- func (o *Options) Context() context.Context
- func (o *Options) EthAddresses(defaultAddresses set.Set[ethcommon.Address]) set.Set[ethcommon.Address]
- func (o *Options) IssuanceHandler() func(IssuanceReceipt)
- func (o *Options) Memo() []byte
- func (o *Options) MinIssuanceTime() uint64
- func (o *Options) PollFrequency() time.Duration
- type UTXOs
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 ConfirmationReceipt ¶ added in v1.13.1
type ConfirmationReceipt struct {
// Identifies the primary chain ("P", "X" or "C")
ChainAlias string
// ID of the issued transaction
TxID ids.ID
// The time from initiation to confirmation
TotalDuration time.Duration
// The time from issuance to confirmation. It does not include the duration
// of issuance.
ConfirmationDuration time.Duration
}
ConfirmationReceipt is the information known after issuing and confirming a transaction.
type IssuanceReceipt ¶ added in v1.13.1
type IssuanceReceipt struct {
// Identifies the primary chain ("P", "X" or "C")
ChainAlias string
// ID of the issued transaction
TxID ids.ID
// The time from initiation to issuance
Duration time.Duration
}
IssuanceReceipt is the information known after issuing a transaction.
type Option ¶
type Option func(*Options)
func UnionOptions ¶
func WithAssumeDecided ¶
func WithAssumeDecided() Option
func WithBaseFee ¶ added in v1.10.9
func WithChangeOwner ¶
func WithChangeOwner(changeOwner *secp256k1fx.OutputOwners) Option
func WithConfirmationHandler ¶ added in v1.13.1
func WithConfirmationHandler(f func(ConfirmationReceipt)) Option
func WithContext ¶
func WithCustomEthAddresses ¶ added in v1.10.9
func WithIssuanceHandler ¶ added in v1.13.1
func WithIssuanceHandler(f func(IssuanceReceipt)) Option
func WithMinIssuanceTime ¶
func WithPollFrequency ¶
func WithStakeableLocked ¶
func WithStakeableLocked() Option
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func (*Options) AllowStakeableLocked ¶
func (*Options) AssumeDecided ¶
func (*Options) ChangeOwner ¶
func (o *Options) ChangeOwner(defaultOwner *secp256k1fx.OutputOwners) *secp256k1fx.OutputOwners
func (*Options) ConfirmationHandler ¶ added in v1.13.1
func (o *Options) ConfirmationHandler() func(ConfirmationReceipt)
func (*Options) EthAddresses ¶ added in v1.10.9
func (*Options) IssuanceHandler ¶ added in v1.13.1
func (o *Options) IssuanceHandler() func(IssuanceReceipt)
func (*Options) MinIssuanceTime ¶
func (*Options) PollFrequency ¶
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)
}
Click to show internal directories.
Click to hide internal directories.