transaction

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BxMemoMarkerMsg = "Powered by bloXroute Trader Api"
View Source
const ReceipientAddress = "5wiGAqf4BX23XU6jc3MDDZAFoNV5pz61thsUuSgpsAxS"

Variables

View Source
var TraderAPIMemoProgram = solana.MustPublicKeyFromBase58("HQ2UUt18uJqKaQFJhgV9zaTdQxUZjNrsKFgoEDquBkcx")

Functions

func AddMemoAndSign added in v1.8.0

func AddMemoAndSign(txBase64 string, privateKey solana.PrivateKey) (string, error)

AddMemoAndSign adds memo instruction to a serialized transaction, it's primarily used if the user doesn't want to interact with Trader-API directly

func CreateSampleTx added in v1.9.3

func CreateSampleTx(privateKey solana.PrivateKey, recentBlockHash solana.Hash, lamports uint64) (*solana.Transaction, error)

func CreateTraderAPIMemoInstruction added in v1.2.0

func CreateTraderAPIMemoInstruction(msg string) solana.Instruction

CreateTraderAPIMemoInstruction generates a transaction instruction that places a memo in the transaction log Having a memo instruction with signals Trader-API usage is required

func LoadPrivateKeyFromEnv

func LoadPrivateKeyFromEnv() (solana.PrivateKey, error)

LoadPrivateKeyFromEnv looks up private key from the `PRIVATE_KEY` environment variable

func PartialSign added in v1.9.5

func PartialSign(tx *solana.Transaction, ownerPk solana.PublicKey, privateKeys map[solana.PublicKey]solana.PrivateKey) error

PartialSign heavily derived from `solana-go/transaction.go`. Signs the transaction with all available private keys, except the main Solana address's

func SignTx

func SignTx(unsignedTxBase64 string) (string, error)

SignTx uses the environment variable for `PRIVATE_KEY` to sign the message content and replace the zero signature

func SignTxWithPrivateKey

func SignTxWithPrivateKey(unsignedTxBase64 string, privateKey solana.PrivateKey) (string, error)

SignTxWithPrivateKey uses the provided private key to sign the message content and replace the zero signature

Types

This section is empty.

Jump to

Keyboard shortcuts

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