Config
- class RpcSignatureStatusConfig
Configuration object for
getSignatureStatuses
.- Parameters:
search_transaction_history – If True, a Solana node will search its ledger cache for any signatures not found in the recent status cache
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- search_transaction_history
- to_json()
Convert to a JSON string.
- class RpcSendTransactionConfig
Configuration object for
sendTransaction
.- Parameters:
skip_preflight (bool) – If true, skip the preflight transaction checks.
preflight_commitment (Optional[CommitmentLevel]) – Commitment level to use for preflight checks.
max_retries – (Optional[int]): Maximum number of times for the RPC node to retry sending the transaction to the leader. If this parameter not provided, the RPC node will retry the transaction until it is finalized or until the blockhash expires.
min_context_slot (Optional[int]) – The minimum slot that the request can be evaluated at.
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- encoding
Encoding used for the transaction data.
- Type:
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- max_retries
Maximum number of times for the RPC node to retry sending the transaction to the leader.
- Type:
Optional[int]
- min_context_slot
The minimum slot that the request can be evaluated at.
- Type:
Optional[int]
- preflight_commitment
Commitment level to use for preflight checks.
- Type:
Optional[CommitmentLevel]
- skip_preflight
If true, skip the preflight transaction checks.
- Type:
bool
- to_json()
Convert to a JSON string.
- class RpcSimulateTransactionAccountsConfig
Accounts configuration for
simulateTransaction
.- Parameters:
encoding (Optional[UiAccountEncoding]) – Encoding for returned Account data
addresses (Sequence[Pubkey]) – An array of accounts to return.
- addresses
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- encoding
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- to_json()
Convert to a JSON string.
- class RpcSimulateTransactionConfig
Configuration object for
simulateTransaction
.- Parameters:
sig_verify (bool) – If True the transaction signatures will be verified (conflicts with
replace_recent_blockhash
).replace_recent_blockhash (bool) – If True the transaction recent blockhash will be replaced with the most recent blockhash (conflicts with
sig_verify
).commitment (Optional[CommitmentLevel]) – Commitment level at which to simulate the transaction.
accounts (Optional[RpcSimulateTransactionAccountsConfig]) – Accounts configuration object.
min_context_slot (Optional[int]) – The minimum slot that the request can be evaluated at.
- accounts
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- encoding
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- inner_instructions
- min_context_slot
- replace_recent_blockhash
- sig_verify
- to_json()
Convert to a JSON string.
- class RpcRequestAirdropConfig
Configuration object for
requestAirdrop
.- Parameters:
recent_blockhash (Optional[Hash]) – The ID of a recent ledger entry.
commitment (Optional[CommitmentLevel]) – Bank state to query.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- recent_blockhash
- to_json()
Convert to a JSON string.
- class RpcLeaderScheduleConfig
Configuration object for
getLeaderSchedule
.- Parameters:
identity (Optional[Pubkey]) – Validator identity.
commitment (Optional[CommitmentLevel]) – Bank state to query.
- commitment
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- identity
- to_json()
Convert to a JSON string.
- class RpcBlockProductionConfigRange
Range object for
RpcBlockProductionConfig
.- Parameters:
first_slot (int) – First slot in the range
last_slot (Optional[int]) – Last slot in the range.
- first_slot
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- last_slot
- to_json()
Convert to a JSON string.
- class RpcBlockProductionConfig
Configuration object for
getBlockProduction
.- Parameters:
identity (Optional[Pubkey]) – Validator identity.
range (Optional[RpcBlockProductionConfigRange]) – Slot range to query. Current epoch if
None
.commitment (Optional[CommitmentLevel]) – Bank state to query.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- identity
- range
- to_json()
Convert to a JSON string.
- class RpcGetVoteAccountsConfig
Configuration object for
getVoteAccounts
.- Parameters:
vote_pubkey (Optional[Pubkey]) – Validator vote address.
commitment (Optional[CommitmentLevel]) – Bank state to query.
keep_unstaked_delinquents (Optional[bool]) – Do not filter out delinquent validators with no stake.
delinquent_slot_distance (Optional[int]) – Specify the number of slots behind the tip that a validator must fall to be considered delinquent. NOTE: For the sake of consistency between ecosystem products, it is not recommended that this argument be specified.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- delinquent_slot_distance
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- keep_unstaked_delinquents
- to_json()
Convert to a JSON string.
- vote_pubkey
- class RpcLargestAccountsFilter
Filter for
getLargestAccounts
.- Circulating = RpcLargestAccountsFilter.Circulating
- NonCirculating = RpcLargestAccountsFilter.NonCirculating
- class RpcSupplyConfig
Configuration object for
getSupply
.- Parameters:
commitment (Optional[CommitmentLevel]) – Bank state to query.
exclude_non_circulating_accounts_list (bool) – Exclude non circulating accounts list from response.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- exclude_non_circulating_accounts_list
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- to_json()
Convert to a JSON string.
- class RpcEpochConfig
Configuration object containing epoch information.
- Parameters:
epoch (Optional[int]) – Epoch is a unit of time a given leader schedule is honored, some number of Slots.
commitment (Optional[CommitmentLevel]) – Bank state to query.
min_context_slot (Optional[int]) – The minimum slot that the request can be evaluated at.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- epoch
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- min_context_slot
- to_json()
Convert to a JSON string.
- class RpcAccountInfoConfig
Configuration object for
getAccountInfo
.- Parameters:
encoding (Optional[UiAccountEncoding]) – Encoding for returned account data.
data_slice (Optiona;[UiDataSliceConfig]) – Limit the returned account data.
commitment (Optional[CommitmentLevel]) – Bank state to query.
min_context_slot (Optional[int]) – The minimum slot that the request can be evaluated at.
- commitment
- data_slice
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- encoding
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- min_context_slot
- to_json()
Convert to a JSON string.
- class RpcProgramAccountsConfig
Configuration object for
getProgramAccounts
.- Parameters:
account_config (RpcAccountInfoConfig) – Account info config.
filters (Optional[Sequence[int | Memcmp]]) – Filter results using various filter objects; account must meet all filter criteria to be included in results.
with_context (Optional[bool]) – Wrap the result in an RpcResponse JSON object.
- account_config
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- filters
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- to_json()
Convert to a JSON string.
- with_context
- class RpcTransactionLogsFilter
Fieldless filters for
logsSubscribe
.- All = RpcTransactionLogsFilter.All
- AllWithVotes = RpcTransactionLogsFilter.AllWithVotes
- class RpcTransactionLogsFilterMentions
mentions
filter forlogsSubscribe
.- Parameters:
pubkey (Pubkey) – Subscribe to all transactions that mention the provided Pubkey.
- pubkey
- class RpcTransactionLogsConfig
Configuration object for
logsSubscribe
.- Parameters:
commitment (Optional[CommitmentLevel]) – Bank state to query.
- commitment
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- to_json()
Convert to a JSON string.
- class RpcTokenAccountsFilterMint
mint
filter forgetTokenAccountsBy*
methods.- Parameters:
mint (Pubkey) – Pubkey of the specific token Mint to limit accounts to.
- mint
- class RpcTokenAccountsFilterProgramId
programId
filter forgetTokenAccountsBy*
methods.- Parameters:
program_id (Pubkey) – Pubkey of the Token program that owns the accounts.
- program_id
- class RpcSignatureSubscribeConfig
Configuration object for
signatureSubscribe
.- Parameters:
commitment (Optional[CommitmentLevel]) – Bank state to query.
enable_received_notification (Optional[bool]) – Enable received notification.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- enable_received_notification
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- to_json()
Convert to a JSON string.
- class RpcBlockSubscribeFilterMentions
mentions
filter forblockSubscribe
.- Parameters:
pubkey (Pubkey) – Return only transactions that mention the provided pubkey.
- pubkey
- class RpcBlockSubscribeConfig
Configuration object for
blockSubscribe
.- Parameters:
commitment (Optional[CommitmentLevel]) – Bank state to query.
encoding (Optional[UiTransactionEncoding]) – Encoding used for the transaction data.
transaction_details (Optional[TransactionDetails]) – Level of transaction detail to return.
show_rewards (Optional[bool]) – Whether to populate the
rewards
array.max_supported_transaction_version (Optional[int]) – Set the max transaction version to return in responses.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- encoding
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- max_supported_transaction_version
- show_rewards
- to_json()
Convert to a JSON string.
- transaction_details
- class RpcSignaturesForAddressConfig
Configuration object for
getSignaturesForAddress
.- Parameters:
before (Optional[Signature]) – Start searching backwards from this transaction signature.
until (Optional[Signature]) – Search until this transaction signature.
limit (Optional[int]) – Maximum transaction signatures to return (between 1 and 1,000, default: 1,000).
commitment (Optional[CommitmentLevel]) – Bank state to query.
min_context_slot (Optional[int]) – The minimum slot that the request can be evaluated at.
- before
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- limit
- min_context_slot
- to_json()
Convert to a JSON string.
- until
- class RpcBlockConfig
Configuration object for
getBlock
.- Parameters:
encoding (Optional[UiTransactionEncoding]) – Encoding used for the transaction data.
transaction_details (Optional[TransactionDetails]) – Level of transaction detail to return.
rewards (Optional[bool]) – Whether to populate the
rewards
array.commitment (Optional[CommitmentLevel]) – Bank state to query.
max_supported_transaction_version (Optional[int]) – Set the max transaction version to return in responses.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- encoding
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- max_supported_transaction_version
- rewards
- static rewards_only()
Create a new instance for only showing rewards.
- static rewards_with_commitment(commitment=None)
Create a new instance for only showing rewards, with a specified commitment level.
- to_json()
Convert to a JSON string.
- transaction_details
- class RpcTransactionConfig
Configuration object for
getTransaction
.- Parameters:
encoding (Optional[UiTransactionEncoding]) – Encoding used for the transaction data.
commitment (Optional[CommitmentLevel]) – Bank state to query.
max_supported_transaction_version (Optional[int]) – Set the max transaction version to return in responses.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- encoding
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- max_supported_transaction_version
- to_json()
Convert to a JSON string.
- class RpcContextConfig
General context configuration.
- Parameters:
commitment (Optional[CommitmentLevel]) – Bank state to query.
min_context_slot (Optional[int]) – The minimum slot that the request can be evaluated at.
- commitment
- static default()
Create a new default instance of this class.
- Returns:
The default instance.
- Return type:
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- min_context_slot
- to_json()
Convert to a JSON string.