tx

package
v0.0.0-...-b86dd97 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAgentConfig

func NewAgentConfig(pubkey []byte) agent.AgentConfig

Types

type BroadcastMetadata

type BroadcastMetadata struct {
	// Encoded as a principal string
	CanisterID string `json:"canister_id"`
	// encoded as hex
	RequestID       string `json:"request_id"`
	SenderPublicKey []byte `json:"sender_public_key"`
	IsIcrcTx        bool   `json:"is_icrc_tx"`
}

type Tx

type Tx struct {
	Request       types.Request
	SignedRequest []byte
	Signature     []byte
	IcrcTransfer  *icrc.TransferArgs
	IcpTransfer   *icp.TransferArgs
	Pubkey        []byte
	IsIcrcTx      bool
}

Tx for InternetComputerProtocol

func NewIcpTx

func NewIcpTx(args xcbuilder.TransferArgs, input tx_input.TxInput) (Tx, error)

func NewIcrcTx

func NewIcrcTx(args xcbuilder.TransferArgs, input tx_input.TxInput) (Tx, error)

func NewTx

func NewTx(args xcbuilder.TransferArgs, input tx_input.TxInput) (Tx, error)

func (Tx) GetMetadata

func (tx Tx) GetMetadata() ([]byte, bool, error)

func (Tx) Hash

func (tx Tx) Hash() xc.TxHash

func (Tx) Serialize

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

Serialize returns the serialized tx

func (*Tx) SetSignatures

func (tx *Tx) SetSignatures(signatures ...*xc.SignatureResponse) error

func (Tx) Sighashes

func (tx Tx) Sighashes() ([]*xc.SignatureRequest, 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