tx

package
v0.0.0-...-4f6eca2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAccountLikeInstruction

type CreateAccountLikeInstruction struct {
	NewAccount solana.PublicKey
	Lamports   uint64
}

type SolanaInstruction

type SolanaInstruction interface {
	Obtain(def *bin.VariantDefinition) (typeID bin.TypeID, typeName string, impl interface{})
}

type Tx

type Tx struct {
	SolTx       *solana.Transaction
	ParsedSolTx *rpc.ParsedTransaction // similar, but different type
	// contains filtered or unexported fields
}

Tx for Solana, encapsulating a solana.Transaction and other info

func NewTxFrom

func NewTxFrom(solTx *solana.Transaction) *Tx

func (*Tx) AddSignatures

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

AddSignatures adds a signature to Tx

func (*Tx) AddTransientSigner

func (tx *Tx) AddTransientSigner(transientSigner solana.PrivateKey)

Some instructions on solana require new accounts to sign the transaction in addition to the funding account. These are transient signers are not sensitive and the key material only needs to live long enough to sign the transaction.

func (Tx) GetCreateAccounts

func (tx Tx) GetCreateAccounts() []*CreateAccountLikeInstruction

func (Tx) GetDeactivateStakes

func (tx Tx) GetDeactivateStakes() []*stake.Deactivate

func (Tx) GetDelegateStake

func (tx Tx) GetDelegateStake() []*stake.DelegateStake

func (Tx) GetSignatures

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

func (Tx) GetSplitStakes

func (tx Tx) GetSplitStakes() []*stake.Split

func (Tx) GetStakeWithdraws

func (tx Tx) GetStakeWithdraws() []*stake.Withdraw

func (Tx) GetSystemTransfers

func (tx Tx) GetSystemTransfers() []*system.Transfer

func (Tx) GetTokenTransferCheckeds

func (tx Tx) GetTokenTransferCheckeds() []*token.TransferChecked

func (Tx) GetTokenTransfers

func (tx Tx) GetTokenTransfers() []*token.Transfer

func (Tx) GetVoteWithdraws

func (tx Tx) GetVoteWithdraws() []*vote.Withdraw

func (Tx) Hash

func (tx Tx) Hash() xc.TxHash

Hash returns the tx hash or id, for Solana it's signature

func (Tx) RecentBlockhash

func (tx Tx) RecentBlockhash() string

RecentBlockhash returns the recent block hash used as a nonce for a Solana tx

func (Tx) Serialize

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

Serialize returns the serialized tx

func (Tx) Sighashes

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

Sighashes returns the tx payload to sign, aka sighashes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL