pub struct RpcClient<P> { /* private fields */ }
Expand description
An abstract provider for interacting with the Neo JSON RPC
API. Must be instantiated
with a data transport which implements the JsonRpcClient
trait
(e.g. HTTP, Websockets etc.)
§Example
use neo3::neo_clients::{HttpProvider, RpcClient, APITrait};
use neo3::neo_config::NeoConstants;
async fn foo() -> Result<(), Box<dyn std::error::Error>> {
let provider = HttpProvider::new(NeoConstants::SEED_1)?;
let client = RpcClient::new(provider);
let block = client.get_block_by_index(100u32, false).await?;
println!("Got block: {}", serde_json::to_string(&block)?);
Ok(())
}
Implementations§
Source§impl<P: JsonRpcProvider> RpcClient<P>
impl<P: JsonRpcProvider> RpcClient<P>
Sourcepub async fn node_client(&self) -> Result<NeoVersion, ProviderError>
pub async fn node_client(&self) -> Result<NeoVersion, ProviderError>
Returns the type of node we’re connected to, while also caching the value for use in other node-specific API calls, such as the get_block_receipts call.
Sourcepub fn with_sender(self, address: impl Into<Address>) -> Self
pub fn with_sender(self, address: impl Into<Address>) -> Self
Set the default sender on the provider
Source§impl<P: JsonRpcProvider> RpcClient<P>
impl<P: JsonRpcProvider> RpcClient<P>
Sourcepub fn set_interval<T: Into<Duration>>(&mut self, interval: T) -> &mut Self
pub fn set_interval<T: Into<Duration>>(&mut self, interval: T) -> &mut Self
Sets the default polling interval for event filters and pending transactions (default: 7 seconds)
Source§impl<Read, Write> RpcClient<RwClient<Read, Write>>where
Read: JsonRpcProvider + 'static,
<Read as JsonRpcProvider>::Error: Sync + Send + 'static + Display,
Write: JsonRpcProvider + 'static,
<Write as JsonRpcProvider>::Error: Sync + Send + 'static + Display,
impl<Read, Write> RpcClient<RwClient<Read, Write>>where
Read: JsonRpcProvider + 'static,
<Read as JsonRpcProvider>::Error: Sync + Send + 'static + Display,
Write: JsonRpcProvider + 'static,
<Write as JsonRpcProvider>::Error: Sync + Send + 'static + Display,
Trait Implementations§
Source§impl<P: JsonRpcProvider> APITrait for RpcClient<P>
impl<P: JsonRpcProvider> APITrait for RpcClient<P>
Source§fn get_best_block_hash<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_best_block_hash<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the hash of the latest block in the blockchain.
- Returns: The request object
Source§fn get_block_hash<'life0, 'async_trait>(
&'life0 self,
block_index: u32,
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_hash<'life0, 'async_trait>(
&'life0 self,
block_index: u32,
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the block hash of the corresponding block based on the specified block index.
- Parameter blockIndex: The block index
- Returns: The request object
Source§fn get_block<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
full_tx: bool,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
full_tx: bool,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding block information according to the specified block hash.
- Parameters:
- blockHash: The block hash
- returnFullTransactionObjects: Whether to get block information with all transaction objects or just the block header
- Returns: The request object
Source§fn get_block_by_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 str,
full_tx: bool,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block_by_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 str,
full_tx: bool,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the block by hash string.
- Parameters:
- hash: The block hash as a string
- full_tx: Whether to get block information with all transaction objects or just the block header
- Returns: The request object
Source§fn get_raw_block<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_block<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding block information for the specified block hash.
- Parameter blockHash: The block hash
- Returns: The request object
Source§fn get_block_header_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_header_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the block header count of the blockchain.
- Returns: The request object
Source§fn get_block_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the block count of the blockchain.
- Returns: The request object
Source§fn get_block_header<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_header<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding block header information according to the specified block hash.
- Parameter blockHash: The block hash
- Returns: The request object
Source§fn get_block_header_by_index<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_header_by_index<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding block header information according to the specified index.
- Parameter blockIndex: The block index
- Returns: The request object
Source§fn get_raw_block_header<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_block_header<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding block header information according to the specified block hash.
- Parameter blockHash: The block hash
- Returns: The request object
Source§fn get_raw_block_header_by_index<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_block_header_by_index<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding block header information according to the specified index.
- Parameter blockIndex: The block index
- Returns: The request object
Source§fn get_native_contracts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NativeContractState>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_native_contracts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NativeContractState>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the native contracts list, which includes the basic information of native contracts and the contract descriptive file manifest.json
.
- Returns: The request object
Source§fn get_contract_state<'life0, 'async_trait>(
&'life0 self,
hash: H160,
) -> Pin<Box<dyn Future<Output = Result<ContractState, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_contract_state<'life0, 'async_trait>(
&'life0 self,
hash: H160,
) -> Pin<Box<dyn Future<Output = Result<ContractState, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the contract information.
- Parameter contractHash: The contract script hash
- Returns: The request object
Source§fn get_contract_state_by_id<'life0, 'async_trait>(
&'life0 self,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<ContractState, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_contract_state_by_id<'life0, 'async_trait>(
&'life0 self,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<ContractState, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the contract information.
- Parameter contractHash: The contract script hash
- Returns: The request object
Source§fn get_native_contract_state<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContractState, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_native_contract_state<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContractState, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the native contract information by its name.
This RPC only works for native contracts.
- Parameter contractName: The name of the native contract
- Returns: The request object
Source§fn get_mem_pool<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MemPoolDetails, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_mem_pool<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MemPoolDetails, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a list of unconfirmed or confirmed transactions in memory.
- Returns: The request object
Source§fn get_raw_mem_pool<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<H256>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_mem_pool<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<H256>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a list of confirmed transactions in memory.
- Returns: The request object
Source§fn get_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding transaction information based on the specified transaction hash.
- Parameter txHash: The transaction hash
- Returns: The request object
Source§fn get_raw_transaction<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_transaction<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the corresponding transaction information based on the specified transaction hash.
- Parameter txHash: The transaction hash
- Returns: The request object
Source§fn get_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: H160,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: H160,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the stored value according to the contract hash and the key.
- Parameters:
- contractHash: The contract hash
- keyHexString: The key to look up in storage as a hexadecimal string
- Returns: The request object
Source§fn find_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: H160,
prefix_hex_string: &'life1 str,
start_index: u64,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: H160,
prefix_hex_string: &'life1 str,
start_index: u64,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Finds the storage entries of a contract based on the prefix and start index.
- Parameters:
- contractHash: The contract hash
- prefix_hex_string: The prefix to filter the storage entries
- start_index: the start index
- Returns: The request object
Source§fn find_storage_with_id<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_id: i64,
prefix_hex_string: &'life1 str,
start_index: u64,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_storage_with_id<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_id: i64,
prefix_hex_string: &'life1 str,
start_index: u64,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Finds the storage entries of a contract based on the prefix and start index.
- Parameters:
- contract_id: The contract id
- prefix_hex_string: The prefix to filter the storage entries
- start_index: the start index
- Returns: The request object
Source§fn get_transaction_height<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_height<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the transaction height with the specified transaction hash.
- Parameter txHash: The transaction hash
- Returns: The request object
Source§fn get_next_block_validators<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Validator>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_next_block_validators<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Validator>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the validators of the next block.
- Returns: The request object
Source§fn get_committee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_committee<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the public key list of current Neo committee members.
- Returns: The request object
Source§fn get_connection_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_connection_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the current number of connections for the node.
- Returns: The request object
Source§fn get_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Peers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Peers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a list of nodes that the node is currently connected or disconnected from.
- Returns: The request object
Source§fn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NeoVersion, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NeoVersion, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the version information of the node.
- Returns: The request object
Source§fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
hex: String,
) -> Pin<Box<dyn Future<Output = Result<RawTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
hex: String,
) -> Pin<Box<dyn Future<Output = Result<RawTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Broadcasts a transaction over the NEO network.
- Parameter rawTransactionHex: The raw transaction in hexadecimal
- Returns: The request object
Source§fn send_transaction<'a, 'life0, 'async_trait>(
&'life0 self,
tx: Transaction<'a, P>,
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn send_transaction<'a, 'life0, 'async_trait>(
&'life0 self,
tx: Transaction<'a, P>,
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Source§fn submit_block<'life0, 'async_trait>(
&'life0 self,
hex: String,
) -> Pin<Box<dyn Future<Output = Result<SubmitBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_block<'life0, 'async_trait>(
&'life0 self,
hex: String,
) -> Pin<Box<dyn Future<Output = Result<SubmitBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Broadcasts a new block over the NEO network.
- Parameter serializedBlockAsHex: The block in hexadecimal
- Returns: The request object
Source§fn broadcast_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn broadcast_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Broadcasts the node’s address to the network
Source§fn broadcast_block<'life0, 'async_trait>(
&'life0 self,
block: NeoBlock,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn broadcast_block<'life0, 'async_trait>(
&'life0 self,
block: NeoBlock,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Broadcasts a block to the network
Source§fn broadcast_get_blocks<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 str,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn broadcast_get_blocks<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 str,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn broadcast_transaction<'life0, 'async_trait>(
&'life0 self,
tx: RTransaction,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn broadcast_transaction<'life0, 'async_trait>(
&'life0 self,
tx: RTransaction,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn create_contract_deployment_transaction<'life0, 'async_trait>(
&'life0 self,
nef: NefFile,
manifest: ContractManifest,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_contract_deployment_transaction<'life0, 'async_trait>(
&'life0 self,
nef: NefFile,
manifest: ContractManifest,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a contract deployment transaction
Source§fn create_contract_update_transaction<'life0, 'async_trait>(
&'life0 self,
contract_hash: H160,
nef: NefFile,
manifest: ContractManifest,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_contract_update_transaction<'life0, 'async_trait>(
&'life0 self,
contract_hash: H160,
nef: NefFile,
manifest: ContractManifest,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a contract update transaction
Source§fn create_invocation_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: H160,
method: &'life1 str,
parameters: Vec<ContractParameter>,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_invocation_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: H160,
method: &'life1 str,
parameters: Vec<ContractParameter>,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<TransactionBuilder<'_, P>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates an invocation transaction
Source§fn invoke_function<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: &'life1 H160,
method: String,
params: Vec<ContractParameter>,
signers: Option<Vec<Signer>>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invoke_function<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_hash: &'life1 H160,
method: String,
params: Vec<ContractParameter>,
signers: Option<Vec<Signer>>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Invokes the function with functionName
of the smart contract with the specified contract hash.
- Parameters:
- contractHash: The contract hash to invoke
- functionName: The function to invoke
- contractParams: The parameters of the function
- signers: The signers
- Returns: The request object
Source§fn invoke_script<'life0, 'async_trait>(
&'life0 self,
hex: String,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_script<'life0, 'async_trait>(
&'life0 self,
hex: String,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invokes a script.
- Parameters:
- scriptHex: The script to invoke
- signers: The signers
- Returns: The request object
Source§fn get_unclaimed_gas<'life0, 'async_trait>(
&'life0 self,
hash: H160,
) -> Pin<Box<dyn Future<Output = Result<UnclaimedGas, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_unclaimed_gas<'life0, 'async_trait>(
&'life0 self,
hash: H160,
) -> Pin<Box<dyn Future<Output = Result<UnclaimedGas, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the unclaimed GAS of the account with the specified script hash.
- Parameter scriptHash: The account’s script hash
- Returns: The request object
Source§fn list_plugins<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Plugin>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_plugins<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Plugin>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a list of plugins loaded by the node.
- Returns: The request object
Source§fn validate_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ValidateAddress, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ValidateAddress, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verifies whether the address is a valid NEO address.
- Parameter address: The address to verify
- Returns: The request object
Source§fn close_wallet<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_wallet<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Closes the current wallet.
- Returns: The request object
Source§fn dump_priv_key<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dump_priv_key<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Exports the private key of the specified script hash.
- Parameter scriptHash: The account’s script hash
- Returns: The request object
Source§fn get_wallet_balance<'life0, 'async_trait>(
&'life0 self,
token_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Balance, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_wallet_balance<'life0, 'async_trait>(
&'life0 self,
token_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Balance, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the wallet balance of the corresponding token.
- Parameter tokenHash: The token hash
- Returns: The request object
Source§fn get_new_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_new_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new address.
- Returns: The request object
Source§fn get_wallet_unclaimed_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_wallet_unclaimed_gas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the amount of unclaimed GAS in the wallet.
- Returns: The request object
Source§fn import_priv_key<'life0, 'async_trait>(
&'life0 self,
priv_key: String,
) -> Pin<Box<dyn Future<Output = Result<NeoAddress, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn import_priv_key<'life0, 'async_trait>(
&'life0 self,
priv_key: String,
) -> Pin<Box<dyn Future<Output = Result<NeoAddress, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Imports a private key to the wallet.
- Parameter privateKeyInWIF: The private key in WIF-format
- Returns: The request object
Source§fn calculate_network_fee<'life0, 'async_trait>(
&'life0 self,
txBase64: String,
) -> Pin<Box<dyn Future<Output = Result<NeoNetworkFee, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn calculate_network_fee<'life0, 'async_trait>(
&'life0 self,
txBase64: String,
) -> Pin<Box<dyn Future<Output = Result<NeoNetworkFee, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Calculates the network fee for the specified transaction.
- Parameter txBase64: The transaction in hexadecimal
- Returns: The request object
Source§fn list_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NeoAddress>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NeoAddress>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all the addresses in the current wallet.
- Returns: The request object
Source§fn open_wallet<'life0, 'async_trait>(
&'life0 self,
path: String,
password: String,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_wallet<'life0, 'async_trait>(
&'life0 self,
path: String,
password: String,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens the specified wallet.
- Parameters:
- walletPath: The wallet file path
- password: The password for the wallet
- Returns: The request object
Source§fn send_from<'life0, 'async_trait>(
&'life0 self,
token_hash: H160,
from: H160,
to: H160,
amount: u32,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_from<'life0, 'async_trait>(
&'life0 self,
token_hash: H160,
from: H160,
to: H160,
amount: u32,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Transfers an amount of a token from an account to another account.
- Parameters:
- tokenHash: The token hash of the NEP-17 contract
- from: The transferring account’s script hash
- to: The recipient
- amount: The transfer amount in token fractions
- Returns: The request object
Source§fn send_many<'life0, 'async_trait>(
&'life0 self,
from: Option<H160>,
send_tokens: Vec<TransactionSendToken>,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_many<'life0, 'async_trait>(
&'life0 self,
from: Option<H160>,
send_tokens: Vec<TransactionSendToken>,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initiates multiple transfers to multiple accounts from one specific account in a transaction.
- Parameters:
- from: The transferring account’s script hash
- txSendTokens: a list of
TransactionSendToken
objects, that each contains the token hash, the recipient and the transfer amount.
- Returns: The request object
Source§fn send_to_address<'life0, 'async_trait>(
&'life0 self,
token_hash: H160,
to: H160,
amount: u32,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_to_address<'life0, 'async_trait>(
&'life0 self,
token_hash: H160,
to: H160,
amount: u32,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Transfers an amount of a token to another account.
- Parameters:
- tokenHash: The token hash of the NEP-17 contract
- to: The recipient
- amount: The transfer amount in token fractions
- Returns: The request object
Source§fn get_application_log<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<ApplicationLog, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_application_log<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<ApplicationLog, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the application logs of the specified transaction hash.
- Parameter txHash: The transaction hash
- Returns: The request object
Source§fn get_nep17_balances<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep17Balances, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep17_balances<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep17Balances, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the balance of all NEP-17 token assets in the specified script hash.
- Parameter scriptHash: The account’s script hash
- Returns: The request object
Source§fn get_nep17_transfers<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep17Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep17_transfers<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep17Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all the NEP-17 transaction information occurred in the specified script hash.
- Parameter scriptHash: The account’s script hash
- Returns: The request object
Source§fn get_nep17_transfers_from<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep17Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep17_transfers_from<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep17Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all the NEP17 transaction information occurred in the specified script hash since the specified time.
- Parameters:
- scriptHash: The account’s script hash
- from: The timestamp transactions occurred since
- Returns: The request object
Source§fn get_nep17_transfers_range<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep17Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep17_transfers_range<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep17Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all the NEP17 transaction information occurred in the specified script hash in the specified time range.
- Parameters:
- scriptHash: The account’s script hash
- from: The start timestamp
- to: The end timestamp
- Returns: The request object
Source§fn get_nep11_balances<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep11Balances, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep11_balances<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep11Balances, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all NEP-11 balances of the specified account.
- Parameter scriptHash: The account’s script hash
- Returns: The request object
Source§fn get_nep11_transfers<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep11Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep11_transfers<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
) -> Pin<Box<dyn Future<Output = Result<Nep11Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all NEP-11 transaction of the given account.
- Parameter scriptHash: The account’s script hash
- Returns: The request object
Source§fn get_nep11_transfers_from<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep11Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep11_transfers_from<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep11Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all NEP-11 transaction of the given account since the given time.
- Parameters:
- scriptHash: The account’s script hash
- from: The date from when to report transactions
- Returns: The request object
Source§fn get_nep11_transfers_range<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep11Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nep11_transfers_range<'life0, 'async_trait>(
&'life0 self,
script_hash: H160,
from: u64,
to: u64,
) -> Pin<Box<dyn Future<Output = Result<Nep11Transfers, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all NEP-11 transactions of the given account in the time span between from
and to
.
- Parameters:
- scriptHash: The account’s script hash
- from: The start timestamp
- to: The end timestamp
- Returns: The request object
Source§fn get_nep11_properties<'life0, 'life1, 'async_trait>(
&'life0 self,
script_hash: H160,
token_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_nep11_properties<'life0, 'life1, 'async_trait>(
&'life0 self,
script_hash: H160,
token_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the properties of the token with tokenId
from the NEP-11 contract with scriptHash
.
The properties are a mapping from the property name string to the value string. The value is plain text if the key is one of the properties defined in the NEP-11 standard. Otherwise, the value is a Base64-encoded byte array.
To receive custom property values that consist of nested types (e.g., Maps or Arrays) use invokeFunction(_:_:_:)
to directly invoke the method properties
of the NEP-11 smart contract.
- Parameters:
- scriptHash: The account’s script hash
- tokenId: The ID of the token as a hexadecimal string
- Returns: The request object
Source§fn get_state_root<'life0, 'async_trait>(
&'life0 self,
block_index: u32,
) -> Pin<Box<dyn Future<Output = Result<StateRoot, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_state_root<'life0, 'async_trait>(
&'life0 self,
block_index: u32,
) -> Pin<Box<dyn Future<Output = Result<StateRoot, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the state root by the block height.
- Parameter blockIndex: The block index
- Returns: The request object
Source§fn get_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
root_hash: H256,
contract_hash: H160,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
root_hash: H256,
contract_hash: H160,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the proof based on the root hash, the contract hash and the storage key.
- Parameters:
- rootHash: The root hash
- contractHash: The contract hash
- storageKeyHex: The storage key
- Returns: The request object
Source§fn verify_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
root_hash: H256,
proof: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
root_hash: H256,
proof: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verifies the proof data and gets the value of the storage corresponding to the key.
- Parameters:
- rootHash: The root hash
- proof: The proof data of the state root
- Returns: The request object
Source§fn get_state_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StateHeight, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_state_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StateHeight, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the state root height.
- Returns: The request object
Source§fn get_state<'life0, 'life1, 'async_trait>(
&'life0 self,
root_hash: H256,
contract_hash: H160,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_state<'life0, 'life1, 'async_trait>(
&'life0 self,
root_hash: H256,
contract_hash: H160,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets the state.
- Parameters:
- rootHash: The root hash
- contractHash: The contract hash
- keyHex: The storage key
- Returns: The request object
Source§fn find_states<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
root_hash: H256,
contract_hash: H160,
key_prefix: &'life1 str,
start_key: Option<&'life2 str>,
count: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<States, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_states<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
root_hash: H256,
contract_hash: H160,
key_prefix: &'life1 str,
start_key: Option<&'life2 str>,
count: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<States, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets a list of states that match the provided key prefix.
Includes proofs of the first and last entry.
- Parameters:
- rootHash: The root hash
- contractHash: The contact hash
- keyPrefixHex: The key prefix
- startKeyHex: The start key
- countFindResultItems: The number of results. An upper limit is defined in the Neo core
- Returns: The request object
Source§fn invoke_function_diagnostics<'life0, 'async_trait>(
&'life0 self,
contract_hash: H160,
function_name: String,
params: Vec<ContractParameter>,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_function_diagnostics<'life0, 'async_trait>(
&'life0 self,
contract_hash: H160,
function_name: String,
params: Vec<ContractParameter>,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invokes the function with functionName
of the smart contract with the specified contract hash.
Includes diagnostics from the invocation.
- Parameters:
- contractHash: The contract hash to invoke
- functionName: The function to invoke
- contractParams: The parameters of the function
- signers: The signers
- Returns: The request object
Source§fn invoke_script_diagnostics<'life0, 'async_trait>(
&'life0 self,
hex: String,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_script_diagnostics<'life0, 'async_trait>(
&'life0 self,
hex: String,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invokes a script.
Includes diagnostics from the invocation.
- Parameters:
- scriptHex: The script to invoke
- signers: The signers
- Returns: The request object
Source§fn traverse_iterator<'life0, 'async_trait>(
&'life0 self,
session_id: String,
iterator_id: String,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<StackItem>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn traverse_iterator<'life0, 'async_trait>(
&'life0 self,
session_id: String,
iterator_id: String,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<StackItem>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the results from an iterator.
The results are limited to count
items. If count
is greater than MaxIteratorResultItems
in the Neo Node’s configuration file, this request fails.
- Parameters:
- sessionId: The session id
- iteratorId: The iterator id
- count: The maximal number of stack items returned
- Returns: The request object
Source§type Error = ProviderError
type Error = ProviderError
Source§fn rpc_client(&self) -> &RpcClient<Self::Provider>
fn rpc_client(&self) -> &RpcClient<Self::Provider>
fn network<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_transaction<'life0, 'async_trait>(
&'life0 self,
txHash: H256,
signers: Vec<H160>,
extra_fee: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_index<'life0, 'async_trait>(
&'life0 self,
index: u32,
full_tx: bool,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_block_by_index<'life0, 'async_trait>(
&'life0 self,
index: u32,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn terminate_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invoke_contract_verify<'life0, 'async_trait>(
&'life0 self,
hash: H160,
params: Vec<ContractParameter>,
signers: Vec<Signer>,
) -> Pin<Box<dyn Future<Output = Result<InvocationResult, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_mempool<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MemPoolDetails, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn import_private_key<'life0, 'async_trait>(
&'life0 self,
wif: String,
) -> Pin<Box<dyn Future<Output = Result<NeoAddress, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_header_hash<'life0, 'async_trait>(
&'life0 self,
hash: H256,
) -> Pin<Box<dyn Future<Output = Result<NeoBlock, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_to_address_send_token<'life0, 'life1, 'async_trait>(
&'life0 self,
send_token: &'life1 TransactionSendToken,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_from_send_token<'life0, 'life1, 'async_trait>(
&'life0 self,
send_token: &'life1 TransactionSendToken,
from: H160,
) -> Pin<Box<dyn Future<Output = Result<RTransaction, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn nns_resolver(&self) -> H160
fn block_interval(&self) -> u32
fn polling_interval(&self) -> u32
fn max_valid_until_block_increment(&self) -> u32
Auto Trait Implementations§
impl<P> Freeze for RpcClient<P>where
P: Freeze,
impl<P> !RefUnwindSafe for RpcClient<P>
impl<P> Send for RpcClient<P>where
P: Send,
impl<P> Sync for RpcClient<P>where
P: Sync,
impl<P> Unpin for RpcClient<P>where
P: Unpin,
impl<P> !UnwindSafe for RpcClient<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more