tx

package
v0.0.0-...-c55355f Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSighash

func GetSighash(asset *xc.ChainConfig, 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 {
	CosmosTx        types.Tx
	ParsedTransfers []types.Msg
	// aux fields
	CosmosTxBuilder client.TxBuilder
	CosmosTxEncoder types.TxEncoder
	SigsV2          []signingtypes.SignatureV2
	InputSignatures []xc.TxSignature
	TxDataToSign    []byte
}

Tx for Cosmos

func (*Tx) AddSignatures

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

AddSignatures adds a signature to Tx

func (Tx) Fee

func (tx Tx) Fee() xc.AmountBlockchain

Fee returns the fee of a Tx

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