Versions in this module Expand all Collapse all v3 v3.6.2 Feb 8, 2023 Changes in this version + const CommitmentConfirmed + const CommitmentFinalized + const CommitmentProcessed + const MaxSeedLength + const MaxSeeds + const PDAMarker + var ATAProgramID = MustPublicKeyFromBase58("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL") + var InstructionDecoderRegistry = map[string]InstructionDecoder + var TokenProgramID = MustPublicKeyFromBase58("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA") + func DecodeInstruction(programID PublicKey, accounts []*AccountMeta, data []byte) (interface{}, error) + func NewRandomPrivateKey() (PublicKey, PrivateKey, error) + func RegisterInstructionDecoder(programID PublicKey, decoder InstructionDecoder) + type Account struct + PrivateKey PrivateKey + func AccountFromPrivateKeyBase58(privateKey string) (*Account, error) + func NewAccount() *Account + func (a *Account) PublicKey() PublicKey + type AccountInfo struct + Data interface{} + Executable bool + Lamports bin.Uint64 + Owner PublicKey + RentEpoch bin.Uint64 + type AccountKey struct + PublicKey PublicKey + Signer bool + Writable bool + type AccountMeta struct + IsSigner bool + IsWritable bool + PublicKey PublicKey + type AccountSettable interface + SetAccounts func(accounts []*AccountMeta) error + type Base58 []byte + func (t *Base58) UnmarshalJSON(data []byte) (err error) + func (t Base58) MarshalJSON() ([]byte, error) + func (t Base58) String() string + type BlockReward struct + Lamports bin.Uint64 + Pubkey PublicKey + type BorshString struct + Content []byte + Length uint32 + func ToBorshString(str string) BorshString + func (s *BorshString) String() string + func (s *BorshString) UnmarshalJSON(data []byte) (err error) + func (s BorshString) MarshalJSON() ([]byte, error) + type ByteWrapper struct + func (w *ByteWrapper) ReadByte() (byte, error) + type CommitmentType string + type CompiledInstruction struct + AccountCount bin.Varuint16 + Accounts Uint8Arr + Data Base58 + DataLength bin.Varuint16 + ProgramIDIndex uint8 + func (ci *CompiledInstruction) ResolveInstructionAccounts(message *Message) (out []*AccountMeta) + type Context struct + Slot bin.Uint64 + type Data []byte + func (t *Data) UnmarshalJSON(data []byte) (err error) + func (t Data) MarshalJSON() ([]byte, error) + func (t Data) String() string + type FeeCalculator struct + LamportsPerSignature bin.Uint64 + type FeeResult struct + Blockhash Hash + FeeCalculator FeeCalculator + LastValidBlockHeight bin.Uint64 + LastValidSlot bin.Uint64 + type GetAccountInfoResult struct + Value *AccountInfo + type GetBalanceResult struct + Value bin.Uint64 + type GetBlockResult struct + BlockTime bin.Uint64 + Blockhash Hash + ParentSlot bin.Uint64 + PreviousBlockhash Hash + Rewards []BlockReward + Signatures []Signature + Transactions []TransactionWithMeta + type GetEpochInfoResult struct + AbsoluteSlot bin.Uint64 + BlockHeight bin.Uint64 + Epoch bin.Uint64 + SlotIndex bin.Uint64 + SlotsInEpoch bin.Uint64 + TransactionCount bin.Uint64 + type GetFeesResult struct + Value FeeResult + type GetLatestBlockhashResult struct + Value LatestBlockhashResult + type GetNonceAccountInfoResult struct + Value *NonceAccountValue + type GetProgramAccountsOpts struct + Commitment CommitmentType + Filters []RPCFilter + type GetProgramAccountsResult []*KeyedAccount + type GetRecentBlockhashResult struct + Value RecentBlockhashResult + type GetSignatureStatusesResult struct + Value []SignatureStatus + type GetSignaturesForAddressOpts struct + Before string + Limit uint64 + Until string + type GetSignaturesForAddressResult []*TransactionSignature + type GetSlotResult bin.Uint64 + type GetTokenAmountResult struct + Value TokenAmountResult + type Hash = PublicKey + type InstructionDecoder func(instructionAccounts []*AccountMeta, data []byte) (interface{}, error) + type InstructionInfo struct + Info map[string]interface{} + InstructionType string + type KeyedAccount struct + Account *AccountInfo + Pubkey PublicKey + type LatestBlockhashResult struct + Blockhash Hash + LastValidBlockHeight bin.Uint64 + type Message struct + AccountKeys []PublicKey + Header MessageHeader + Instructions []CompiledInstruction + RecentBlockhash Hash + func (m *Message) AccountMetaList() (out []*AccountMeta) + func (m *Message) IsSigner(account PublicKey) bool + func (m *Message) IsWritable(account PublicKey) bool + func (m *Message) ResolveProgramIDIndex(programIDIndex uint8) (PublicKey, error) + func (m *Message) Serialize() ([]byte, error) + func (m *Message) SignerKeys() []PublicKey + func (m *Message) TouchAccount(account PublicKey) bool + type MessageHeader struct + NumReadonlySignedAccounts uint8 + NumReadonlyUnsignedAccounts uint8 + NumRequiredSignatures uint8 + type NonceAccountData struct + Info *NonceAccountParsed + Program string + Space bin.Uint64 + type NonceAccountFee struct + LamportsPerSignature string + type NonceAccountInfo struct + Authority string + Blockhash string + FeeCalculator *NonceAccountFee + type NonceAccountParsed struct + Info *NonceAccountInfo + Type string + type NonceAccountValue struct + Data *NonceAccountData + Executable bool + Lamports bin.Uint64 + Owner PublicKey + RentEpoch bin.Uint64 + type Padding []byte + type ParsedInstruction struct + Accounts []PublicKey + Data Base58 + Parsed *InstructionInfo + Program string + ProgramID PublicKey + func (p *ParsedInstruction) IsParsed() bool + type ParsedTransaction struct + Message RPCMessage + Signatures []Signature + type PrivateKey []byte + func MustPrivateKeyFromBase58(in string) PrivateKey + func PrivateKeyFromBase58(privkey string) (PrivateKey, error) + func PrivateKeyFromSolanaKeygenFile(file string) (PrivateKey, error) + func (k PrivateKey) PublicKey() PublicKey + func (k PrivateKey) Sign(payload []byte) (Signature, error) + func (k PrivateKey) String() string + type PublicKey [32]byte + func FindAssociatedTokenAddress(walletAddress, tokenMintAddress PublicKey) (PublicKey, error) + func MustPublicKeyFromBase58(in string) PublicKey + func PublicKeyFindProgramAddress(seeds [][]byte, programID PublicKey) (PublicKey, byte, error) + func PublicKeyFromBase58(in string) (out PublicKey, err error) + func PublicKeyFromBytes(in []byte) (out PublicKey) + func (p *PublicKey) UnmarshalJSON(data []byte) (err error) + func (p PublicKey) Equals(pb PublicKey) bool + func (p PublicKey) IsZero() bool + func (p PublicKey) MarshalJSON() ([]byte, error) + func (p PublicKey) String() string + func (p PublicKey) ToSlice() []byte + func (p PublicKey) VerifySignature(message, sig []byte) bool + type RPCContext struct + Context Context + type RPCFilter struct + DataSize bin.Uint64 + Memcmp *RPCFilterMemcmp + type RPCFilterMemcmp struct + Bytes Base58 + Offset int + type RPCMessage struct + AccountKeys []*AccountKey + Instructions []ParsedInstruction + RecentBlockhash Hash + type RecentBlockhashResult struct + Blockhash Hash + FeeCalculator FeeCalculator + type SendTransactionOptions struct + PreflightCommitment CommitmentType + SkipPreflight bool + type Signature [64]byte + func MustSignatureFromString(in string) (out Signature) + func NewSignatureFromBase58(in string) (out Signature, err error) + func NewSignatureFromBytes(in []byte) (out Signature, err error) + func NewSignatureFromString(in string) (out Signature, err error) + func (s *Signature) UnmarshalJSON(data []byte) (err error) + func (s Signature) MarshalJSON() ([]byte, error) + func (s Signature) String() string + func (s Signature) ToSlice() []byte + func (s Signature) Verify(publicKey PublicKey, message []byte) bool + type SignatureStatus struct + ConfirmationStatus *string + Confirmations *bin.Uint64 + Err interface{} + Slot bin.Uint64 + type SimulateTransactionResponse struct + Err interface{} + Logs []string + type TokenAmountResult struct + Amount bin.Uint64 + Decimals uint8 + UIAmountString string + type TokenBalances struct + AccountIndex uint8 + Mint PublicKey + Owner PublicKey + UITokenAmount TokenAmountResult + type Transaction struct + Message Message + Signatures []Signature + func DecodeTransaction(encodedStr string, encoding string) (*Transaction, error) + func NewTransaction(instructions []TransactionInstruction, blockHash Hash, ...) (*Transaction, error) + func TransactionFromData(in []byte) (*Transaction, error) + func (t *Transaction) AccountMetaList() (out []*AccountMeta) + func (t *Transaction) IsSigner(account PublicKey) bool + func (t *Transaction) IsWritable(account PublicKey) bool + func (t *Transaction) ResolveProgramIDIndex(programIDIndex uint8) (PublicKey, error) + func (t *Transaction) Serialize(signdata []byte) ([]byte, error) + func (t *Transaction) SerializeAll() ([]byte, error) + func (t *Transaction) Sign(getter privateKeyGetter) (out []Signature, err error) + func (t *Transaction) TouchAccount(account PublicKey) bool + type TransactionInstruction interface + Accounts func() []*AccountMeta + Data func() ([]byte, error) + ProgramID func() PublicKey + type TransactionMeta struct + Err interface{} + Fee bin.Uint64 + LogMessages []string + PostBalances []bin.Uint64 + PostTokenBalances []TokenBalances + PreBalances []bin.Uint64 + PreTokenBalances []TokenBalances + func (m *TransactionMeta) IsStatusOk() bool + type TransactionOption interface + func TransactionPayer(payer PublicKey) TransactionOption + type TransactionParsed struct + Meta *TransactionMeta + Transaction *ParsedTransaction + type TransactionSignature struct + Err interface{} + Memo string + Signature string + Slot bin.Uint64 + type TransactionWithMeta struct + BlockTime bin.Uint64 + Meta *TransactionMeta + Slot bin.Uint64 + Transaction *Transaction + type Uint8Arr []uint8 + func (t Uint8Arr) MarshalJSON() ([]byte, error) + func (t Uint8Arr) String() string