Documentation ¶
Index ¶
- func SetTxInputOptions(txInput xc.TxInput, options TransactionOptions, amount xc.AmountBlockchain)
- type BuilderOption
- func OptionMemo(memo string) BuilderOption
- func OptionPriority(priority xc.GasFeePriority) BuilderOption
- func OptionPublicKey(publicKey []byte) BuilderOption
- func OptionStakeAccount(account string) BuilderOption
- func OptionStakeOwner(owner xc.Address) BuilderOption
- func OptionTimestamp(ts int64) BuilderOption
- func OptionValidator(validator string) BuilderOption
- type FullBuilder
- type FullTransferBuilder
- type StakeArgs
- func (args *StakeArgs) GetAmount() xc.AmountBlockchain
- func (args *StakeArgs) GetFrom() xc.Address
- func (args *StakeArgs) GetMemo() (string, bool)
- func (args *StakeArgs) GetPriority() (xc.GasFeePriority, bool)
- func (args *StakeArgs) GetPublicKey() ([]byte, bool)
- func (args *StakeArgs) GetStakeAccount() (string, bool)
- func (args *StakeArgs) GetStakeOwner() (xc.Address, bool)
- func (args *StakeArgs) GetTimestamp() (int64, bool)
- func (args *StakeArgs) GetValidator() (string, bool)
- type Staking
- type TransactionOptions
- type Transfer
- type TransferArgs
- func (args *TransferArgs) GetAmount() xc.AmountBlockchain
- func (args *TransferArgs) GetFrom() xc.Address
- func (args *TransferArgs) GetMemo() (string, bool)
- func (args *TransferArgs) GetPriority() (xc.GasFeePriority, bool)
- func (args *TransferArgs) GetPublicKey() ([]byte, bool)
- func (args *TransferArgs) GetTimestamp() (int64, bool)
- func (args *TransferArgs) GetTo() xc.Address
- type TxCommonOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTxInputOptions ¶
func SetTxInputOptions(txInput xc.TxInput, options TransactionOptions, amount xc.AmountBlockchain)
Previously the crosschain abstraction would require callers to set options directly on the transaction input, if the interface was implemented on the input type. However, this is very clear or easy to use. This function bridges the gap, to allow callers to use a more natural interface with options. Chain transaction builders can call this to safely set provided options on the old transaction input setters.
Types ¶
type BuilderOption ¶
type BuilderOption func(opts *builderOptions) error
func OptionMemo ¶
func OptionMemo(memo string) BuilderOption
func OptionPriority ¶
func OptionPriority(priority xc.GasFeePriority) BuilderOption
func OptionPublicKey ¶
func OptionPublicKey(publicKey []byte) BuilderOption
func OptionStakeAccount ¶
func OptionStakeAccount(account string) BuilderOption
func OptionStakeOwner ¶
func OptionStakeOwner(owner xc.Address) BuilderOption
Set an alternative owner of the stake from the from address
func OptionTimestamp ¶
func OptionTimestamp(ts int64) BuilderOption
func OptionValidator ¶
func OptionValidator(validator string) BuilderOption
type FullBuilder ¶
type FullBuilder interface { FullTransferBuilder Staking }
type FullTransferBuilder ¶
type StakeArgs ¶
type StakeArgs struct {
// contains filtered or unexported fields
}
func NewStakeArgs ¶
func NewStakeArgs(chain xc.NativeAsset, from xc.Address, amount xc.AmountBlockchain, options ...BuilderOption) (StakeArgs, error)
func (*StakeArgs) GetAmount ¶
func (args *StakeArgs) GetAmount() xc.AmountBlockchain
func (*StakeArgs) GetPriority ¶
func (args *StakeArgs) GetPriority() (xc.GasFeePriority, bool)
func (*StakeArgs) GetPublicKey ¶
func (*StakeArgs) GetStakeAccount ¶
func (*StakeArgs) GetTimestamp ¶
func (*StakeArgs) GetValidator ¶
Staking options
type TransactionOptions ¶
type TransactionOptions interface { GetMemo() (string, bool) GetTimestamp() (int64, bool) GetPriority() (xc.GasFeePriority, bool) GetPublicKey() ([]byte, bool) }
All ArgumentBuilders should provide base arguments for transactions
type TransferArgs ¶
type TransferArgs struct {
// contains filtered or unexported fields
}
func NewTransferArgs ¶
func NewTransferArgs(from xc.Address, to xc.Address, amount xc.AmountBlockchain, options ...BuilderOption) (TransferArgs, error)
func (*TransferArgs) GetAmount ¶
func (args *TransferArgs) GetAmount() xc.AmountBlockchain
func (*TransferArgs) GetFrom ¶
func (args *TransferArgs) GetFrom() xc.Address
Transfer relevant arguments
func (*TransferArgs) GetPriority ¶
func (args *TransferArgs) GetPriority() (xc.GasFeePriority, bool)
func (*TransferArgs) GetPublicKey ¶
func (args *TransferArgs) GetPublicKey() ([]byte, bool)
func (*TransferArgs) GetTimestamp ¶
func (args *TransferArgs) GetTimestamp() (int64, bool)
func (*TransferArgs) GetTo ¶
func (args *TransferArgs) GetTo() xc.Address
type TxCommonOptions ¶
type TxCommonOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.