Documentation
¶
Index ¶
- Constants
- type Commitment
- type Context
- type ErrorResponse
- type FeeCalculator
- type FeeRateGovernor
- type GeneralResponse
- type GetAccountInfoConfig
- type GetAccountInfoConfigDataSlice
- type GetAccountInfoConfigEncoding
- type GetAccountInfoResponse
- type GetAccountInfoResult
- type GetAccountInfoResultValue
- type GetBalanceConfig
- type GetBalanceResponse
- type GetBalanceResult
- type GetBlockCommitmentResponse
- type GetBlockCommitmentResult
- type GetBlockConfig
- type GetBlockConfigEncoding
- type GetBlockConfigTransactionDetails
- type GetBlockHeightConfig
- type GetBlockHeightResponse
- type GetBlockProductionConfig
- type GetBlockProductionRange
- type GetBlockProductionResponse
- type GetBlockProductionResponseResult
- type GetBlockProductionResponseResultValue
- type GetBlockResponse
- type GetBlockResponseResult
- type GetBlockReward
- type GetBlockRewardType
- type GetBlockTimeResponse
- type GetBlockTransaction
- type GetBlocksConfig
- type GetBlocksResponse
- type GetBlocksWithLimitConfig
- type GetBlocksWithLimitResponse
- type GetClusterNodesResponse
- type GetClusterNodesResponseResult
- type GetEpochInfoConfig
- type GetEpochInfoResponse
- type GetEpochInfoResponseResult
- type GetEpochScheduleResponse
- type GetEpochScheduleResponseResult
- type GetFeeCalculatorForBlockhashConfig
- type GetFeeCalculatorForBlockhashResponse
- type GetFeeCalculatorForBlockhashResponseResult
- type GetFeeCalculatorForBlockhashResponseResultValue
- type GetFeeForMessageConfig
- type GetFeeForMessageResponse
- type GetFeeForMessageResult
- type GetFeeRateGovernorResponse
- type GetFeeRateGovernorResponseResult
- type GetFeeRateGovernorResponseResultValue
- type GetFeesConfig
- type GetFeesResponse
- type GetFeesResponseResult
- type GetFeesResponseResultValue
- type GetFirstAvailableBlockResponse
- type GetGenesisHashResponse
- type GetIdentityResponse
- type GetIdentityResult
- type GetInflationGovernorConfig
- type GetInflationGovernorResponse
- type GetInflationGovernorResponseResult
- type GetInflationRateResponse
- type GetInflationRateResult
- type GetInflationRewardConfig
- type GetInflationRewardResponse
- type GetInflationRewardResponseResultValue
- type GetInflationRewardResult
- type GetLatestBlockhashConfig
- type GetLatestBlockhashResponse
- type GetLatestBlockhashResult
- type GetLatestBlockhashValue
- type GetMinimumBalanceForRentExemptionConfig
- type GetMinimumBalanceForRentExemptionResponse
- type GetMultipleAccountsConfig
- type GetMultipleAccountsConfigDataSlice
- type GetMultipleAccountsConfigEncoding
- type GetMultipleAccountsResponse
- type GetMultipleAccountsResult
- type GetMultipleAccountsResultValue
- type GetProgramAccounts
- type GetProgramAccountsAccount
- type GetProgramAccountsConfig
- type GetProgramAccountsConfigDataSlice
- type GetProgramAccountsConfigEncoding
- type GetProgramAccountsConfigFilter
- type GetProgramAccountsConfigFilterMemCmp
- type GetProgramAccountsResponse
- type GetProgramAccountsWithContextResponse
- type GetProgramAccountsWithContextResult
- type GetRecentBlockHashResponse
- type GetRecentBlockHashResult
- type GetRecentBlockHashResultValue
- type GetRecentBlockhashConfig
- type GetSignatureStatusesConfig
- type GetSignatureStatusesResponse
- type GetSignatureStatusesResult
- type GetSignatureStatusesResultValue
- type GetSignaturesForAddressConfig
- type GetSignaturesForAddressResponse
- type GetSignaturesForAddressResult
- type GetSlotConfig
- type GetSlotResponse
- type GetTokenAccountBalanceConfig
- type GetTokenAccountBalanceResponse
- type GetTokenAccountBalanceResult
- type GetTokenAccountBalanceResultValue
- type GetTokenAccountsByOwnerConfig
- type GetTokenAccountsByOwnerConfigDataSlice
- type GetTokenAccountsByOwnerConfigEncoding
- type GetTokenAccountsByOwnerConfigFilter
- type GetTokenAccountsByOwnerResponse
- type GetTokenAccountsByOwnerResponseResult
- type GetTokenSupplyConfig
- type GetTokenSupplyResponse
- type GetTokenSupplyResult
- type GetTokenSupplyResultValue
- type GetTransactionConfig
- type GetTransactionConfigEncoding
- type GetTransactionCountConfig
- type GetTransactionCountResponse
- type GetTransactionResponse
- type GetTransactionResult
- type GetVersionResponse
- type GetVersionResult
- type Instruction
- type IsBlockhashValidConfig
- type IsBlockhashValidResponse
- type IsBlockhashValidResult
- type MinimumLedgerSlotResponse
- type RequestAirdropConfig
- type RequestAirdropResponse
- type 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) GetAccountInfoWithConfig(ctx context.Context, base58Addr string, cfg GetAccountInfoConfig) (GetAccountInfoResponse, error)
- func (c *RpcClient) GetBalance(ctx context.Context, base58Addr string) (GetBalanceResponse, error)
- func (c *RpcClient) GetBalanceWithConfig(ctx context.Context, base58Addr string, cfg GetBalanceConfig) (GetBalanceResponse, error)
- func (c *RpcClient) GetBlock(ctx context.Context, slot uint64) (GetBlockResponse, error)
- func (c *RpcClient) GetBlockCommitment(ctx context.Context, slot uint64) (GetBlockCommitmentResponse, error)
- func (c *RpcClient) GetBlockHeight(ctx context.Context) (GetBlockHeightResponse, error)
- func (c *RpcClient) GetBlockHeightWithConfig(ctx context.Context, cfg GetBlockHeightConfig) (GetBlockHeightResponse, error)
- func (c *RpcClient) GetBlockProduction(ctx context.Context) (GetBlockProductionResponse, error)
- func (c *RpcClient) GetBlockProductionWithConfig(ctx context.Context, cfg GetBlockProductionConfig) (GetBlockProductionResponse, error)
- func (c *RpcClient) GetBlockTime(ctx context.Context, slot uint64) (GetBlockTimeResponse, error)
- func (c *RpcClient) GetBlockWithConfig(ctx context.Context, slot uint64, cfg GetBlockConfig) (GetBlockResponse, error)
- func (c *RpcClient) GetBlocks(ctx context.Context, startSlot uint64, endSlot uint64) (GetBlocksResponse, error)
- func (c *RpcClient) GetBlocksWithConfig(ctx context.Context, startSlot uint64, endSlot uint64, cfg GetBlocksConfig) (GetBlocksResponse, error)
- func (c *RpcClient) GetBlocksWithLimit(ctx context.Context, startSlot uint64, limit uint64) (GetBlocksWithLimitResponse, error)
- func (c *RpcClient) GetBlocksWithLimitWithConfig(ctx context.Context, startSlot uint64, limit uint64, ...) (GetBlocksWithLimitResponse, error)
- func (c *RpcClient) GetClusterNodes(ctx context.Context) (GetClusterNodesResponse, error)
- func (c *RpcClient) GetEpochInfo(ctx context.Context) (GetEpochInfoResponse, error)
- func (c *RpcClient) GetEpochInfoWithConfig(ctx context.Context, cfg GetEpochInfoConfig) (GetEpochInfoResponse, error)
- func (c *RpcClient) GetEpochSchedule(ctx context.Context) (GetEpochScheduleResponse, error)
- func (c *RpcClient) GetFeeCalculatorForBlockhash(ctx context.Context, base58Addr string) (GetFeeCalculatorForBlockhashResponse, error)
- func (c *RpcClient) GetFeeCalculatorForBlockhashWithConfig(ctx context.Context, base58Addr string, cfg GetFeeCalculatorForBlockhashConfig) (GetFeeCalculatorForBlockhashResponse, error)
- func (c *RpcClient) GetFeeForMessage(ctx context.Context, message string) (GetFeeForMessageResponse, error)
- func (c *RpcClient) GetFeeForMessageWithConfig(ctx context.Context, message string, cfg GetFeeForMessageConfig) (GetFeeForMessageResponse, error)
- func (c *RpcClient) GetFeeRateGovernor(ctx context.Context) (GetFeeRateGovernorResponse, error)
- func (c *RpcClient) GetFees(ctx context.Context) (GetFeesResponse, error)
- func (c *RpcClient) GetFeesWithConfig(ctx context.Context, cfg GetFeesConfig) (GetFeesResponse, error)
- func (c *RpcClient) GetFirstAvailableBlock(ctx context.Context) (GetFirstAvailableBlockResponse, error)
- func (c *RpcClient) GetGenesisHash(ctx context.Context) (GetGenesisHashResponse, error)
- func (c *RpcClient) GetIdentity(ctx context.Context) (GetIdentityResponse, error)
- func (c *RpcClient) GetInflationGovernor(ctx context.Context) (GetInflationGovernorResponse, error)
- func (c *RpcClient) GetInflationGovernorWithConfig(ctx context.Context, cfg GetInflationGovernorConfig) (GetInflationGovernorResponse, error)
- func (c *RpcClient) GetInflationRate(ctx context.Context) (GetInflationRateResponse, error)
- func (c *RpcClient) GetInflationReward(ctx context.Context, stakeAccountAddrs []string) (GetInflationRewardResponse, error)
- func (c *RpcClient) GetInflationRewardWithConfig(ctx context.Context, stakeAccountAddrs []string, cfg GetInflationRewardConfig) (GetInflationRewardResponse, error)
- func (c *RpcClient) GetLatestBlockhash(ctx context.Context) (GetLatestBlockhashResponse, error)
- func (c *RpcClient) GetLatestBlockhashWithConfig(ctx context.Context, cfg GetLatestBlockhashConfig) (GetLatestBlockhashResponse, error)
- func (c *RpcClient) GetMinimumBalanceForRentExemption(ctx context.Context, dataLen uint64) (GetMinimumBalanceForRentExemptionResponse, error)
- func (c *RpcClient) GetMinimumBalanceForRentExemptionWithConfig(ctx context.Context, dataLen uint64, ...) (GetMinimumBalanceForRentExemptionResponse, error)
- func (c *RpcClient) GetMultipleAccounts(ctx context.Context, base58Addrs []string) (GetMultipleAccountsResponse, error)
- func (c *RpcClient) GetMultipleAccountsWithConfig(ctx context.Context, base58Addrs []string, cfg GetMultipleAccountsConfig) (GetMultipleAccountsResponse, 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) GetSignatureStatuses(ctx context.Context, signatures []string) (GetSignatureStatusesResponse, error)
- func (c *RpcClient) GetSignatureStatusesWithConfig(ctx context.Context, signatures []string, cfg GetSignatureStatusesConfig) (GetSignatureStatusesResponse, error)
- func (c *RpcClient) GetSignaturesForAddress(ctx context.Context, base58Addr string) (GetSignaturesForAddressResponse, error)
- func (c *RpcClient) GetSignaturesForAddressWithConfig(ctx context.Context, base58Addr string, cfg GetSignaturesForAddressConfig) (GetSignaturesForAddressResponse, error)
- func (c *RpcClient) GetSlot(ctx context.Context) (GetSlotResponse, error)
- func (c *RpcClient) GetSlotWithConfig(ctx context.Context, cfg GetSlotConfig) (GetSlotResponse, error)
- func (c *RpcClient) GetTokenAccountBalance(ctx context.Context, base58Addr string) (GetTokenAccountBalanceResponse, error)
- func (c *RpcClient) GetTokenAccountBalanceWithConfig(ctx context.Context, base58Addr string, cfg GetTokenAccountBalanceConfig) (GetTokenAccountBalanceResponse, error)
- func (c *RpcClient) GetTokenAccountsByOwner(ctx context.Context, base58Addr string, ...) (GetTokenAccountsByOwnerResponse, error)
- func (c *RpcClient) GetTokenAccountsByOwnerWithConfig(ctx context.Context, base58Addr string, ...) (GetTokenAccountsByOwnerResponse, error)
- func (c *RpcClient) GetTokenSupply(ctx context.Context, mintAddr string) (GetTokenSupplyResponse, error)
- func (c *RpcClient) GetTokenSupplyWithConfig(ctx context.Context, mintAddr string, cfg GetTokenSupplyConfig) (GetTokenSupplyResponse, error)
- func (c *RpcClient) GetTransaction(ctx context.Context, txhash string) (GetTransactionResponse, error)
- func (c *RpcClient) GetTransactionCount(ctx context.Context) (GetTransactionCountResponse, error)
- func (c *RpcClient) GetTransactionCountWithConfig(ctx context.Context, cfg GetTransactionCountConfig) (GetTransactionCountResponse, error)
- func (c *RpcClient) GetTransactionWithConfig(ctx context.Context, txhash string, cfg GetTransactionConfig) (GetTransactionResponse, error)
- func (c *RpcClient) GetVersion(ctx context.Context) (GetVersionResponse, error)
- func (c *RpcClient) IsBlockhashValid(ctx context.Context, message string) (IsBlockhashValidResponse, error)
- func (c *RpcClient) IsBlockhashValidWithConfig(ctx context.Context, message string, cfg IsBlockhashValidConfig) (IsBlockhashValidResponse, error)
- func (c *RpcClient) MinimumLedgerSlot(ctx context.Context) (MinimumLedgerSlotResponse, error)
- func (c *RpcClient) RequestAirdrop(ctx context.Context, base58Addr string, lamports uint64) (RequestAirdropResponse, error)
- func (c *RpcClient) RequestAirdropWithConfig(ctx context.Context, base58Addr string, lamports uint64, ...) (RequestAirdropResponse, 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 (c *RpcClient) SimulateTransaction(ctx context.Context, rawTx string) (SimulateTransactionResponse, error)
- func (c *RpcClient) SimulateTransactionWithConfig(ctx context.Context, rawTx string, cfg SimulateTransactionConfig) (SimulateTransactionResponse, error)
- type SendTransactionConfig
- type SendTransactionConfigEncoding
- type SendTransactionResponse
- type SimulateTransactionConfig
- type SimulateTransactionConfigAccounts
- type SimulateTransactionConfigEncoding
- type SimulateTransactionResponse
- type SimulateTransactionResponseResult
- type SimulateTransactionResponseResultValue
- type TransactionMeta
- type TransactionMetaInnerInstruction
- type TransactionMetaReward
- type TransactionMetaRewardType
- type TransactionMetaTokenBalance
Constants ¶
const ( LocalnetRPCEndpoint = "http://localhost:8899" DevnetRPCEndpoint = "https://api.devnet.solana.com" TestnetRPCEndpoint = "https://api.testnet.solana.com" MainnetRPCEndpoint = "https://api.mainnet-beta.solana.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commitment ¶
type Commitment string
Commitment describes how finalized a block is at that point in time
const ( CommitmentFinalized Commitment = "finalized" CommitmentConfirmed Commitment = "confirmed" CommitmentProcessed Commitment = "processed" )
type ErrorResponse ¶
type ErrorResponse struct { Code int `json:"code"` Message string `json:"message"` Data map[string]interface{} `json:"data,omitempty"` }
ErrorResponse is a error rpc response
type FeeCalculator ¶
type FeeCalculator struct {
LamportsPerSignature uint64 `json:"lamportsPerSignature"`
}
FeeCalculator is a list of fee
type FeeRateGovernor ¶ added in v1.10.0
type FeeRateGovernor struct { MaxLamportsPerSignature uint64 `json:"maxLamportsPerSignature"` MinLamportsPerSignature uint64 `json:"minLamportsPerSignature"` TargetLamportsPerSignature uint64 `json:"targetLamportsPerSignature"` TargetSignaturesPerSlot uint64 `json:"targetSignaturesPerSlot"` BurnPercent uint8 `json:"burnPercent"` }
type GeneralResponse ¶
type GeneralResponse struct { JsonRPC string `json:"jsonrpc"` ID uint64 `json:"id"` Error *ErrorResponse `json:"error,omitempty"` }
GeneralResponse is a general rpc response
type GetAccountInfoConfig ¶
type GetAccountInfoConfig struct { Commitment Commitment `json:"commitment,omitempty"` Encoding GetAccountInfoConfigEncoding `json:"encoding,omitempty"` DataSlice *GetAccountInfoConfigDataSlice `json:"dataSlice,omitempty"` }
GetAccountInfoConfig is an option config for `getAccountInfo`
type GetAccountInfoConfigDataSlice ¶
type GetAccountInfoConfigDataSlice struct { Offset uint64 `json:"offset,omitempty"` Length uint64 `json:"length,omitempty"` }
GetAccountInfoConfigDataSlice is a part of GetAccountInfoConfig
type GetAccountInfoConfigEncoding ¶
type GetAccountInfoConfigEncoding string
GetAccountInfoConfigEncoding is account's data encode format
const ( // GetAccountInfoConfigEncodingBase58 limited to Account data of less than 128 bytes GetAccountInfoConfigEncodingBase58 GetAccountInfoConfigEncoding = "base58" GetAccountInfoConfigEncodingJsonParsed GetAccountInfoConfigEncoding = "jsonParsed" GetAccountInfoConfigEncodingBase64 GetAccountInfoConfigEncoding = "base64" GetAccountInfoConfigEncodingBase64Zstd GetAccountInfoConfigEncoding = "base64+zstd" )
type GetAccountInfoResponse ¶
type GetAccountInfoResponse struct { GeneralResponse Result GetAccountInfoResult `json:"result"` }
GetAccountInfoResponse is a full raw rpc response of `getAccountInfo`
type GetAccountInfoResult ¶
type GetAccountInfoResult struct { Context Context `json:"context"` Value GetAccountInfoResultValue `json:"value"` }
GetAccountInfoResult is rpc result of `getAccountInfo`
type GetAccountInfoResultValue ¶
type GetAccountInfoResultValue struct { Lamports uint64 `json:"lamports"` Owner string `json:"owner"` Excutable bool `json:"excutable"` RentEpoch uint64 `json:"rentEpoch"` Data interface{} `json:"data"` }
GetAccountInfoResultValue is rpc result of `getAccountInfo`
type GetBalanceConfig ¶
type GetBalanceConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetBalanceConfig is a option config for `getBalance`
type GetBalanceResponse ¶
type GetBalanceResponse struct { GeneralResponse Result GetBalanceResult `json:"result"` }
GetBalanceResponse is a full raw rpc response of `getBalance`
type GetBalanceResult ¶
GetBalanceResult is a part of raw rpc response of `getBalance`
type GetBlockCommitmentResponse ¶
type GetBlockCommitmentResponse struct { GeneralResponse Result GetBlockCommitmentResult `json:"result"` }
GetBlockCommitmentResponse is a full raw rpc response of `getBlockCommitment`
type GetBlockCommitmentResult ¶
type GetBlockCommitmentResult struct { Commitment *[]uint64 `json:"commitment"` TotalStake uint64 `json:"totalStake"` }
GetBlockCommitmentResult is a part of raw rpc response of `getBlockCommitment`
type GetBlockConfig ¶
type GetBlockConfig struct { Encoding GetBlockConfigEncoding `json:"encoding,omitempty"` // default: "json" TransactionDetails GetBlockConfigTransactionDetails `json:"transactionDetails,omitempty"` // default: "full", either "full", "signatures", "none" Rewards *bool `json:"rewards,omitempty"` // default: true Commitment Commitment `json:"commitment,omitempty"` // "processed" is not supported }
type GetBlockConfigEncoding ¶
type GetBlockConfigEncoding string
const ( GetBlockConfigEncodingJson GetBlockConfigEncoding = "json" GetBlockConfigEncodingJsonParsed GetBlockConfigEncoding = "jsonParsed" GetBlockConfigEncodingBase58 GetBlockConfigEncoding = "base58" GetBlockConfigEncodingBase64 GetBlockConfigEncoding = "base64" )
type GetBlockConfigTransactionDetails ¶
type GetBlockConfigTransactionDetails string
const ( GetBlockConfigTransactionDetailsFull GetBlockConfigTransactionDetails = "full" GetBlockConfigTransactionDetailsSignatures GetBlockConfigTransactionDetails = "signatures" GetBlockConfigTransactionDetailsNone GetBlockConfigTransactionDetails = "none" )
type GetBlockHeightConfig ¶
type GetBlockHeightConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetBlockHeightConfig is a option config for `getBlockHeight`
type GetBlockHeightResponse ¶
type GetBlockHeightResponse struct { GeneralResponse Result uint64 `json:"result"` }
GetBlockHeightResponse is a rpc response of `getBlockHeight`
type GetBlockProductionConfig ¶ added in v1.10.0
type GetBlockProductionConfig struct { Commitment Commitment `json:"commitment,omitempty"` Range *GetBlockProductionRange `json:"range,omitempty"` Identity string `json:"identity,omitempty"` }
GetBlockProductionConfig is a option config for `getBlockProduction`
type GetBlockProductionRange ¶ added in v1.10.0
type GetBlockProductionResponse ¶ added in v1.10.0
type GetBlockProductionResponse struct { GeneralResponse Result GetBlockProductionResponseResult `json:"result"` }
GetBlockProductionResponse is a rpc response of `getBlockProduction`
type GetBlockProductionResponseResult ¶ added in v1.10.0
type GetBlockProductionResponseResult struct { Context Context `json:"context"` Value GetBlockProductionResponseResultValue `json:"value"` }
GetBlockProductionResponseResult is a part of raw rpc response of `getBlockProduction`
type GetBlockProductionResponseResultValue ¶ added in v1.10.0
type GetBlockProductionResponseResultValue struct { ByIdentity map[string][]uint64 `json:"byIdentity"` Range GetBlockProductionRange `json:"range"` }
type GetBlockResponse ¶
type GetBlockResponse struct { GeneralResponse Result GetBlockResponseResult `json:"result"` }
type GetBlockResponseResult ¶
type GetBlockResponseResult struct { Blockhash string `json:"blockhash"` BlockTime *int64 `json:"blockTime"` BlockHeight *int64 `json:"blockHeight"` PreviousBlockhash string `json:"previousBlockhash"` ParentSLot uint64 `json:"parentSlot"` Transactions []GetBlockTransaction `json:"transactions"` Signatures []string `json:"signatures"` Rewards []GetBlockReward `json:"rewards"` }
type GetBlockReward ¶
type GetBlockReward struct { Pubkey string `json:"pubkey"` Lamports int64 `json:"lamports"` PostBalances uint64 `json:"postBalance"` RewardType GetBlockRewardType `json:"rewardType"` Commission *uint8 `json:"commission"` }
type GetBlockRewardType ¶
type GetBlockRewardType string
const ( GetBlockRewardTypeNone GetBlockRewardType = "" GetBlockRewardTypeFee GetBlockRewardType = "fee" GetBlockRewardTypeRent GetBlockRewardType = "rent" GetBlockRewardTypeVoting GetBlockRewardType = "voting" GetBlockRewardTypeStaking GetBlockRewardType = "staking" )
type GetBlockTimeResponse ¶
type GetBlockTimeResponse struct { GeneralResponse Result int64 `json:"result"` }
GetBlockTimeResponse is a full raw rpc response of `getBlockTime`
type GetBlockTransaction ¶
type GetBlockTransaction struct { Transaction interface{} `json:"transaction"` Meta *TransactionMeta `json:"meta"` }
type GetBlocksConfig ¶
type GetBlocksConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetBlocksConfig is a option config for `getBlocks`
type GetBlocksResponse ¶
type GetBlocksResponse struct { GeneralResponse Result []uint64 `json:"result"` }
GetBlocksResponse is a full raw rpc response of `getBlocks`
type GetBlocksWithLimitConfig ¶
type GetBlocksWithLimitConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetBlocksWithLimitConfig is a option config for `getBlocksWithLimit`
type GetBlocksWithLimitResponse ¶
type GetBlocksWithLimitResponse struct { GeneralResponse Result []uint64 `json:"result"` }
GetBlocksWithLimitResponse is a full raw rpc response of `getBlocksWithLimit`
type GetClusterNodesResponse ¶ added in v1.10.0
type GetClusterNodesResponse struct { GeneralResponse Result []GetClusterNodesResponseResult `json:"result"` }
GetClusterNodesResponse is a full raw rpc response of `GetClusterNodes`
type GetClusterNodesResponseResult ¶ added in v1.10.0
type GetEpochInfoConfig ¶
type GetEpochInfoConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetEpochInfoConfig is a option config for `getEpochInfo`
type GetEpochInfoResponse ¶
type GetEpochInfoResponse struct { GeneralResponse Result GetEpochInfoResponseResult `json:"result"` }
GetEpochInfoResponse is a full raw rpc response of `getEpochInfo`
type GetEpochScheduleResponse ¶ added in v1.10.0
type GetEpochScheduleResponse struct { GeneralResponse Result GetEpochScheduleResponseResult `json:"result"` }
GetEpochScheduleResponse is a full raw rpc response of `getEpochSchedule`
type GetEpochScheduleResponseResult ¶ added in v1.10.0
type GetFeeCalculatorForBlockhashConfig ¶ added in v1.10.0
type GetFeeCalculatorForBlockhashConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetFeeCalculatorForBlockhashConfig is a option config for `getFeeCalculatorForBlockhash`
type GetFeeCalculatorForBlockhashResponse ¶ added in v1.10.0
type GetFeeCalculatorForBlockhashResponse struct { GeneralResponse Result GetFeeCalculatorForBlockhashResponseResult `json:"result"` }
GetFeeCalculatorForBlockhashResponse is a full raw rpc response of `getFeeCalculatorForBlockhash`
type GetFeeCalculatorForBlockhashResponseResult ¶ added in v1.10.0
type GetFeeCalculatorForBlockhashResponseResult struct { Context Context `json:"context"` Value *GetFeeCalculatorForBlockhashResponseResultValue `json:"value"` }
GetFeeCalculatorForBlockhashResult is a part of raw rpc response of `getFeeCalculatorForBlockhash`
type GetFeeCalculatorForBlockhashResponseResultValue ¶ added in v1.10.0
type GetFeeCalculatorForBlockhashResponseResultValue struct {
FeeCalculator FeeCalculator `json:"feeCalculator"`
}
type GetFeeForMessageConfig ¶ added in v1.13.0
type GetFeeForMessageConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetFeeForMessageConfig is a option config for `GetFeeForMessage`
type GetFeeForMessageResponse ¶ added in v1.13.0
type GetFeeForMessageResponse struct { GeneralResponse Result GetFeeForMessageResult `json:"result"` }
GetFeeForMessageResponse is a full raw rpc response of `getFeeForMessage`
type GetFeeForMessageResult ¶ added in v1.13.0
type GetFeeForMessageResult struct { Context Context `json:"context"` Value *uint64 `json:"value"` }
GetFeeForMessageResult is a part of raw rpc response of `getFeeForMessage`
type GetFeeRateGovernorResponse ¶ added in v1.10.0
type GetFeeRateGovernorResponse struct { GeneralResponse Result GetFeeRateGovernorResponseResult `json:"result"` }
GetFeeRateGovernorResponse is a full raw rpc response of `getFeeRateGovernor`
type GetFeeRateGovernorResponseResult ¶ added in v1.10.0
type GetFeeRateGovernorResponseResult struct { Context Context `json:"context"` Value GetFeeRateGovernorResponseResultValue `json:"value"` }
type GetFeeRateGovernorResponseResultValue ¶ added in v1.10.0
type GetFeeRateGovernorResponseResultValue struct {
FeeRateGovernor FeeRateGovernor `json:"feeRateGovernor"`
}
type GetFeesConfig ¶ added in v1.10.0
type GetFeesConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetFeesConfig is a option config for `getFees`
type GetFeesResponse ¶ added in v1.10.0
type GetFeesResponse struct { GeneralResponse Result GetFeesResponseResult `json:"result"` }
GetFeesResponse is a full raw rpc response of `getFees`
type GetFeesResponseResult ¶ added in v1.10.0
type GetFeesResponseResult struct { Context Context `json:"context"` Value GetFeesResponseResultValue `json:"value"` }
GetFeesResult is a part of raw rpc response of `getFees`
type GetFeesResponseResultValue ¶ added in v1.10.0
type GetFeesResponseResultValue struct { Blockhash string `json:"blockhash"` FeeCalculator FeeCalculator `json:"feeCalculator"` LastValidSlot uint64 `json:"lastValidSlot"` LastValidBlockHeight uint64 `json:"lastValidBlockHeight"` }
type GetFirstAvailableBlockResponse ¶
type GetFirstAvailableBlockResponse struct { GeneralResponse Result uint64 `json:"result"` }
GetFirstAvailableBlockResponse is a full raw rpc response of `getFirstAvailableBlock`
type GetGenesisHashResponse ¶
type GetGenesisHashResponse struct { GeneralResponse Result string `json:"result"` }
GetGenesisHashResponse is a full raw rpc response of `getGenesisHash`
type GetIdentityResponse ¶
type GetIdentityResponse struct { GeneralResponse Result GetIdentityResult `json:"result"` }
GetIdentityResponse is a full raw rpc response of `getIdentity`
type GetIdentityResult ¶
type GetIdentityResult struct {
Identity string `json:"identity"`
}
GetIdentityResult is a part of raw rpc response of `getIdentity`
type GetInflationGovernorConfig ¶ added in v1.10.0
type GetInflationGovernorConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetInflationGovernorConfig is a option config for `getInflationGovernor`
type GetInflationGovernorResponse ¶ added in v1.10.0
type GetInflationGovernorResponse struct { GeneralResponse Result GetInflationGovernorResponseResult `json:"result"` }
GetInflationGovernorResponse is a full raw rpc response of `getInflationGovernor`
type GetInflationGovernorResponseResult ¶ added in v1.10.0
type GetInflationGovernorResponseResult struct { Foundation float64 `json:"foundation"` FoundationTerm float64 `json:"foundationTerm"` Initial float64 `json:"initial"` Taper float64 `json:"taper"` Terminal float64 `json:"terminal"` }
GetInflationGovernorResult is a part of raw rpc response of `getInflationGovernor`
type GetInflationRateResponse ¶
type GetInflationRateResponse struct { GeneralResponse Result GetInflationRateResult `json:"result"` }
GetInflationRateResponse is a full raw rpc response of `getInflationRate`
type GetInflationRateResult ¶
type GetInflationRateResult struct { Epoch uint64 `json:"epoch"` Foundation float64 `json:"foundation"` Total float64 `json:"total"` Validator float64 `json:"validator"` }
GetInflationRateResult is a part of raw rpc response of `getInflationRate`
type GetInflationRewardConfig ¶ added in v1.10.0
type GetInflationRewardConfig struct { Commitment Commitment `json:"commitment,omitempty"` Epoch uint64 `json:"epoch,omitempty"` }
GetInflationRewardConfig is a option config for `getInflationReward`
type GetInflationRewardResponse ¶ added in v1.10.0
type GetInflationRewardResponse struct { GeneralResponse Result []*GetInflationRewardResult `json:"result"` }
GetInflationRewardResponse is a full raw rpc response of `getInflationReward`
type GetInflationRewardResponseResultValue ¶ added in v1.10.0
type GetInflationRewardResponseResultValue struct {
FeeCalculator FeeCalculator `json:"feeCalculator"`
}
type GetInflationRewardResult ¶ added in v1.10.0
type GetInflationRewardResult struct { Epoch uint64 `json:"epoch"` EffectiveSlot uint64 `json:"effectiveSlot"` Amount uint64 `json:"amount"` PostBalance uint64 `json:"postBalance"` Commission *uint8 `json:"commission"` }
GetInflationRewardResult is a part of raw rpc response of `getInflationReward`
type GetLatestBlockhashConfig ¶ added in v1.13.0
type GetLatestBlockhashConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetLatestBlockhashConfig is a option config for `getLatestBlockhash`
type GetLatestBlockhashResponse ¶ added in v1.13.0
type GetLatestBlockhashResponse struct { GeneralResponse Result GetLatestBlockhashResult `json:"result"` }
GetLatestBlockhashResponse is a full raw rpc response of `getLatestBlockhash`
type GetLatestBlockhashResult ¶ added in v1.13.0
type GetLatestBlockhashResult struct { Context Context `json:"context"` Value GetLatestBlockhashValue `json:"value"` }
GetLatestBlockhashResult is a part of raw rpc response of `getLatestBlockhash`
type GetLatestBlockhashValue ¶ added in v1.13.0
type GetLatestBlockhashValue struct { Blockhash string `json:"blockhash"` LatestValidBlockHeight uint64 `json:"lastValidBlockHeight"` }
GetLatestBlockhashResult is a part of raw rpc response of `getLatestBlockhash`
type GetMinimumBalanceForRentExemptionConfig ¶
type GetMinimumBalanceForRentExemptionConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
type GetMinimumBalanceForRentExemptionResponse ¶
type GetMinimumBalanceForRentExemptionResponse struct { GeneralResponse Result uint64 `json:"result"` }
type GetMultipleAccountsConfig ¶ added in v1.13.0
type GetMultipleAccountsConfig struct { Commitment Commitment `json:"commitment,omitempty"` Encoding GetMultipleAccountsConfigEncoding `json:"encoding,omitempty"` DataSlice *GetMultipleAccountsConfigDataSlice `json:"dataSlice,omitempty"` }
GetMultipleAccountsConfig is an option config for `getAccountInfo`
type GetMultipleAccountsConfigDataSlice ¶ added in v1.13.0
type GetMultipleAccountsConfigDataSlice struct { Offset uint64 `json:"offset,omitempty"` Length uint64 `json:"length,omitempty"` }
GetMultipleAccountsConfigDataSlice is a part of GetAccountInfoConfig
type GetMultipleAccountsConfigEncoding ¶ added in v1.13.0
type GetMultipleAccountsConfigEncoding string
GetMultipleAccountsConfigEncoding is account's data encode format
const ( // GetMultipleAccountConfigEncodingBase58 limited to Account data of less than 128 bytes GetMultipleAccountsConfigEncodingBase58 GetMultipleAccountsConfigEncoding = "base58" GetMultipleAccountsConfigEncodingJsonParsed GetMultipleAccountsConfigEncoding = "jsonParsed" GetMultipleAccountsConfigEncodingBase64 GetMultipleAccountsConfigEncoding = "base64" GetMultipleAccountsConfigEncodingBase64Zstd GetMultipleAccountsConfigEncoding = "base64+zstd" )
type GetMultipleAccountsResponse ¶ added in v1.13.0
type GetMultipleAccountsResponse struct { GeneralResponse Result GetMultipleAccountsResult `json:"result"` }
GetMultipleAccountsResponse is a full raw rpc response of `getAccountInfo`
type GetMultipleAccountsResult ¶ added in v1.13.0
type GetMultipleAccountsResult struct { Context Context `json:"context"` Value []GetMultipleAccountsResultValue `json:"value"` }
GetMultipleAccountsResult is rpc result of `getAccountInfo`
type GetMultipleAccountsResultValue ¶ added in v1.13.0
type GetMultipleAccountsResultValue struct { Lamports uint64 `json:"lamports"` Owner string `json:"owner"` Excutable bool `json:"excutable"` RentEpoch uint64 `json:"rentEpoch"` Data interface{} `json:"data"` }
GetMultipleAccountsResultValue is rpc result of `getAccountInfo`
type GetProgramAccounts ¶
type GetProgramAccounts struct { Pubkey string `json:"pubkey"` Account GetProgramAccountsAccount `json:"account"` }
type GetProgramAccountsConfig ¶
type GetProgramAccountsConfig struct { Encoding GetProgramAccountsConfigEncoding `json:"encoding,omitempty"` Commitment Commitment `json:"commitment,omitempty"` DataSlice *GetProgramAccountsConfigDataSlice `json:"dataSlice,omitempty"` Filters []GetProgramAccountsConfigFilter `json:"filters,omitempty"` }
GetProgramAccountsConfig is a option config for `getProgramAccounts`
type GetProgramAccountsConfigDataSlice ¶
type GetProgramAccountsConfigDataSlice struct { Offset uint64 `json:"offset"` Length uint64 `json:"length"` }
GetProgramAccountsConfigDataSlice is a part of GetProgramAccountsConfig
type GetProgramAccountsConfigEncoding ¶
type GetProgramAccountsConfigEncoding string
const ( // GetProgramAccountsConfigEncodingBase58 limited to Account data of less than 128 bytes GetProgramAccountsConfigEncodingBase58 GetProgramAccountsConfigEncoding = "base58" GetProgramAccountsConfigEncodingJsonParsed GetProgramAccountsConfigEncoding = "jsonParsed" GetProgramAccountsConfigEncodingBase64 GetProgramAccountsConfigEncoding = "base64" GetProgramAccountsConfigEncodingBase64Zstd GetProgramAccountsConfigEncoding = "base64+zstd" )
type GetProgramAccountsConfigFilter ¶
type GetProgramAccountsConfigFilter struct { MemCmp *GetProgramAccountsConfigFilterMemCmp `json:"memcmp,omitempty"` DataSize uint64 `json:"dataSize,omitempty"` }
GetProgramAccountsConfigFilter you can set either MemCmp or DataSize but can be both, if needed, separate them into two
type GetProgramAccountsResponse ¶
type GetProgramAccountsResponse struct { GeneralResponse Result []GetProgramAccounts `json:"result"` }
GetProgramAccountsResponse is a full rpc response for `getProgramAccounts`
type GetProgramAccountsWithContextResponse ¶
type GetProgramAccountsWithContextResponse struct { GeneralResponse Result GetProgramAccountsWithContextResult `json:"result"` }
GetProgramAccountsResponse is a full rpc response for `getProgramAccounts` with context
type GetProgramAccountsWithContextResult ¶
type GetProgramAccountsWithContextResult struct { Context Context `json:"context"` Value []GetProgramAccounts `json:"value"` }
type GetRecentBlockHashResponse ¶
type GetRecentBlockHashResponse struct { GeneralResponse Result GetRecentBlockHashResult `json:"result"` }
GetRecentBlockHashResponse is full raw response of `getRecentBlockhash`
type GetRecentBlockHashResult ¶
type GetRecentBlockHashResult struct { Context Context `json:"context"` Value GetRecentBlockHashResultValue `json:"value"` }
GetRecentBlockHashResult is part of response of `getRecentBlockhash`
type GetRecentBlockHashResultValue ¶
type GetRecentBlockHashResultValue struct { Blockhash string `json:"blockhash"` FeeCalculator FeeCalculator `json:"feeCalculator"` }
GetRecentBlockHashResultValue is part of response of `getRecentBlockhash`
type GetRecentBlockhashConfig ¶
type GetRecentBlockhashConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetRecentBlockhashConfig is a option config for `getRecentBlockhash`
type GetSignatureStatusesConfig ¶
type GetSignatureStatusesConfig struct {
SearchTransactionHistory bool `json:"searchTransactionHistory,omitempty"`
}
GetSignatureStatusesConfig is a option config for `getSignatureStatuses`
type GetSignatureStatusesResponse ¶
type GetSignatureStatusesResponse struct { GeneralResponse Result GetSignatureStatusesResult `json:"result"` }
GetSignatureStatusesResponse is a full raw rpc response of `getSignatureStatuses`
type GetSignatureStatusesResult ¶
type GetSignatureStatusesResult struct { Context Context `json:"context"` Value []*GetSignatureStatusesResultValue `json:"value"` }
GetSignatureStatusesResult is a part of raw rpc response of `getSignatureStatuses`
type GetSignatureStatusesResultValue ¶
type GetSignatureStatusesResultValue struct { Slot uint64 `json:"slot"` Confirmations *uint64 `json:"confirmations"` ConfirmationStatus *Commitment `json:"confirmationStatus"` Err interface{} `json:"err"` }
type GetSignaturesForAddressConfig ¶
type GetSignaturesForAddressConfig struct { Limit int `json:"limit,omitempty"` // between 1 and 1000, default: 1000 Before string `json:"before,omitempty"` Until string `json:"until,omitempty"` Commitment Commitment `json:"commitment,omitempty"` // "processed" is not supported, default is "finalized" }
GetSignaturesForAddressConfig is option config of `getSignaturesForAddress`
type GetSignaturesForAddressResponse ¶
type GetSignaturesForAddressResponse struct { GeneralResponse Result []GetSignaturesForAddressResult `json:"result"` }
GetSignaturesForAddressResponse is full `getSignaturesForAddress` raw response
type GetSignaturesForAddressResult ¶
type GetSignaturesForAddressResult struct { Signature string `json:"signature"` Slot uint64 `json:"slot"` BlockTime *int64 `json:"blockTime"` Err interface{} `json:"err"` Memo *string `json:"memo"` }
GetSignaturesForAddressResult is a part of `getSignaturesForAddress` raw response
type GetSlotConfig ¶
type GetSlotConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetSlotConfig is a option config for `getSlot`
type GetSlotResponse ¶
type GetSlotResponse struct { GeneralResponse Result uint64 `json:"result"` }
GetSlotResponse is a full raw rpc response of `getSlot`
type GetTokenAccountBalanceConfig ¶
type GetTokenAccountBalanceConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
type GetTokenAccountBalanceResponse ¶
type GetTokenAccountBalanceResponse struct { GeneralResponse Result GetTokenAccountBalanceResult `json:"result"` }
type GetTokenAccountBalanceResult ¶
type GetTokenAccountBalanceResult struct { Context Context `json:"context"` Value GetTokenAccountBalanceResultValue `json:"value"` }
type GetTokenAccountsByOwnerConfig ¶
type GetTokenAccountsByOwnerConfig struct { Commitment Commitment `json:"commitment,omitempty"` Encoding GetTokenAccountsByOwnerConfigEncoding `json:"encoding,omitempty"` DataSlice *GetTokenAccountsByOwnerConfigDataSlice `json:"dataSlice,omitempty"` }
GetTokenAccountsByOwnerConfig is a option config for `GetTokenAccountsByOwner`
type GetTokenAccountsByOwnerConfigDataSlice ¶
type GetTokenAccountsByOwnerConfigDataSlice struct { Offset uint64 `json:"offset"` Length uint64 `json:"length"` }
GetTokenAccountsByOwnerConfigDataSlice is a part of GetTokenAccountsByOwnerConfig
type GetTokenAccountsByOwnerConfigEncoding ¶
type GetTokenAccountsByOwnerConfigEncoding string
const ( // GetTokenAccountsByOwnerConfigEncodingBase58 limited to Account data of less than 128 bytes GetTokenAccountsByOwnerConfigEncodingBase58 GetTokenAccountsByOwnerConfigEncoding = "base58" GetTokenAccountsByOwnerConfigEncodingJsonParsed GetTokenAccountsByOwnerConfigEncoding = "jsonParsed" GetTokenAccountsByOwnerConfigEncodingBase64 GetTokenAccountsByOwnerConfigEncoding = "base64" GetTokenAccountsByOwnerConfigEncodingBase64Zstd GetTokenAccountsByOwnerConfigEncoding = "base64+zstd" )
type GetTokenAccountsByOwnerConfigFilter ¶
type GetTokenAccountsByOwnerConfigFilter struct { Mint string `json:"mint,omitempty"` ProgramId string `json:"programId,omitempty"` }
GetTokenAccountsByOwnerConfigFilter either mint or programId
type GetTokenAccountsByOwnerResponse ¶
type GetTokenAccountsByOwnerResponse struct { GeneralResponse Result GetTokenAccountsByOwnerResponseResult `json:"result"` }
GetTokenAccountsByOwnerResponse is a full rpc response for `GetTokenAccountsByOwner`
type GetTokenAccountsByOwnerResponseResult ¶
type GetTokenAccountsByOwnerResponseResult struct { Context Context `json:"context"` Value []GetProgramAccounts `json:"value"` }
type GetTokenSupplyConfig ¶
type GetTokenSupplyConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetTokenSupplyConfig is option config of `getTokenSupply`
type GetTokenSupplyResponse ¶
type GetTokenSupplyResponse struct { GeneralResponse Result GetTokenSupplyResult `json:"result"` }
GetTokenSupplyResponse is full `getTokenSupply` raw response
type GetTokenSupplyResult ¶
type GetTokenSupplyResult struct { Context Context `json:"context"` Value GetTokenSupplyResultValue `json:"value"` }
GetTokenSupplyResult is a part of `getTokenSupply` raw response
type GetTokenSupplyResultValue ¶
type GetTokenSupplyResultValue struct { Amount string `json:"amount"` Decimals uint8 `json:"decimals"` UIAmountString string `json:"uiAmountString"` }
GetTokenSupplyResultValue is a part of `getTokenSupply` raw response
type GetTransactionConfig ¶
type GetTransactionConfig struct { Encoding GetTransactionConfigEncoding `json:"encoding,omitempty"` Commitment Commitment `json:"commitment,omitempty"` // "processed" is not supported }
GetTransactionConfig is a option config for `getTransaction`
type GetTransactionConfigEncoding ¶
type GetTransactionConfigEncoding string
const ( GetTransactionConfigEncodingJson GetTransactionConfigEncoding = "json" GetTransactionConfigEncodingJsonParsed GetTransactionConfigEncoding = "jsonParsed" GetTransactionConfigEncodingBase58 GetTransactionConfigEncoding = "base58" GetTransactionConfigEncodingBase64 GetTransactionConfigEncoding = "base64" )
type GetTransactionCountConfig ¶
type GetTransactionCountConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
GetTransactionCountConfig is a option config for `getTransactionCount`
type GetTransactionCountResponse ¶
type GetTransactionCountResponse struct { GeneralResponse Result uint64 `json:"result"` }
GetTransactionCountResponse is a full raw rpc response of `getTransactionCount`
type GetTransactionResponse ¶
type GetTransactionResponse struct { GeneralResponse Result *GetTransactionResult `json:"result"` }
GetTransactionResponse is a complete rpc response of `getTransaction`
type GetTransactionResult ¶
type GetTransactionResult struct { Slot uint64 `json:"slot"` Meta *TransactionMeta `json:"meta"` Transaction interface{} `json:"transaction"` BlockTime *int64 `json:"blockTime"` }
GetTransactionResult is a part of GetTransactionResponse
type GetVersionResponse ¶
type GetVersionResponse struct { GeneralResponse Result GetVersionResult `json:"result"` }
GetVersionResponse is a full raw rpc response of `getVersion`
type GetVersionResult ¶
type GetVersionResult struct { SolanaCore string `json:"solana-core"` FeatureSet *uint32 `json:"feature-set"` }
GetVersionResult is a part of raw rpc response of `getVersion`
type Instruction ¶
type Instruction struct { ProgramIDIndex int `json:"programIdIndex"` Accounts []int `json:"accounts"` Data string `json:"data"` }
Instruction is a part of TransactionMetaInnerInstruction
type IsBlockhashValidConfig ¶ added in v1.13.0
type IsBlockhashValidConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
IsBlockhashValidConfig is a option config for `IsBlockhashValid`
type IsBlockhashValidResponse ¶ added in v1.13.0
type IsBlockhashValidResponse struct { GeneralResponse Result IsBlockhashValidResult `json:"result"` }
IsBlockhashValidResponse is a full raw rpc response of `isBlockhashValid`
type IsBlockhashValidResult ¶ added in v1.13.0
IsBlockhashValidResult is a part of raw rpc response of `isBlockhashValid`
type MinimumLedgerSlotResponse ¶
type MinimumLedgerSlotResponse struct { GeneralResponse Result uint64 `json:"result"` }
MinimumLedgerSlotResponse is a full raw rpc response of `minimumLedgerSlot`
type RequestAirdropConfig ¶
type RequestAirdropConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
RequestAirdropConfig is a option config for `requestAirdrop`
type RequestAirdropResponse ¶
type RequestAirdropResponse struct { GeneralResponse Result string `json:"result"` }
RequestAirdropResponse is a full raw rpc response of `requestAirdrop`
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
func NewRpcClient ¶
func (*RpcClient) Call ¶
Call will return body of response. if http code beyond 200~300, the error also returns.
func (*RpcClient) GetAccountInfo ¶
func (c *RpcClient) GetAccountInfo(ctx context.Context, base58Addr string) (GetAccountInfoResponse, error)
GetAccountInfo returns all information associated with the account of provided Pubkey
func (*RpcClient) GetAccountInfoWithConfig ¶
func (c *RpcClient) GetAccountInfoWithConfig(ctx context.Context, base58Addr string, cfg GetAccountInfoConfig) (GetAccountInfoResponse, error)
GetAccountInfo returns all information associated with the account of provided Pubkey
func (*RpcClient) GetBalance ¶
GetBalance returns the SOL balance
func (*RpcClient) GetBalanceWithConfig ¶
func (c *RpcClient) GetBalanceWithConfig(ctx context.Context, base58Addr string, cfg GetBalanceConfig) (GetBalanceResponse, error)
GetBalanceWithConfig returns the SOL balance
func (*RpcClient) GetBlock ¶
GetBlock returns identity and transaction information about a confirmed block in the ledger
func (*RpcClient) GetBlockCommitment ¶
func (c *RpcClient) GetBlockCommitment(ctx context.Context, slot uint64) (GetBlockCommitmentResponse, error)
GetBlockCommitment returns commitment for particular block
func (*RpcClient) GetBlockHeight ¶
func (c *RpcClient) GetBlockHeight(ctx context.Context) (GetBlockHeightResponse, error)
GetBlockHeight returns the current block height of the node
func (*RpcClient) GetBlockHeightWithConfig ¶
func (c *RpcClient) GetBlockHeightWithConfig(ctx context.Context, cfg GetBlockHeightConfig) (GetBlockHeightResponse, error)
GetBlockHeightWithConfig returns the current block height of the node
func (*RpcClient) GetBlockProduction ¶ added in v1.10.0
func (c *RpcClient) GetBlockProduction(ctx context.Context) (GetBlockProductionResponse, error)
GetBlockProduction returns the current block height of the node
func (*RpcClient) GetBlockProductionWithConfig ¶ added in v1.10.0
func (c *RpcClient) GetBlockProductionWithConfig(ctx context.Context, cfg GetBlockProductionConfig) (GetBlockProductionResponse, error)
GetBlockProductionWithConfig returns the current block height of the node
func (*RpcClient) GetBlockTime ¶
GetBlockTime returns the estimated production time of a block.
func (*RpcClient) GetBlockWithConfig ¶
func (c *RpcClient) GetBlockWithConfig(ctx context.Context, slot uint64, cfg GetBlockConfig) (GetBlockResponse, error)
GetBlockWithConfig returns identity and transaction information about a confirmed block in the ledger
func (*RpcClient) GetBlocks ¶
func (c *RpcClient) GetBlocks(ctx context.Context, startSlot uint64, endSlot uint64) (GetBlocksResponse, error)
GetBlocks returns a list of confirmed blocks between two slots Max range allowed is 500,000 slot
func (*RpcClient) GetBlocksWithConfig ¶
func (c *RpcClient) GetBlocksWithConfig(ctx context.Context, startSlot uint64, endSlot uint64, cfg GetBlocksConfig) (GetBlocksResponse, error)
GetBlocks returns a list of confirmed blocks between two slots Max range allowed is 500,000 slot
func (*RpcClient) GetBlocksWithLimit ¶
func (c *RpcClient) GetBlocksWithLimit(ctx context.Context, startSlot uint64, limit uint64) (GetBlocksWithLimitResponse, error)
GetBlocksWithLimit eturns a list of confirmed blocks starting at the given slot
func (*RpcClient) GetBlocksWithLimitWithConfig ¶
func (c *RpcClient) GetBlocksWithLimitWithConfig(ctx context.Context, startSlot uint64, limit uint64, cfg GetBlocksWithLimitConfig) (GetBlocksWithLimitResponse, error)
GetBlocksWithLimit eturns a list of confirmed blocks starting at the given slot
func (*RpcClient) GetClusterNodes ¶ added in v1.10.0
func (c *RpcClient) GetClusterNodes(ctx context.Context) (GetClusterNodesResponse, error)
GetClusterNodes returns information about all the nodes participating in the cluster
func (*RpcClient) GetEpochInfo ¶
func (c *RpcClient) GetEpochInfo(ctx context.Context) (GetEpochInfoResponse, error)
GetEpochInfo returns the SOL balance
func (*RpcClient) GetEpochInfoWithConfig ¶
func (c *RpcClient) GetEpochInfoWithConfig(ctx context.Context, cfg GetEpochInfoConfig) (GetEpochInfoResponse, error)
GetEpochInfoWithConfig returns the SOL balance
func (*RpcClient) GetEpochSchedule ¶ added in v1.10.0
func (c *RpcClient) GetEpochSchedule(ctx context.Context) (GetEpochScheduleResponse, error)
GetEpochSchedule returns epoch schedule information from this cluster's genesis config
func (*RpcClient) GetFeeCalculatorForBlockhash ¶ added in v1.10.0
func (c *RpcClient) GetFeeCalculatorForBlockhash(ctx context.Context, base58Addr string) (GetFeeCalculatorForBlockhashResponse, error)
GetFeeCalculatorForBlockhash returns the SOL balance
func (*RpcClient) GetFeeCalculatorForBlockhashWithConfig ¶ added in v1.10.0
func (c *RpcClient) GetFeeCalculatorForBlockhashWithConfig(ctx context.Context, base58Addr string, cfg GetFeeCalculatorForBlockhashConfig) (GetFeeCalculatorForBlockhashResponse, error)
GetFeeCalculatorForBlockhashWithConfig returns the SOL balance
func (*RpcClient) GetFeeForMessage ¶ added in v1.13.0
func (c *RpcClient) GetFeeForMessage(ctx context.Context, message string) (GetFeeForMessageResponse, error)
NEW: This method is only available in solana-core v1.9 or newer. Please use getFees for solana-core v1.8 GetFeeForMessage get the fee the network will charge for a particular Message
func (*RpcClient) GetFeeForMessageWithConfig ¶ added in v1.13.0
func (c *RpcClient) GetFeeForMessageWithConfig(ctx context.Context, message string, cfg GetFeeForMessageConfig) (GetFeeForMessageResponse, error)
NEW: This method is only available in solana-core v1.9 or newer. Please use getFees for solana-core v1.8 GetFeeForMessageWithConfig get the fee the network will charge for a particular Message
func (*RpcClient) GetFeeRateGovernor ¶ added in v1.10.0
func (c *RpcClient) GetFeeRateGovernor(ctx context.Context) (GetFeeRateGovernorResponse, error)
DEPRECATED GetFeeRateGovernor returns the fee rate governor information from the root bank
func (*RpcClient) GetFees ¶ added in v1.10.0
func (c *RpcClient) GetFees(ctx context.Context) (GetFeesResponse, error)
GetFees returns a recent block hash from the ledger, a fee schedule that can be used to compute the cost of submitting a transaction using it, and the last slot in which the blockhash will be valid
func (*RpcClient) GetFeesWithConfig ¶ added in v1.10.0
func (c *RpcClient) GetFeesWithConfig(ctx context.Context, cfg GetFeesConfig) (GetFeesResponse, error)
GetFeesWithConfig returns a recent block hash from the ledger, a fee schedule that can be used to compute the cost of submitting a transaction using it, and the last slot in which the blockhash will be valid
func (*RpcClient) GetFirstAvailableBlock ¶
func (c *RpcClient) GetFirstAvailableBlock(ctx context.Context) (GetFirstAvailableBlockResponse, error)
GetFirstAvailableBlock returns the slot of the lowest confirmed block that has not been purged from the ledger
func (*RpcClient) GetGenesisHash ¶
func (c *RpcClient) GetGenesisHash(ctx context.Context) (GetGenesisHashResponse, error)
GetGenesisHash returns the genesis hash
func (*RpcClient) GetIdentity ¶
func (c *RpcClient) GetIdentity(ctx context.Context) (GetIdentityResponse, error)
GetIdentity returns the identity pubkey for the current node
func (*RpcClient) GetInflationGovernor ¶ added in v1.10.0
func (c *RpcClient) GetInflationGovernor(ctx context.Context) (GetInflationGovernorResponse, error)
GetInflationGovernor returns the current inflation governor
func (*RpcClient) GetInflationGovernorWithConfig ¶ added in v1.10.0
func (c *RpcClient) GetInflationGovernorWithConfig(ctx context.Context, cfg GetInflationGovernorConfig) (GetInflationGovernorResponse, error)
GetInflationGovernorWithConfig returns the current inflation governor
func (*RpcClient) GetInflationRate ¶
func (c *RpcClient) GetInflationRate(ctx context.Context) (GetInflationRateResponse, error)
GetInflationRate returns the specific inflation values for the current epoch
func (*RpcClient) GetInflationReward ¶ added in v1.10.0
func (c *RpcClient) GetInflationReward(ctx context.Context, stakeAccountAddrs []string) (GetInflationRewardResponse, error)
GetInflationReward returns the inflation reward for a list of addresses for an epoch
func (*RpcClient) GetInflationRewardWithConfig ¶ added in v1.10.0
func (c *RpcClient) GetInflationRewardWithConfig(ctx context.Context, stakeAccountAddrs []string, cfg GetInflationRewardConfig) (GetInflationRewardResponse, error)
GetInflationRewardWithConfig returns the inflation reward for a list of addresses for an epoch
func (*RpcClient) GetLatestBlockhash ¶ added in v1.13.0
func (c *RpcClient) GetLatestBlockhash(ctx context.Context) (GetLatestBlockhashResponse, error)
NEW: This method is only available in solana-core v1.9 or newer. Please use getRecentBlockhash for solana-core v1.8 GetLatestBlockhash returns the latest blockhash
func (*RpcClient) GetLatestBlockhashWithConfig ¶ added in v1.13.0
func (c *RpcClient) GetLatestBlockhashWithConfig(ctx context.Context, cfg GetLatestBlockhashConfig) (GetLatestBlockhashResponse, error)
NEW: This method is only available in solana-core v1.9 or newer. Please use getRecentBlockhash for solana-core v1.8 GetLatestBlockhashWithConfig returns the latest blockhash
func (*RpcClient) GetMinimumBalanceForRentExemption ¶
func (c *RpcClient) GetMinimumBalanceForRentExemption(ctx context.Context, dataLen uint64) (GetMinimumBalanceForRentExemptionResponse, error)
GetMinimumBalanceForRentExemption returns minimum balance required to make account rent exempt
func (*RpcClient) GetMinimumBalanceForRentExemptionWithConfig ¶
func (c *RpcClient) GetMinimumBalanceForRentExemptionWithConfig(ctx context.Context, dataLen uint64, cfg GetMinimumBalanceForRentExemptionConfig) (GetMinimumBalanceForRentExemptionResponse, error)
GetMinimumBalanceForRentExemptionWithConfig returns minimum balance required to make account rent exempt
func (*RpcClient) GetMultipleAccounts ¶ added in v1.13.0
func (c *RpcClient) GetMultipleAccounts(ctx context.Context, base58Addrs []string) (GetMultipleAccountsResponse, error)
GetMultipleAccounts returns all information associated with the account of provided Pubkey
func (*RpcClient) GetMultipleAccountsWithConfig ¶ added in v1.13.0
func (c *RpcClient) GetMultipleAccountsWithConfig(ctx context.Context, base58Addrs []string, cfg GetMultipleAccountsConfig) (GetMultipleAccountsResponse, error)
GetMultipleAccounts returns all information associated with the account of provided Pubkey
func (*RpcClient) GetProgramAccounts ¶
func (*RpcClient) GetProgramAccountsWithConfig ¶
func (c *RpcClient) GetProgramAccountsWithConfig(ctx context.Context, programId string, cfg GetProgramAccountsConfig) (GetProgramAccountsResponse, error)
func (*RpcClient) GetProgramAccountsWithContext ¶
func (*RpcClient) GetProgramAccountsWithContextAndConfig ¶
func (c *RpcClient) GetProgramAccountsWithContextAndConfig(ctx context.Context, programId string, cfg GetProgramAccountsConfig) (GetProgramAccountsWithContextResponse, error)
func (*RpcClient) GetRecentBlockhash ¶
func (c *RpcClient) GetRecentBlockhash(ctx context.Context) (GetRecentBlockHashResponse, error)
DEPRECATED: Please use getFeeForMessage instead This method is expected to be removed in solana-core v2.0 GetRecentBlockhash returns a recent block hash from the ledger, and a fee schedule that can be used to compute the cost of submitting a transaction using it.
func (*RpcClient) GetRecentBlockhashWithConfig ¶
func (c *RpcClient) GetRecentBlockhashWithConfig(ctx context.Context, cfg GetRecentBlockhashConfig) (GetRecentBlockHashResponse, error)
DEPRECATED: Please use getFeeForMessage instead This method is expected to be removed in solana-core v2.0 GetRecentBlockhashWithConfig returns a recent block hash from the ledger, and a fee schedule that can be used to compute the cost of submitting a transaction using it.
func (*RpcClient) GetSignatureStatuses ¶
func (c *RpcClient) GetSignatureStatuses(ctx context.Context, signatures []string) (GetSignatureStatusesResponse, error)
GetSignatureStatuses returns the SOL balance
func (*RpcClient) GetSignatureStatusesWithConfig ¶
func (c *RpcClient) GetSignatureStatusesWithConfig(ctx context.Context, signatures []string, cfg GetSignatureStatusesConfig) (GetSignatureStatusesResponse, error)
GetSignatureStatusesWithConfig returns the SOL balance
func (*RpcClient) GetSignaturesForAddress ¶
func (c *RpcClient) GetSignaturesForAddress(ctx context.Context, base58Addr string) (GetSignaturesForAddressResponse, error)
GetSignaturesForAddress returns confirmed signatures for transactions involving an address backwards in time from the provided signature or most recent confirmed block
func (*RpcClient) GetSignaturesForAddressWithConfig ¶
func (c *RpcClient) GetSignaturesForAddressWithConfig(ctx context.Context, base58Addr string, cfg GetSignaturesForAddressConfig) (GetSignaturesForAddressResponse, error)
GetSignaturesForAddressWithConfig returns confirmed signatures for transactions involving an address backwards in time from the provided signature or most recent confirmed block
func (*RpcClient) GetSlot ¶
func (c *RpcClient) GetSlot(ctx context.Context) (GetSlotResponse, error)
GetSlot returns the SOL balance
func (*RpcClient) GetSlotWithConfig ¶
func (c *RpcClient) GetSlotWithConfig(ctx context.Context, cfg GetSlotConfig) (GetSlotResponse, error)
GetSlotWithConfig returns the SOL balance
func (*RpcClient) GetTokenAccountBalance ¶
func (c *RpcClient) GetTokenAccountBalance(ctx context.Context, base58Addr string) (GetTokenAccountBalanceResponse, error)
GetTokenAccountBalance returns the token balance of an SPL Token account
func (*RpcClient) GetTokenAccountBalanceWithConfig ¶
func (c *RpcClient) GetTokenAccountBalanceWithConfig(ctx context.Context, base58Addr string, cfg GetTokenAccountBalanceConfig) (GetTokenAccountBalanceResponse, error)
GetTokenAccountBalance returns the token balance of an SPL Token account
func (*RpcClient) GetTokenAccountsByOwner ¶
func (c *RpcClient) GetTokenAccountsByOwner(ctx context.Context, base58Addr string, filter GetTokenAccountsByOwnerConfigFilter) (GetTokenAccountsByOwnerResponse, error)
func (*RpcClient) GetTokenAccountsByOwnerWithConfig ¶
func (c *RpcClient) GetTokenAccountsByOwnerWithConfig(ctx context.Context, base58Addr string, filter GetTokenAccountsByOwnerConfigFilter, cfg GetTokenAccountsByOwnerConfig) (GetTokenAccountsByOwnerResponse, error)
func (*RpcClient) GetTokenSupply ¶
func (c *RpcClient) GetTokenSupply(ctx context.Context, mintAddr string) (GetTokenSupplyResponse, error)
GetTokenSupply returns the token balance of an SPL Token account
func (*RpcClient) GetTokenSupplyWithConfig ¶
func (c *RpcClient) GetTokenSupplyWithConfig(ctx context.Context, mintAddr string, cfg GetTokenSupplyConfig) (GetTokenSupplyResponse, error)
GetTokenSupply returns the token balance of an SPL Token account
func (*RpcClient) GetTransaction ¶
func (c *RpcClient) GetTransaction(ctx context.Context, txhash string) (GetTransactionResponse, error)
GetTransaction returns transaction details for a confirmed transaction
func (*RpcClient) GetTransactionCount ¶
func (c *RpcClient) GetTransactionCount(ctx context.Context) (GetTransactionCountResponse, error)
GetTransactionCount returns the current Transaction count from the ledger
func (*RpcClient) GetTransactionCountWithConfig ¶
func (c *RpcClient) GetTransactionCountWithConfig(ctx context.Context, cfg GetTransactionCountConfig) (GetTransactionCountResponse, error)
GetTransactionCountWithConfig returns the current Transaction count from the ledger
func (*RpcClient) GetTransactionWithConfig ¶
func (c *RpcClient) GetTransactionWithConfig(ctx context.Context, txhash string, cfg GetTransactionConfig) (GetTransactionResponse, error)
GetTransactionWithConfig returns transaction details for a confirmed transaction
func (*RpcClient) GetVersion ¶
func (c *RpcClient) GetVersion(ctx context.Context) (GetVersionResponse, error)
GetVersion returns the current solana versions running on the node
func (*RpcClient) IsBlockhashValid ¶ added in v1.13.0
func (c *RpcClient) IsBlockhashValid(ctx context.Context, message string) (IsBlockhashValidResponse, error)
NEW: This method is only available in solana-core v1.9 or newer. Please use getFees for solana-core v1.8 IsBlockhashValid get the fee the network will charge for a particular Message
func (*RpcClient) IsBlockhashValidWithConfig ¶ added in v1.13.0
func (c *RpcClient) IsBlockhashValidWithConfig(ctx context.Context, message string, cfg IsBlockhashValidConfig) (IsBlockhashValidResponse, error)
NEW: This method is only available in solana-core v1.9 or newer. Please use getFees for solana-core v1.8 IsBlockhashValidWithConfig get the fee the network will charge for a particular Message
func (*RpcClient) MinimumLedgerSlot ¶
func (c *RpcClient) MinimumLedgerSlot(ctx context.Context) (MinimumLedgerSlotResponse, error)
MinimumLedgerSlot returns the lowest slot that the node has information about in its ledger. This value may increase over time if the node is configured to purge older ledger data
func (*RpcClient) RequestAirdrop ¶
func (c *RpcClient) RequestAirdrop(ctx context.Context, base58Addr string, lamports uint64) (RequestAirdropResponse, error)
RequestAirdrop requests an airdrop of lamports to a Pubkey
func (*RpcClient) RequestAirdropWithConfig ¶
func (c *RpcClient) RequestAirdropWithConfig(ctx context.Context, base58Addr string, lamports uint64, cfg RequestAirdropConfig) (RequestAirdropResponse, error)
RequestAirdropWithConfig requests an airdrop of lamports to a Pubkey
func (*RpcClient) SendTransaction ¶
func (c *RpcClient) SendTransaction(ctx context.Context, tx string) (SendTransactionResponse, error)
SendTransaction submits a signed transaction to the cluster for processing
func (*RpcClient) SendTransactionWithConfig ¶
func (c *RpcClient) SendTransactionWithConfig(ctx context.Context, tx string, cfg SendTransactionConfig) (SendTransactionResponse, error)
SendTransaction submits a signed transaction to the cluster for processing
func (*RpcClient) SimulateTransaction ¶
func (c *RpcClient) SimulateTransaction(ctx context.Context, rawTx string) (SimulateTransactionResponse, error)
SimulateTransaction simulate sending a transaction
func (*RpcClient) SimulateTransactionWithConfig ¶
func (c *RpcClient) SimulateTransactionWithConfig(ctx context.Context, rawTx string, cfg SimulateTransactionConfig) (SimulateTransactionResponse, error)
SimulateTransaction simulate sending a transaction
type SendTransactionConfig ¶
type SendTransactionConfig struct { SkipPreflight bool `json:"skipPreflight,omitempty"` // default: false PreflightCommitment Commitment `json:"preflightCommitment,omitempty"` // default: finalized Encoding SendTransactionConfigEncoding `json:"encoding,omitempty"` // default: base58 MaxRetries uint64 `json:"maxRetries,omitempty"` }
type SendTransactionConfigEncoding ¶
type SendTransactionConfigEncoding string
const ( SendTransactionConfigEncodingBase58 SendTransactionConfigEncoding = "base58" SendTransactionConfigEncodingBase64 SendTransactionConfigEncoding = "base64" )
type SendTransactionResponse ¶
type SendTransactionResponse struct { GeneralResponse Result string `json:"result"` }
type SimulateTransactionConfig ¶
type SimulateTransactionConfig struct { SigVerify bool `json:"sigVerify,omitempty"` // default: false, conflicts with replace blockhash Commitment Commitment `json:"commitment,omitempty"` // default: finalized Encoding SimulateTransactionConfigEncoding `json:"encoding,omitempty"` // default: "base58" ReplaceRecentBlockhash bool `json:"replaceRecentBlockhash,omitempty"` // default: false, conflicts with sigVerify Accounts *SimulateTransactionConfigAccounts `json:"accounts,omitempty"` }
type SimulateTransactionConfigAccounts ¶
type SimulateTransactionConfigAccounts struct { Encoding GetAccountInfoConfigEncoding `json:"encoding,omitempty"` // An array of accounts to return, as base-58 encoded strings Addresses []string `json:"addresses"` }
type SimulateTransactionConfigEncoding ¶
type SimulateTransactionConfigEncoding string
const ( SimulateTransactionConfigEncodingBase58 SimulateTransactionConfigEncoding = "base58" // (slow, DEPRECATED) SimulateTransactionConfigEncodingBase64 SimulateTransactionConfigEncoding = "base64" )
type SimulateTransactionResponse ¶
type SimulateTransactionResponse struct { GeneralResponse Result SimulateTransactionResponseResult `json:"result"` }
SimulateTransactionResponse is a complete rpc response of `simulateTransaction`
type SimulateTransactionResponseResult ¶
type SimulateTransactionResponseResult struct { Context Context `json:"context"` Value SimulateTransactionResponseResultValue `json:"value"` }
SimulateTransactionResponseResult is a part of SimulateTransactionResponse
type SimulateTransactionResponseResultValue ¶
type SimulateTransactionResponseResultValue struct { Err interface{} `json:"err"` Logs []string `json:"logs,omitempty"` Accounts []*GetAccountInfoResultValue `json:"accounts,omitempty"` }
SimulateTransactionResponseResultValue is a part of SimulateTransactionResponseResult
type TransactionMeta ¶
type TransactionMeta struct { Err interface{} `json:"err"` Fee uint64 `json:"fee"` PreBalances []int64 `json:"preBalances"` PostBalances []int64 `json:"postBalances"` PreTokenBalances []TransactionMetaTokenBalance `json:"preTokenBalances"` PostTokenBalances []TransactionMetaTokenBalance `json:"postTokenBalances"` LogMessages []string `json:"logMessages"` InnerInstructions []TransactionMetaInnerInstruction `json:"innerInstructions"` }
TransactionMeta is a part of GetTransactionResult
type TransactionMetaInnerInstruction ¶
type TransactionMetaInnerInstruction struct { Index uint64 `json:"index"` Instructions []Instruction `json:"instructions"` }
TransactionMetaInnerInstruction is a part of TransactionMeta
type TransactionMetaReward ¶
type TransactionMetaReward struct { Pubkey string `json:"pubkey"` Lamports int64 `json:"lamports"` PostBalances uint64 `json:"postBalance"` RewardType TransactionMetaRewardType `json:"rewardType"` Commission *uint8 `json:"commission"` }
TransactionMetaReward is a part of TransactionMeta
type TransactionMetaRewardType ¶
type TransactionMetaRewardType string
const ( // currently only "rent", other types may be added in the future TransactionMetaRewardTypeRent TransactionMetaRewardType = "rent" )
type TransactionMetaTokenBalance ¶
type TransactionMetaTokenBalance struct { AccountIndex uint64 `json:"accountIndex"` Mint string `json:"mint"` Owner string `json:"owner,omitempty"` UITokenAmount GetTokenAccountBalanceResultValue `json:"uiTokenAmount"` }
TransactionMetaTokenBalance is a part of TransactionMeta
Source Files
¶
- client.go
- get_account_info.go
- get_balance.go
- get_block.go
- get_block_commitment.go
- get_block_height.go
- get_block_production.go
- get_block_time.go
- get_blocks.go
- get_blocks_with_limit.go
- get_cluster_nodes.go
- get_epoch_info.go
- get_epoch_schedule.go
- get_fee_calculator_for_blockhash.go
- get_fee_for_message.go
- get_fee_rate_governor.go
- get_fees.go
- get_first_available_block.go
- get_genesis_hash.go
- get_identity.go
- get_inflation_governor.go
- get_inflation_rate.go
- get_inflation_reward.go
- get_latest_blockhash.go
- get_minimum_balance_for_rent_exemption.go
- get_multiple_accounts.go
- get_program_accounts.go
- get_recent_blockhash.go
- get_signature_statuses.go
- get_signatures_for_address.go
- get_slot.go
- get_token_account_balance.go
- get_token_account_by_owner.go
- get_token_supply.go
- get_transaction.go
- get_transaction_count.go
- get_version.go
- is_blockhash_valid.go
- minimum_ledger_slot.go
- request_aridrop.go
- send_transaction.go
- simulate_transaction.go
- test_util.go