Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransactionFromBase64 ¶
func NewTransactionFromBase64(txStr string) (solana.Transaction, error)
NewTransactionFromBase64 deserializes a transaction from a base64 string.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient( wallet Wallet, rpcEndpoint string, opts ...ClientOption, ) (Client, error)
func (Client) CheckSignature ¶
CheckSignature checks if a transaction with the given signature has been confirmed on-chain
type ClientOption ¶
ClientOption is a function that allows to specify options for the client
func WithClientRPC ¶
func WithClientRPC(clientRPC ClientRPC) ClientOption
WithClientRPC sets the Solana client RPC for the engine
func WithMaxRetries ¶
func WithMaxRetries(maxRetries uint) ClientOption
WithMaxRetries sets the maximum number of retries for the engine when sending a transaction on-chain
type ClientRPC ¶
type ClientRPC interface {
SendTransactionWithOpts(
ctx context.Context,
transaction *solana.Transaction,
opts rpc.TransactionOpts,
) (signature solana.Signature, err error)
GetLatestBlockhash(
ctx context.Context,
commitment rpc.CommitmentType,
) (out *rpc.GetLatestBlockhashResult, err error)
GetSignatureStatuses(
ctx context.Context,
searchTransactionHistory bool,
transactionSignatures ...solana.Signature,
) (out *rpc.GetSignatureStatusesResult, err error)
}
type Wallet ¶
Wallet is a wrapper around a solana.Wallet
func (Wallet) SignTransaction ¶
func (w Wallet) SignTransaction(tx solana.Transaction) (solana.Transaction, error)
SignTransaction signs a transaction with the wallet's private key.
Click to show internal directories.
Click to hide internal directories.