Versions in this module Expand all Collapse all v1 v1.1.1 Sep 14, 2021 Changes in this version + const DevnetRPCEndpoint + const MainnetRPCEndpoint + const TestnetRPCEndpoint + type Commitment string + const CommitmentConfirmed + const CommitmentFinalized + const CommitmentProcessed + type Context struct + Slot uint64 + type Encoding string + const EncodingBase58 + const EncodingBase64 + const EncodingBase64Zstd + type ErrorResponse struct + Code int + Data map[string]interface{} + Message string + type FeeCalculator struct + LamportsPerSignature uint64 + type GeneralResponse struct + Error *ErrorResponse + ID uint64 + JsonRPC string + type GetAccountInfoConfig struct + Commitment Commitment + DataSlice *GetAccountInfoConfigDataSlice + Encoding GetAccountInfoConfigEncoding + type GetAccountInfoConfigDataSlice struct + Length uint64 + Offset uint64 + type GetAccountInfoConfigEncoding string + const GetAccountInfoConfigEncodingBase58 + const GetAccountInfoConfigEncodingBase64 + const GetAccountInfoConfigEncodingBase64Zstd + const GetAccountInfoConfigEncodingJsonParsed + type GetAccountInfoResponse struct + Result GetAccountInfoResult + type GetAccountInfoResult struct + Context Context + Value GetAccountInfoResultValue + type GetAccountInfoResultValue struct + Data interface{} + Excutable bool + Lamports uint64 + Owner string + RentEpoch uint64 + type GetBalanceConfig struct + Commitment Commitment + type GetBalanceResponse struct + Result GetBalanceResult + type GetBalanceResult struct + Context Context + Value uint64 + type GetBlockCommitmentResponse struct + Commitment []uint64 + TotalStake uint64 + type GetBlockConfig struct + Commitment Commitment + type GetBlockHeightConfig struct + Commitment Commitment + type GetBlockResponse struct + BlockTime int64 + Blockhash string + ParentSLot uint64 + PreviousBlockhash string + Rewards []struct{ ... } + Transactions []struct{ ... } + type GetBlocksConfig struct + Commitment Commitment + type GetBlocksWithLimitConfig struct + Commitment Commitment + type GetClusterNodesResponse struct + FeatureSet *uint64 + Gossip string + Pubkey string + RPC string + ShredVersion int + Tpu string + Version *string + type GetConfirmBlockResponse struct + BlockTime int64 + Blockhash string + ParentSLot uint64 + PreviousBlockhash string + Rewards []struct{ ... } + Transactions []struct{ ... } + type GetConfirmedSignaturesForAddress struct + BlockTime *int64 + Err interface{} + Memo *string + Signature string + Slot int64 + type GetConfirmedSignaturesForAddressConfig struct + Before string + Commitment Commitment + Limit int + Until string + type GetConfirmedTransactionResponse struct + Meta TransactionMeta + Slot uint64 + Transaction Transaction + type GetEpochInfoResponse struct + AbsoluteSlot uint64 + BlockHeight uint64 + Epoch uint64 + SlotIndex uint64 + SlotsInEpoch uint64 + type GetInflationRate struct + Epoch int64 + Foundation float64 + Total float64 + Validator float64 + type GetProgramAccounts struct + Account GetProgramAccountsAccount + Pubkey string + type GetProgramAccountsAccount struct + Data interface{} + Executable bool + Lamports uint64 + Owner string + RentEpoch uint64 + type GetProgramAccountsConfig struct + Commitment Commitment + DataSlice *GetProgramAccountsConfigDataSlice + Encoding GetProgramAccountsConfigEncoding + Filters []GetProgramAccountsConfigFilter + type GetProgramAccountsConfigDataSlice struct + Length uint64 + Offset uint64 + type GetProgramAccountsConfigEncoding string + const GetProgramAccountsConfigEncodingBase58 + const GetProgramAccountsConfigEncodingBase64 + const GetProgramAccountsConfigEncodingBase64Zstd + const GetProgramAccountsConfigEncodingJsonParsed + type GetProgramAccountsConfigFilter struct + DataSize uint64 + MemCmp *GetProgramAccountsConfigFilterMemCmp + type GetProgramAccountsConfigFilterMemCmp struct + Bytes string + Offset uint64 + type GetProgramAccountsResponse struct + Result []GetProgramAccounts + type GetProgramAccountsWithContextResponse struct + Result GetProgramAccountsWithContextResult + type GetProgramAccountsWithContextResult struct + Context Context + Value []GetProgramAccounts + type GetRecentBlockHashResponse struct + Result GetRecentBlockHashResult + type GetRecentBlockHashResult struct + Context Context + Value GetRecentBlockHashResultValue + type GetRecentBlockHashResultValue struct + Blockhash string + FeeCalculator FeeCalculator + type GetRecentBlockhashConfig struct + Commitment Commitment + type GetSignatureStatusesResponse struct + ConfirmationStatus *Commitment + Confirmations *uint64 + Err interface{} + Slot uint64 + type GetSignaturesForAddress struct + BlockTime *int64 + Err interface{} + Memo *string + Signature string + Slot uint64 + type GetSignaturesForAddressConfig struct + Before string + Commitment Commitment + Limit int + Until string + type GetSlotConfig struct + Commitment Commitment + type GetSlotResponse struct + Result uint64 + type GetStakeActivationConfig struct + Commitment Commitment + Epoch uint64 + type GetStakeActivationResponse struct + Active uint64 + Inactive uint64 + State StakeActivationState + type GetTokenAccountBalanceConfig struct + Commitment Commitment + type GetTokenAccountBalanceResponse struct + Result GetTokenAccountBalanceResult + type GetTokenAccountBalanceResult struct + Context Context + Value GetTokenAccountBalanceResultValue + type GetTokenAccountBalanceResultValue struct + Amount string + Decimals uint8 + UIAmountString string + type GetTokenSupply struct + Amount string + Decimals int64 + UIAmountString string + type GetTransaction struct + Meta TransactionMeta + Slot uint64 + Transaction Transaction + type GetTransactionWithLimitConfig struct + Commitment Commitment + type GetVersionResponse struct + FeatureSet uint64 + SolanaCore string + type Instruction struct + Accounts []uint64 + Data string + ProgramIDIndex uint64 + type Message struct + AccountKeys []string + Header MessageHeader + Instructions []Instruction + RecentBlockhash string + type MessageHeader struct + NumReadonlySignedAccounts uint8 + NumReadonlyUnsignedAccounts uint8 + NumRequiredSignatures uint8 + type RpcClient struct + func NewRpcClient(endpoint string) RpcClient + func (c *RpcClient) Call(ctx context.Context, params ...interface{}) ([]byte, error) + func (c *RpcClient) GetAccountInfo(ctx context.Context, base58Addr string) (GetAccountInfoResponse, error) + func (c *RpcClient) GetAccountInfoWithCfg(ctx context.Context, base58Addr string, cfg GetAccountInfoConfig) (GetAccountInfoResponse, error) + func (c *RpcClient) GetBalance(ctx context.Context, base58Addr string) (GetBalanceResponse, error) + func (c *RpcClient) GetBalanceWithCfg(ctx context.Context, base58Addr string, cfg GetBalanceConfig) (GetBalanceResponse, error) + func (c *RpcClient) GetProgramAccounts(ctx context.Context, programId string) (GetProgramAccountsResponse, error) + func (c *RpcClient) GetProgramAccountsWithConfig(ctx context.Context, programId string, cfg GetProgramAccountsConfig) (GetProgramAccountsResponse, error) + func (c *RpcClient) GetProgramAccountsWithContext(ctx context.Context, programId string) (GetProgramAccountsWithContextResponse, error) + func (c *RpcClient) GetProgramAccountsWithContextAndConfig(ctx context.Context, programId string, cfg GetProgramAccountsConfig) (GetProgramAccountsWithContextResponse, error) + func (c *RpcClient) GetRecentBlockhash(ctx context.Context) (GetRecentBlockHashResponse, error) + func (c *RpcClient) GetRecentBlockhashWithConfig(ctx context.Context, cfg GetRecentBlockhashConfig) (GetRecentBlockHashResponse, error) + func (c *RpcClient) GetSlot(ctx context.Context) (GetSlotResponse, error) + func (c *RpcClient) GetSlotWithCfg(ctx context.Context, cfg GetSlotConfig) (GetSlotResponse, error) + func (c *RpcClient) GetTokenAccountBalance(ctx context.Context, base58Addr string) (GetTokenAccountBalanceResponse, error) + func (c *RpcClient) GetTokenAccountBalanceWithCfg(ctx context.Context, base58Addr string, cfg GetTokenAccountBalanceConfig) (GetTokenAccountBalanceResponse, error) + func (c *RpcClient) SendTransaction(ctx context.Context, tx string) (SendTransactionResponse, error) + func (c *RpcClient) SendTransactionWithConfig(ctx context.Context, tx string, cfg SendTransactionConfig) (SendTransactionResponse, error) + func (s *RpcClient) GetBlock(ctx context.Context, slot uint64, cfg GetBlockConfig) (GetBlockResponse, error) + func (s *RpcClient) GetBlockCommitment(ctx context.Context, slot uint64) (GetBlockCommitmentResponse, error) + func (s *RpcClient) GetBlockHeight(ctx context.Context, cfg GetBlockHeightConfig) (uint64, error) + func (s *RpcClient) GetBlockTime(ctx context.Context, slot uint64) (int64, error) + func (s *RpcClient) GetBlocks(ctx context.Context, startSlot uint64, endSlot uint64, cfg GetBlocksConfig) ([]uint64, error) + func (s *RpcClient) GetBlocksWithLimit(ctx context.Context, startSlot uint64, limit uint64, ...) ([]uint64, error) + func (s *RpcClient) GetClusterNodes(ctx context.Context) ([]GetClusterNodesResponse, error) + func (s *RpcClient) GetConfirmedBlock(ctx context.Context, slot uint64) (GetConfirmBlockResponse, error) + func (s *RpcClient) GetConfirmedBlocks(ctx context.Context, startSlot uint64, endSlot uint64) ([]uint64, error) + func (s *RpcClient) GetConfirmedBlocksWithLimit(ctx context.Context, startSlot uint64, limit uint64) ([]uint64, error) + func (s *RpcClient) GetConfirmedSignaturesForAddress(ctx context.Context, base58Addr string, ...) ([]GetConfirmedSignaturesForAddress, error) + func (s *RpcClient) GetConfirmedTransaction(ctx context.Context, txhash string) (GetConfirmedTransactionResponse, error) + func (s *RpcClient) GetEpochInfo(ctx context.Context, commitment Commitment) (GetEpochInfoResponse, error) + func (s *RpcClient) GetFirstAvailableBlock(ctx context.Context) (uint64, error) + func (s *RpcClient) GetGenesisHash(ctx context.Context) (string, error) + func (s *RpcClient) GetIdentity(ctx context.Context) (string, error) + func (s *RpcClient) GetInflationRate(ctx context.Context) (GetInflationRate, error) + func (s *RpcClient) GetMinimumBalanceForRentExemption(ctx context.Context, accountDataLen uint64) (uint64, error) + func (s *RpcClient) GetSignatureStatuses(ctx context.Context, signatures []string) ([]GetSignatureStatusesResponse, error) + func (s *RpcClient) GetSignaturesForAddress(ctx context.Context, base58Addr string, ...) ([]GetConfirmedSignaturesForAddress, error) + func (s *RpcClient) GetStakeActivation(ctx context.Context, address string, cfg GetStakeActivationConfig) (GetStakeActivationResponse, error) + func (s *RpcClient) GetTokenSupply(ctx context.Context, mintBase58Addr string, commitment Commitment) (GetTokenSupply, error) + func (s *RpcClient) GetTransaction(ctx context.Context, txhash string, cfg GetTransactionWithLimitConfig) (GetConfirmedTransactionResponse, error) + func (s *RpcClient) GetTransactionCount(ctx context.Context) (uint64, error) + func (s *RpcClient) GetVersion(ctx context.Context) (GetVersionResponse, error) + func (s *RpcClient) MinimumLedgerSlot(ctx context.Context) (uint64, error) + func (s *RpcClient) RequestAirdrop(ctx context.Context, base58Addr string, lamport uint64) (string, error) + func (s *RpcClient) SimulateTransaction(ctx context.Context, rawTx string, cfg SimulateTransactionConfig) (SimulateTransactionResponse, error) + type SendTransactionConfig struct + Encoding SendTransactionConfigEncoding + MaxRetries uint64 + PreflightCommitment Commitment + SkipPreflight bool + type SendTransactionConfigEncoding string + const SendTransactionConfigEncodingBase58 + const SendTransactionConfigEncodingBase64 + type SendTransactionResponse struct + Result string + type SimulateTransactionConfig struct + Accounts *SimulateTransactionConfigAccounts + Encoding SimulateTransactionEncoding + PreflightCommitment Commitment + ReplaceRecentBlockhash bool + SigVerify bool + type SimulateTransactionConfigAccounts struct + Addresses []string + Encoding string + type SimulateTransactionConfigAccountsEncoding string + type SimulateTransactionEncoding string + const SimulateTransactionEncodingBase58 + const SimulateTransactionEncodingBase64 + type SimulateTransactionResponse struct + Accounts []GetAccountInfoResponse + Err interface{} + Logs []string + type StakeActivationState string + const StakeActivationStateActivating + const StakeActivationStateActive + const StakeActivationStateDeactivating + const StakeActivationStateInactive + type Transaction struct + Message Message + Signatures []string + type TransactionMeta struct + Err interface{} + Fee uint64 + InnerInstructions []struct{ ... } + LogMessages []string + PostBalances []int64 + PostTokenBalances []TransactionMetaTokenBalance + PreBalances []int64 + PreTokenBalances []TransactionMetaTokenBalance + Status map[string]interface{} + type TransactionMetaTokenBalance struct + AccountIndex int + Mint string + UITokenAmount struct{ ... }