tx_input

package
v0.0.0-...-cc9b5da Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchDepositInput

type BatchDepositInput struct {
	TxInput
	PublicKeys [][]byte `json:"public_keys"`
	Signatures [][]byte `json:"signatures"`
}

func NewBatchDepositInput

func NewBatchDepositInput() *BatchDepositInput

func (*BatchDepositInput) GetVariant

func (*BatchDepositInput) GetVariant() xc.TxVariantInputType

func (*BatchDepositInput) Staking

func (*BatchDepositInput) Staking()

Mark as valid for staking transactions

type ExitRequestInput

type ExitRequestInput struct {
	TxInput
	PublicKeys [][]byte `json:"public_keys"`
}

func NewExitRequestInput

func NewExitRequestInput() *ExitRequestInput

func (*ExitRequestInput) GetVariant

func (*ExitRequestInput) GetVariant() xc.TxVariantInputType

func (*ExitRequestInput) Unstaking

func (*ExitRequestInput) Unstaking()

Mark as valid for un-staking transactions

type Price

type Price struct {
	Contract string                 `json:"contract"`
	Chain    xc.NativeAsset         `json:"chain"`
	PriceUsd xc.AmountHumanReadable `json:"price_usd"`
}

Pricing methods are no longer used, except for a prior wormhole-bridging experiment.

type TxInput

type TxInput struct {
	xc.TxInputEnvelope
	Nonce    uint64 `json:"nonce,omitempty"`
	GasLimit uint64 `json:"gas_limit,omitempty"`
	// DynamicFeeTx
	GasTipCap xc.AmountBlockchain `json:"gas_tip_cap,omitempty"` // maxPriorityFeePerGas
	GasFeeCap xc.AmountBlockchain `json:"gas_fee_cap,omitempty"` // maxFeePerGas
	// GasPrice xc.AmountBlockchain `json:"gas_price,omitempty"` // wei per gas
	// Task params
	Params []string `json:"params,omitempty"`

	// For legacy implementation only
	GasPrice xc.AmountBlockchain `json:"gas_price,omitempty"` // wei per gas

	ChainId xc.AmountBlockchain `json:"chain_id,omitempty"`

	// legacy only
	Prices []*Price `json:"prices,omitempty"`
}

TxInput for EVM

func NewTxInput

func NewTxInput() *TxInput

func (*TxInput) GetDriver

func (input *TxInput) GetDriver() xc.Driver

func (*TxInput) GetUsdPrice

func (input *TxInput) GetUsdPrice(chain xc.NativeAsset, contract string) (xc.AmountHumanReadable, bool)

func (*TxInput) IndependentOf

func (input *TxInput) IndependentOf(other xc.TxInput) (independent bool)

func (*TxInput) SafeFromDoubleSend

func (input *TxInput) SafeFromDoubleSend(others ...xc.TxInput) (safe bool)

func (*TxInput) SetGasFeePriority

func (input *TxInput) SetGasFeePriority(other xc.GasFeePriority) error

func (*TxInput) SetUsdPrice

func (input *TxInput) SetUsdPrice(chain xc.NativeAsset, contract string, priceUsd xc.AmountHumanReadable)

Jump to

Keyboard shortcuts

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