Documentation ¶
Index ¶
- Variables
- func DefaultMaxGasPrice(nativeAsset *xc.ChainConfig) float64
- func GetTaxFrom(amount xc.AmountBlockchain, tax float64) xc.AmountBlockchain
- type TxBuilder
- func (txBuilder TxBuilder) GetDenom() string
- func (txBuilder TxBuilder) NewBankTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) NewCW20Transfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) NewNativeTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) NewTask(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) NewTokenTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) NewTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) Stake(args xcbuilder.StakeArgs, input xc.StakeTxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) Transfer(args xcbuilder.TransferArgs, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) Unstake(args xcbuilder.StakeArgs, input xc.UnstakeTxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) Withdraw(args xcbuilder.StakeArgs, input xc.WithdrawTxInput) (xc.Tx, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMaxTotalFeeHuman, _ = xc.NewAmountHumanReadableFromStr("2")
Functions ¶
func DefaultMaxGasPrice ¶
func DefaultMaxGasPrice(nativeAsset *xc.ChainConfig) float64
func GetTaxFrom ¶
func GetTaxFrom(amount xc.AmountBlockchain, tax float64) xc.AmountBlockchain
Returns the amount in blockchain that is percentage of amount. E.g. amount = 100, tax = 0.05, returns 5.
Types ¶
type TxBuilder ¶
TxBuilder for Cosmos
func NewTxBuilder ¶
NewTxBuilder creates a new Cosmos TxBuilder
func (TxBuilder) NewBankTransfer ¶
func (txBuilder TxBuilder) NewBankTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
x/bank MsgSend transfer
func (TxBuilder) NewCW20Transfer ¶
func (TxBuilder) NewNativeTransfer ¶
func (txBuilder TxBuilder) NewNativeTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
See NewTransfer
func (TxBuilder) NewTokenTransfer ¶
func (txBuilder TxBuilder) NewTokenTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
See NewTransfer
func (TxBuilder) NewTransfer ¶
func (txBuilder TxBuilder) NewTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
Old transfer interface
Click to show internal directories.
Click to hide internal directories.