tx

package
v0.0.0-...-d4ead40 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSighash

func GetSighash(asset *xc.ChainBaseConfig, sigData []byte) []byte

func TmHash

func TmHash(bz []byte) xc.TxHash

Types

type Cw20MsgTransfer

type Cw20MsgTransfer struct {
	Transfer *Cw20Transfer `json:"transfer,omitempty"`
}

type Cw20Transfer

type Cw20Transfer struct {
	Amount    string `json:"amount,omitempty"`
	Recipient string `json:"recipient,omitempty"`
}

type Tx

type Tx struct {
	ChainCfg        *xc.ChainBaseConfig
	Input           tx_input.TxInput
	Msgs            []types.Msg
	Fees            types.Coins
	SignerPublicKey []byte
	Memo            string
	// contains filtered or unexported fields
}

Tx for Cosmos

func NewTx

func NewTx(chain *xc.ChainBaseConfig, input tx_input.TxInput, msgs []types.Msg, fees types.Coins, senderPubkey []byte, memo string) *Tx

func (*Tx) AddSignatures

func (tx *Tx) AddSignatures(signatures ...xc.TxSignature) error

AddSignatures adds a signature to Tx

func (Tx) BuildUnsigned

func (tx Tx) BuildUnsigned() (*sdktx.SignDoc, error)

func (Tx) GetSignatures

func (tx Tx) GetSignatures() []xc.TxSignature

func (Tx) Hash

func (tx Tx) Hash() xc.TxHash

Hash returns the tx hash or id

func (Tx) Serialize

func (tx Tx) Serialize() ([]byte, error)

Serialize serializes a Tx

func (Tx) Sighashes

func (tx Tx) Sighashes() ([]xc.TxDataToSign, error)

Sighashes returns the tx payload to sign, aka sighash

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳