Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2024 Changes in this version + type AccountInfo struct + Data []byte + Executable bool + Lamports uint64 + Owner common.PublicKey + RentEpoch uint64 + type Block struct + BlockHeight *int64 + BlockTime *time.Time + Blockhash string + ParentSlot uint64 + PreviousBlockhash string + Rewards []Reward + Signatures []string + Transactions []BlockTransaction + type BlockTransaction struct + AccountKeys []common.PublicKey + Meta *TransactionMeta + Transaction types.Transaction + type Client struct + RpcClient rpc.RpcClient + func New(opts ...rpc.Option) *Client + func NewClient(endpoint string) *Client + func (c *Client) GetAccountInfo(ctx context.Context, base58Addr string) (AccountInfo, error) + func (c *Client) GetAccountInfoAndContext(ctx context.Context, base58Addr string) (rpc.ValueWithContext[AccountInfo], error) + func (c *Client) GetAccountInfoAndContextWithConfig(ctx context.Context, base58Addr string, cfg GetAccountInfoConfig) (rpc.ValueWithContext[AccountInfo], error) + func (c *Client) GetAccountInfoWithConfig(ctx context.Context, base58Addr string, cfg GetAccountInfoConfig) (AccountInfo, error) + func (c *Client) GetBalance(ctx context.Context, base58Addr string) (uint64, error) + func (c *Client) GetBalanceAndContext(ctx context.Context, base58Addr string) (rpc.ValueWithContext[uint64], error) + func (c *Client) GetBalanceAndContextWithConfig(ctx context.Context, base58Addr string, cfg GetBalanceConfig) (rpc.ValueWithContext[uint64], error) + func (c *Client) GetBalanceWithConfig(ctx context.Context, base58Addr string, cfg GetBalanceConfig) (uint64, error) + func (c *Client) GetBlock(ctx context.Context, slot uint64) (*Block, error) + func (c *Client) GetBlockTime(ctx context.Context, slot uint64) (*int64, error) + func (c *Client) GetBlockWithConfig(ctx context.Context, slot uint64, cfg GetBlockConfig) (*Block, error) + func (c *Client) GetClusterNodes(ctx context.Context) ([]ClusterNode, error) + func (c *Client) GetEpochInfo(ctx context.Context) (GetEpochInfo, error) + func (c *Client) GetFeeForMessage(ctx context.Context, message types.Message) (*uint64, error) + func (c *Client) GetFeeForMessageAndContext(ctx context.Context, message types.Message) (rpc.ValueWithContext[*uint64], error) + func (c *Client) GetFeeForMessageAndContextWithConfig(ctx context.Context, message types.Message, cfg GetFeeForMessageConfig) (rpc.ValueWithContext[*uint64], error) + func (c *Client) GetFeeForMessageWithConfig(ctx context.Context, message types.Message, cfg GetFeeForMessageConfig) (*uint64, error) + func (c *Client) GetFirstAvailableBlock(ctx context.Context) (uint64, error) + func (c *Client) GetGenesisHash(ctx context.Context) (string, error) + func (c *Client) GetHealth(ctx context.Context) (bool, error) + func (c *Client) GetIdentity(ctx context.Context) (rpc.GetIdentity, error) + func (c *Client) GetLatestBlockhash(ctx context.Context) (rpc.GetLatestBlockhashValue, error) + func (c *Client) GetLatestBlockhashAndContext(ctx context.Context) (rpc.ValueWithContext[rpc.GetLatestBlockhashValue], error) + func (c *Client) GetLatestBlockhashAndContextWithConfig(ctx context.Context, cfg GetLatestBlockhashConfig) (rpc.ValueWithContext[rpc.GetLatestBlockhashValue], error) + func (c *Client) GetLatestBlockhashWithConfig(ctx context.Context, cfg GetLatestBlockhashConfig) (rpc.GetLatestBlockhashValue, error) + func (c *Client) GetMinimumBalanceForRentExemption(ctx context.Context, dataLen uint64) (uint64, error) + func (c *Client) GetMinimumBalanceForRentExemptionWithConfig(ctx context.Context, dataLen uint64, ...) (uint64, error) + func (c *Client) GetMultipleAccounts(ctx context.Context, addrs []string) ([]AccountInfo, error) + func (c *Client) GetMultipleAccountsAndContext(ctx context.Context, addrs []string) (rpc.ValueWithContext[[]AccountInfo], error) + func (c *Client) GetMultipleAccountsAndContextWithConfig(ctx context.Context, addrs []string, cfg GetMultipleAccountsConfig) (rpc.ValueWithContext[[]AccountInfo], error) + func (c *Client) GetMultipleAccountsWithConfig(ctx context.Context, addrs []string, cfg GetMultipleAccountsConfig) ([]AccountInfo, error) + func (c *Client) GetNonceAccount(ctx context.Context, base58Addr string) (system.NonceAccount, error) + func (c *Client) GetNonceFromNonceAccount(ctx context.Context, base58Addr string) (string, error) + func (c *Client) GetRecentPrioritizationFees(ctx context.Context, addresses []common.PublicKey) (rpc.PrioritizationFees, error) + func (c *Client) GetSignatureStatus(ctx context.Context, signature string) (*rpc.SignatureStatus, error) + func (c *Client) GetSignatureStatusWithConfig(ctx context.Context, signature string, cfg GetSignatureStatusesConfig) (*rpc.SignatureStatus, error) + func (c *Client) GetSignatureStatuses(ctx context.Context, signatures []string) (rpc.SignatureStatuses, error) + func (c *Client) GetSignatureStatusesWithConfig(ctx context.Context, signatures []string, cfg GetSignatureStatusesConfig) (rpc.SignatureStatuses, error) + func (c *Client) GetSignaturesForAddress(ctx context.Context, addr string) (rpc.GetSignaturesForAddress, error) + func (c *Client) GetSignaturesForAddressWithConfig(ctx context.Context, addr string, cfg GetSignaturesForAddressConfig) (rpc.GetSignaturesForAddress, error) + func (c *Client) GetSlot(ctx context.Context) (uint64, error) + func (c *Client) GetSlotLeader(ctx context.Context) (string, error) + func (c *Client) GetSlotLeaderWithConfig(ctx context.Context, cfg GetSlotLeaderConfig) (string, error) + func (c *Client) GetSlotLeaders(ctx context.Context, startSlot uint64, limit uint64) ([]string, error) + func (c *Client) GetSlotWithConfig(ctx context.Context, cfg GetSlotConfig) (uint64, error) + func (c *Client) GetTokenAccount(ctx context.Context, base58Addr string) (token.TokenAccount, error) + func (c *Client) GetTokenAccountBalance(ctx context.Context, addr string) (TokenAmount, error) + func (c *Client) GetTokenAccountBalanceAndContext(ctx context.Context, addr string) (rpc.ValueWithContext[TokenAmount], error) + func (c *Client) GetTokenAccountBalanceAndContextWithConfig(ctx context.Context, addr string, cfg GetTokenAccountBalanceConfig) (rpc.ValueWithContext[TokenAmount], error) + func (c *Client) GetTokenAccountBalanceWithConfig(ctx context.Context, addr string, cfg GetTokenAccountBalanceConfig) (TokenAmount, error) + func (c *Client) GetTokenAccountsByOwnerByMint(ctx context.Context, owner, mintAddr string) ([]TokenAccount, error) + func (c *Client) GetTokenAccountsByOwnerByProgram(ctx context.Context, owner, programId string) ([]TokenAccount, error) + func (c *Client) GetTokenAccountsByOwnerWithContextByMint(ctx context.Context, owner, mintAddr string) (rpc.ValueWithContext[[]TokenAccount], error) + func (c *Client) GetTokenAccountsByOwnerWithContextByProgram(ctx context.Context, owner, programId string) (rpc.ValueWithContext[[]TokenAccount], error) + func (c *Client) GetTokenSupply(ctx context.Context, mintAddr string) (TokenAmount, error) + func (c *Client) GetTokenSupplyAndContext(ctx context.Context, mintAddr string) (rpc.ValueWithContext[TokenAmount], error) + func (c *Client) GetTokenSupplyAndContextWithConfig(ctx context.Context, mintAddr string, cfg GetTokenSupplyConfig) (rpc.ValueWithContext[TokenAmount], error) + func (c *Client) GetTokenSupplyWithConfig(ctx context.Context, mintAddr string, cfg GetTokenSupplyConfig) (TokenAmount, error) + func (c *Client) GetTransaction(ctx context.Context, txhash string) (*Transaction, error) + func (c *Client) GetTransactionCount(ctx context.Context) (uint64, error) + func (c *Client) GetTransactionCountWithConfig(ctx context.Context, cfg GetTransactionCountConfig) (uint64, error) + func (c *Client) GetTransactionWithConfig(ctx context.Context, txhash string, cfg GetTransactionConfig) (*Transaction, error) + func (c *Client) GetVersion(ctx context.Context) (rpc.GetVersion, error) + func (c *Client) GetVoteAccounts(ctx context.Context) (VoteAccountStatus, error) + func (c *Client) IsBlockhashValid(ctx context.Context, blockhash string) (bool, error) + func (c *Client) IsBlockhashValidAndContext(ctx context.Context, blockhash string) (rpc.ValueWithContext[bool], error) + func (c *Client) IsBlockhashValidAndContextWithConfig(ctx context.Context, blockhash string, cfg IsBlockhashValidConfig) (rpc.ValueWithContext[bool], error) + func (c *Client) IsBlockhashValidWithConfig(ctx context.Context, blockhash string, cfg IsBlockhashValidConfig) (bool, error) + func (c *Client) MinimumLedgerSlot(ctx context.Context) (uint64, error) + func (c *Client) QuickSendTransaction(ctx context.Context, param QuickSendTransactionParam) (string, error) + func (c *Client) RequestAirdrop(ctx context.Context, base58Addr string, lamports uint64) (string, error) + func (c *Client) RequestAirdropWithConfig(ctx context.Context, base58Addr string, lamports uint64, ...) (string, error) + func (c *Client) SendTransaction(ctx context.Context, tx types.Transaction) (string, error) + func (c *Client) SendTransactionWithConfig(ctx context.Context, tx types.Transaction, cfg SendTransactionConfig) (string, error) + func (c *Client) SimulateTransaction(ctx context.Context, tx types.Transaction) (SimulateTransaction, error) + func (c *Client) SimulateTransactionAndContext(ctx context.Context, tx types.Transaction) (rpc.ValueWithContext[SimulateTransaction], error) + func (c *Client) SimulateTransactionAndContextWithConfig(ctx context.Context, tx types.Transaction, cfg SimulateTransactionConfig) (rpc.ValueWithContext[SimulateTransaction], error) + func (c *Client) SimulateTransactionWithConfig(ctx context.Context, tx types.Transaction, cfg SimulateTransactionConfig) (SimulateTransaction, error) + type ClusterNode struct + FeatureSet *uint32 + Gossip *string + Pubkey common.PublicKey + Rpc *string + ShredVersion *uint16 + Tpu *string + Version *string + type EpochCredits struct + Credits uint64 + Epoch uint64 + PreviousCredits uint64 + type GetAccountInfoConfig struct + Commitment rpc.Commitment + DataSlice *rpc.DataSlice + type GetBalanceConfig struct + Commitment rpc.Commitment + type GetBlockConfig struct + Commitment rpc.Commitment + Rewards *bool + TransactionDetails rpc.GetBlockConfigTransactionDetails + type GetEpochInfo struct + AbsoluteSlot uint64 + BlockHeight uint64 + Epoch uint64 + SlotIndex uint64 + SlotsInEpoch uint64 + TransactionCount *uint64 + type GetFeeForMessageConfig struct + Commitment rpc.Commitment + type GetLatestBlockhashConfig struct + Commitment rpc.Commitment + type GetLatestBlockhashValue struct + Commitment rpc.Commitment + type GetMinimumBalanceForRentExemptionConfig struct + Commitment rpc.Commitment + type GetMultipleAccountsConfig struct + Commitment rpc.Commitment + DataSlice *rpc.DataSlice + type GetSignatureStatusesConfig struct + SearchTransactionHistory bool + type GetSignaturesForAddressConfig struct + Before string + Commitment rpc.Commitment + Limit int + Until string + type GetSlotConfig struct + Commitment rpc.Commitment + type GetSlotLeaderConfig struct + Commitment *rpc.Commitment + MinContextSlot *uint64 + type GetTokenAccountBalanceConfig struct + Commitment rpc.Commitment + type GetTokenSupplyConfig struct + Commitment rpc.Commitment + type GetTransactionConfig struct + Commitment rpc.Commitment + type GetTransactionCountConfig struct + Commitment rpc.Commitment + type InnerInstruction struct + Index uint64 + Instructions []types.CompiledInstruction + type IsBlockhashValidConfig struct + Commitment rpc.Commitment + type QuickSendTransactionParam struct + FeePayer common.PublicKey + Instructions []types.Instruction + Signers []types.Account + type RequestAirdropConfig struct + Commitment rpc.Commitment + type ReturnData struct + Data []byte + ProgramId common.PublicKey + type Reward struct + Commission *uint8 + Lamports int64 + PostBalances uint64 + Pubkey common.PublicKey + RewardType *rpc.RewardType + type SendTransactionConfig struct + MaxRetries uint64 + PreflightCommitment rpc.Commitment + SkipPreflight bool + type SimulateTransaction struct + Accounts []*AccountInfo + Err any + Logs []string + ReturnData *ReturnData + UnitConsumed *uint64 + type SimulateTransactionConfig struct + Addresses []string + Commitment rpc.Commitment + ReplaceRecentBlockhash bool + SigVerify bool + type TokenAccount struct + PublicKey common.PublicKey + type TokenAmount struct + Amount uint64 + Decimals uint8 + UIAmountString string + type Transaction struct + AccountKeys []common.PublicKey + BlockTime *int64 + Meta *TransactionMeta + Slot uint64 + Transaction types.Transaction + func (t Transaction) Version() types.MessageVersion + type TransactionMeta struct + ComputeUnitsConsumed *uint64 + Err any + Fee uint64 + InnerInstructions []InnerInstruction + LoadedAddresses rpc.TransactionLoadedAddresses + LogMessages []string + PostBalances []int64 + PostTokenBalances []rpc.TransactionMetaTokenBalance + PreBalances []int64 + PreTokenBalances []rpc.TransactionMetaTokenBalance + ReturnData *ReturnData + type VoteAccountInfo struct + ActivatedStake uint64 + Commission uint8 + EpochCredits []EpochCredits + EpochVoteAccount bool + LastVote uint64 + NodePubkey common.PublicKey + RootSlot uint64 + VotePubkey common.PublicKey + type VoteAccountStatus struct + Current []VoteAccountInfo + Delinquent []VoteAccountInfo