pub struct JsonRpcClient<T> { /* private fields */ }Implementations§
Source§impl<T> JsonRpcClient<T>
impl<T> JsonRpcClient<T>
Trait Implementations§
Source§impl<T: Debug> Debug for JsonRpcClient<T>
impl<T: Debug> Debug for JsonRpcClient<T>
Source§impl<T> Provider for JsonRpcClient<T>
impl<T> Provider for JsonRpcClient<T>
Source§fn get_block_with_tx_hashes<'life0, 'async_trait, B>(
&'life0 self,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<MaybePendingBlockWithTxHashes, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_block_with_tx_hashes<'life0, 'async_trait, B>( &'life0 self, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<MaybePendingBlockWithTxHashes, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get block information with transaction hashes given the block id
Source§fn get_block_with_txs<'life0, 'async_trait, B>(
&'life0 self,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<MaybePendingBlockWithTxs, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_block_with_txs<'life0, 'async_trait, B>( &'life0 self, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<MaybePendingBlockWithTxs, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get block information with full transactions given the block id
Source§fn get_state_update<'life0, 'async_trait, B>(
&'life0 self,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<MaybePendingStateUpdate, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_state_update<'life0, 'async_trait, B>( &'life0 self, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<MaybePendingStateUpdate, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the information about the result of executing the requested block
Source§fn get_storage_at<'life0, 'async_trait, A, K, B>(
&'life0 self,
contract_address: A,
key: K,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_storage_at<'life0, 'async_trait, A, K, B>( &'life0 self, contract_address: A, key: K, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the value of the storage at the given address and key
Source§fn get_transaction_by_hash<'life0, 'async_trait, H>(
&'life0 self,
transaction_hash: H,
) -> Pin<Box<dyn Future<Output = Result<Transaction, ProviderError<Self::Error>>> + Send + 'async_trait>>where
H: AsRef<FieldElement> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_by_hash<'life0, 'async_trait, H>(
&'life0 self,
transaction_hash: H,
) -> Pin<Box<dyn Future<Output = Result<Transaction, ProviderError<Self::Error>>> + Send + 'async_trait>>where
H: AsRef<FieldElement> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Get the details and status of a submitted transaction
Source§fn get_transaction_by_block_id_and_index<'life0, 'async_trait, B>(
&'life0 self,
block_id: B,
index: u64,
) -> Pin<Box<dyn Future<Output = Result<Transaction, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_transaction_by_block_id_and_index<'life0, 'async_trait, B>( &'life0 self, block_id: B, index: u64, ) -> Pin<Box<dyn Future<Output = Result<Transaction, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the details of a transaction by a given block id and index
Source§fn get_transaction_receipt<'life0, 'async_trait, H>(
&'life0 self,
transaction_hash: H,
) -> Pin<Box<dyn Future<Output = Result<MaybePendingTransactionReceipt, ProviderError<Self::Error>>> + Send + 'async_trait>>where
H: AsRef<FieldElement> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_receipt<'life0, 'async_trait, H>(
&'life0 self,
transaction_hash: H,
) -> Pin<Box<dyn Future<Output = Result<MaybePendingTransactionReceipt, ProviderError<Self::Error>>> + Send + 'async_trait>>where
H: AsRef<FieldElement> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Get the details of a transaction by a given block number and index
Source§fn get_class<'life0, 'async_trait, B, H>(
&'life0 self,
block_id: B,
class_hash: H,
) -> Pin<Box<dyn Future<Output = Result<ContractClass, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_class<'life0, 'async_trait, B, H>( &'life0 self, block_id: B, class_hash: H, ) -> Pin<Box<dyn Future<Output = Result<ContractClass, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the contract class definition in the given block associated with the given hash
Source§fn get_class_hash_at<'life0, 'async_trait, B, A>(
&'life0 self,
block_id: B,
contract_address: A,
) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_class_hash_at<'life0, 'async_trait, B, A>( &'life0 self, block_id: B, contract_address: A, ) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the contract class hash in the given block for the contract deployed at the given address
Source§fn get_class_at<'life0, 'async_trait, B, A>(
&'life0 self,
block_id: B,
contract_address: A,
) -> Pin<Box<dyn Future<Output = Result<ContractClass, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_class_at<'life0, 'async_trait, B, A>( &'life0 self, block_id: B, contract_address: A, ) -> Pin<Box<dyn Future<Output = Result<ContractClass, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the contract class definition in the given block at the given address
Source§fn get_block_transaction_count<'life0, 'async_trait, B>(
&'life0 self,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<u64, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_block_transaction_count<'life0, 'async_trait, B>( &'life0 self, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<u64, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the number of transactions in a block given a block id
Source§fn call<'life0, 'async_trait, R, B>(
&'life0 self,
request: R,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<Vec<FieldElement>, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn call<'life0, 'async_trait, R, B>( &'life0 self, request: R, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<Vec<FieldElement>, ProviderError<Self::Error>>> + Send + 'async_trait>>
Call a starknet function without creating a Starknet transaction
Source§fn estimate_fee<'life0, 'async_trait, R, B>(
&'life0 self,
request: R,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<Vec<FeeEstimate>, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn estimate_fee<'life0, 'async_trait, R, B>( &'life0 self, request: R, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<Vec<FeeEstimate>, ProviderError<Self::Error>>> + Send + 'async_trait>>
Estimate the fee for a given Starknet transaction
Source§fn estimate_message_fee<'life0, 'async_trait, M, B>(
&'life0 self,
message: M,
block_id: B,
) -> Pin<Box<dyn Future<Output = Result<FeeEstimate, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn estimate_message_fee<'life0, 'async_trait, M, B>( &'life0 self, message: M, block_id: B, ) -> Pin<Box<dyn Future<Output = Result<FeeEstimate, ProviderError<Self::Error>>> + Send + 'async_trait>>
Estimate the L2 fee of a message sent on L1
Source§fn block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the most recent accepted block number
Source§fn block_hash_and_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockHashAndNumber, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_hash_and_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockHashAndNumber, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the most recent accepted block hash and number
Source§fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chain_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the currently configured Starknet chain id
Source§fn pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Transaction>, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Transaction>, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the transactions in the transaction pool, recognized by this sequencer
Source§fn syncing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncStatusType, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn syncing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncStatusType, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an object about the sync status, or false if the node is not synching
Source§fn get_events<'life0, 'async_trait>(
&'life0 self,
filter: EventFilter,
continuation_token: Option<String>,
chunk_size: u64,
) -> Pin<Box<dyn Future<Output = Result<EventsPage, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_events<'life0, 'async_trait>(
&'life0 self,
filter: EventFilter,
continuation_token: Option<String>,
chunk_size: u64,
) -> Pin<Box<dyn Future<Output = Result<EventsPage, ProviderError<Self::Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all events matching the given filter
Source§fn get_nonce<'life0, 'async_trait, B, A>(
&'life0 self,
block_id: B,
contract_address: A,
) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>
fn get_nonce<'life0, 'async_trait, B, A>( &'life0 self, block_id: B, contract_address: A, ) -> Pin<Box<dyn Future<Output = Result<FieldElement, ProviderError<Self::Error>>> + Send + 'async_trait>>
Get the nonce associated with the given address in the given block
Source§fn add_invoke_transaction<'life0, 'async_trait, I>(
&'life0 self,
invoke_transaction: I,
) -> Pin<Box<dyn Future<Output = Result<InvokeTransactionResult, ProviderError<Self::Error>>> + Send + 'async_trait>>where
I: AsRef<BroadcastedInvokeTransaction> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn add_invoke_transaction<'life0, 'async_trait, I>(
&'life0 self,
invoke_transaction: I,
) -> Pin<Box<dyn Future<Output = Result<InvokeTransactionResult, ProviderError<Self::Error>>> + Send + 'async_trait>>where
I: AsRef<BroadcastedInvokeTransaction> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Submit a new transaction to be added to the chain
Source§fn add_declare_transaction<'life0, 'async_trait, D>(
&'life0 self,
declare_transaction: D,
) -> Pin<Box<dyn Future<Output = Result<DeclareTransactionResult, ProviderError<Self::Error>>> + Send + 'async_trait>>where
D: AsRef<BroadcastedDeclareTransaction> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn add_declare_transaction<'life0, 'async_trait, D>(
&'life0 self,
declare_transaction: D,
) -> Pin<Box<dyn Future<Output = Result<DeclareTransactionResult, ProviderError<Self::Error>>> + Send + 'async_trait>>where
D: AsRef<BroadcastedDeclareTransaction> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Submit a new transaction to be added to the chain
Source§fn add_deploy_account_transaction<'life0, 'async_trait, D>(
&'life0 self,
deploy_account_transaction: D,
) -> Pin<Box<dyn Future<Output = Result<DeployAccountTransactionResult, ProviderError<Self::Error>>> + Send + 'async_trait>>where
D: AsRef<BroadcastedDeployAccountTransaction> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn add_deploy_account_transaction<'life0, 'async_trait, D>(
&'life0 self,
deploy_account_transaction: D,
) -> Pin<Box<dyn Future<Output = Result<DeployAccountTransactionResult, ProviderError<Self::Error>>> + Send + 'async_trait>>where
D: AsRef<BroadcastedDeployAccountTransaction> + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Submit a new deploy account transaction