tx

package
v0.0.0-...-3b3e013 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Version    uint64
	To         string
	From       string
	Nonce      uint64
	Value      xc.AmountBlockchain
	GasLimit   uint64
	GasFeeCap  xc.AmountBlockchain
	GasPremium xc.AmountBlockchain
	Method     uint64
	Params     []byte
}

func NewMessage

func NewMessage(args xcbuilder.TransferArgs, txInput tx_input.TxInput) Message

type Signature

type Signature struct {
	Type byte
	Data []byte
}

Filecoin signature type.

type SignedTx

type SignedTx struct {
	Tx        *Tx
	Signature Signature
}

type Tx

type Tx struct {
	Message      Message
	XcSignatures []xc.TxSignature
	Signature    Signature
}

Filecoint transaction

func (*Tx) AddSignatures

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

AddSignatures adds a signature to Tx

func (*Tx) GetSignatures

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

GetSignatures returns back signatures, which may be used for signed-transaction broadcasting

func (Tx) Hash

func (tx Tx) Hash() xc.TxHash

Return hash of Filecoin transaction Works only for signed transactions

func (Tx) Serialize

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

Serialize filecoin transaction using CBOR

func (Tx) SerializeSigned

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

Serialize signed filecoin transaction using CBOR

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