pub trait NodeRpcClient: Send + Sync {
Show 21 methods
// Required methods
fn set_genesis_commitment<'life0, 'async_trait>(
&'life0 self,
commitment: Word,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_proven_transaction<'life0, 'async_trait>(
&'life0 self,
proven_transaction: ProvenTransaction,
transaction_inputs: TransactionInputs,
) -> Pin<Box<dyn Future<Output = Result<BlockNumber, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_header_by_number<'life0, 'async_trait>(
&'life0 self,
block_num: Option<BlockNumber>,
include_mmr_proof: bool,
) -> Pin<Box<dyn Future<Output = Result<(BlockHeader, Option<MmrProof>), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<ProvenBlock, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_notes_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
note_ids: &'life1 [NoteId],
) -> Pin<Box<dyn Future<Output = Result<Vec<FetchedNote>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn sync_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
account_ids: &'life1 [AccountId],
note_tags: &'life2 BTreeSet<NoteTag>,
) -> Pin<Box<dyn Future<Output = Result<StateSyncInfo, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_account_details<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<FetchedAccount, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_notes<'life0, 'life1, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
block_to: Option<BlockNumber>,
note_tags: &'life1 BTreeSet<NoteTag>,
) -> Pin<Box<dyn Future<Output = Result<NoteSyncInfo, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn sync_nullifiers<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 [u16],
block_num: BlockNumber,
block_to: Option<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NullifierUpdate>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn check_nullifiers<'life0, 'life1, 'async_trait>(
&'life0 self,
nullifiers: &'life1 [Nullifier],
) -> Pin<Box<dyn Future<Output = Result<Vec<SmtProof>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_account_proofs<'life0, 'life1, 'async_trait>(
&'life0 self,
account_storage_requests: &'life1 BTreeSet<ForeignAccount>,
known_account_codes: BTreeMap<AccountId, AccountCode>,
) -> Pin<Box<dyn Future<Output = Result<AccountProofs, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_note_script_by_root<'life0, 'async_trait>(
&'life0 self,
root: Word,
) -> Pin<Box<dyn Future<Output = Result<NoteScript, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_storage_maps<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<StorageMapInfo, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_account_vault<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<AccountVaultInfo, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_transactions<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_ids: Vec<AccountId>,
) -> Pin<Box<dyn Future<Output = Result<TransactionsInfo, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_network_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkId, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn get_nullifier_commit_height<'life0, 'life1, 'async_trait>(
&'life0 self,
nullifier: &'life1 Nullifier,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockNumber>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_public_note_records<'life0, 'life1, 'async_trait>(
&'life0 self,
note_ids: &'life1 [NoteId],
current_timestamp: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<InputNoteRecord>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_updated_public_accounts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
local_accounts: &'life1 [&'life2 AccountHeader],
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn get_block_header_with_proof<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<(BlockHeader, MmrProof), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_note_by_id<'life0, 'async_trait>(
&'life0 self,
note_id: NoteId,
) -> Pin<Box<dyn Future<Output = Result<FetchedNote, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Defines the interface for communicating with the Miden node.
The implementers are responsible for connecting to the Miden node, handling endpoint requests/responses, and translating responses into domain objects relevant for each of the endpoints.
Required Methods§
Sourcefn set_genesis_commitment<'life0, 'async_trait>(
&'life0 self,
commitment: Word,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_genesis_commitment<'life0, 'async_trait>(
&'life0 self,
commitment: Word,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets the genesis commitment for the client and reconnects to the node providing the genesis commitment in the request headers. If the genesis commitment is already set, this method does nothing.
Sourcefn submit_proven_transaction<'life0, 'async_trait>(
&'life0 self,
proven_transaction: ProvenTransaction,
transaction_inputs: TransactionInputs,
) -> Pin<Box<dyn Future<Output = Result<BlockNumber, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_proven_transaction<'life0, 'async_trait>(
&'life0 self,
proven_transaction: ProvenTransaction,
transaction_inputs: TransactionInputs,
) -> Pin<Box<dyn Future<Output = Result<BlockNumber, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Given a Proven Transaction, send it to the node for it to be included in a future block
using the /SubmitProvenTransaction RPC endpoint.
Sourcefn get_block_header_by_number<'life0, 'async_trait>(
&'life0 self,
block_num: Option<BlockNumber>,
include_mmr_proof: bool,
) -> Pin<Box<dyn Future<Output = Result<(BlockHeader, Option<MmrProof>), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_header_by_number<'life0, 'async_trait>(
&'life0 self,
block_num: Option<BlockNumber>,
include_mmr_proof: bool,
) -> Pin<Box<dyn Future<Output = Result<(BlockHeader, Option<MmrProof>), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Given a block number, fetches the block header corresponding to that height from the node
using the /GetBlockHeaderByNumber endpoint.
If include_mmr_proof is set to true and the function returns an Ok, the second value
of the return tuple should always be Some(MmrProof).
When None is provided, returns info regarding the latest block.
Sourcefn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<ProvenBlock, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<ProvenBlock, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Given a block number, fetches the block corresponding to that height from the node using
the /GetBlockByNumber RPC endpoint.
Sourcefn get_notes_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
note_ids: &'life1 [NoteId],
) -> Pin<Box<dyn Future<Output = Result<Vec<FetchedNote>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_notes_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
note_ids: &'life1 [NoteId],
) -> Pin<Box<dyn Future<Output = Result<Vec<FetchedNote>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches note-related data for a list of NoteId using the /GetNotesById
RPC endpoint.
For miden_objects::note::NoteType::Private notes, the response includes only the
miden_objects::note::NoteMetadata.
For miden_objects::note::NoteType::Public notes, the response includes all note details
(recipient, assets, script, etc.).
In both cases, a miden_objects::note::NoteInclusionProof is returned so the caller can
verify that each note is part of the block’s note tree.
Sourcefn sync_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
account_ids: &'life1 [AccountId],
note_tags: &'life2 BTreeSet<NoteTag>,
) -> Pin<Box<dyn Future<Output = Result<StateSyncInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sync_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
account_ids: &'life1 [AccountId],
note_tags: &'life2 BTreeSet<NoteTag>,
) -> Pin<Box<dyn Future<Output = Result<StateSyncInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetches info from the node necessary to perform a state sync using the
/SyncState RPC endpoint.
block_numis the last block number known by the client. The returnedStateSyncInfoshould contain data starting from the next block, until the first block which contains a note of matching the requested tag, or the chain tip if there are no notes.account_idsis a list of account IDs and determines the accounts the client is interested in and should receive account updates of.note_tagsis a list of tags used to filter the notes the client is interested in, which serves as a “note group” filter. Notice that you can’t filter by a specific note ID.nullifiers_tagssimilar tonote_tags, is a list of tags used to filter the nullifiers corresponding to some notes the client is interested in.
Sourcefn get_account_details<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<FetchedAccount, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_details<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<FetchedAccount, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches the current state of an account from the node using the /GetAccountDetails RPC
endpoint.
account_idis the ID of the wanted account.
Sourcefn sync_notes<'life0, 'life1, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
block_to: Option<BlockNumber>,
note_tags: &'life1 BTreeSet<NoteTag>,
) -> Pin<Box<dyn Future<Output = Result<NoteSyncInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync_notes<'life0, 'life1, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
block_to: Option<BlockNumber>,
note_tags: &'life1 BTreeSet<NoteTag>,
) -> Pin<Box<dyn Future<Output = Result<NoteSyncInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches the notes related to the specified tags using the /SyncNotes RPC endpoint.
block_numis the last block number known by the client.note_tagsis a list of tags used to filter the notes the client is interested in.
Sourcefn sync_nullifiers<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 [u16],
block_num: BlockNumber,
block_to: Option<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NullifierUpdate>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync_nullifiers<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 [u16],
block_num: BlockNumber,
block_to: Option<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Vec<NullifierUpdate>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches the nullifiers corresponding to a list of prefixes using the
/SyncNullifiers RPC endpoint.
prefixis a list of nullifiers prefixes to search for.block_numis the block number to start the search from. Nullifiers created in this block or the following blocks will be included.block_tois the optional block number to stop the search at. If not provided, syncs up to the network chain tip.
Sourcefn check_nullifiers<'life0, 'life1, 'async_trait>(
&'life0 self,
nullifiers: &'life1 [Nullifier],
) -> Pin<Box<dyn Future<Output = Result<Vec<SmtProof>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_nullifiers<'life0, 'life1, 'async_trait>(
&'life0 self,
nullifiers: &'life1 [Nullifier],
) -> Pin<Box<dyn Future<Output = Result<Vec<SmtProof>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches the nullifier proofs corresponding to a list of nullifiers using the
/CheckNullifiers RPC endpoint.
Sourcefn get_account_proofs<'life0, 'life1, 'async_trait>(
&'life0 self,
account_storage_requests: &'life1 BTreeSet<ForeignAccount>,
known_account_codes: BTreeMap<AccountId, AccountCode>,
) -> Pin<Box<dyn Future<Output = Result<AccountProofs, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_account_proofs<'life0, 'life1, 'async_trait>(
&'life0 self,
account_storage_requests: &'life1 BTreeSet<ForeignAccount>,
known_account_codes: BTreeMap<AccountId, AccountCode>,
) -> Pin<Box<dyn Future<Output = Result<AccountProofs, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches the account data needed to perform a Foreign Procedure Invocation (FPI) on the
specified foreign accounts, using the GetAccountProofs endpoint.
The code_commitments parameter is a list of known code commitments
to prevent unnecessary data fetching. Returns the block number and the FPI account data. If
one of the tracked accounts is not found in the node, the method will return an error.
Sourcefn get_note_script_by_root<'life0, 'async_trait>(
&'life0 self,
root: Word,
) -> Pin<Box<dyn Future<Output = Result<NoteScript, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_note_script_by_root<'life0, 'async_trait>(
&'life0 self,
root: Word,
) -> Pin<Box<dyn Future<Output = Result<NoteScript, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches the note script with the specified root.
Errors:
RpcError::ExpectedDataMissingif the note with the specified root is not found.
Sourcefn sync_storage_maps<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<StorageMapInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_storage_maps<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<StorageMapInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches storage map updates for specified account and storage slots within a block range,
using the /SyncStorageMaps RPC endpoint.
block_from: The starting block number for the range.block_to: The ending block number for the range.account_id: The account ID for which to fetch storage map updates.
Sourcefn sync_account_vault<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<AccountVaultInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_account_vault<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<AccountVaultInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches account vault updates for specified account within a block range,
using the /SyncAccountVault RPC endpoint.
block_from: The starting block number for the range.block_to: The ending block number for the range.account_id: The account ID for which to fetch storage map updates.
Sourcefn sync_transactions<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_ids: Vec<AccountId>,
) -> Pin<Box<dyn Future<Output = Result<TransactionsInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_transactions<'life0, 'async_trait>(
&'life0 self,
block_from: BlockNumber,
block_to: Option<BlockNumber>,
account_ids: Vec<AccountId>,
) -> Pin<Box<dyn Future<Output = Result<TransactionsInfo, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches transactions records for specific accounts within a block range.
Using the /SyncTransactions RPC endpoint.
block_from: The starting block number for the range.block_to: The ending block number for the range.account_ids: The account IDs for which to fetch storage map updates.
Sourcefn get_network_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkId, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_network_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkId, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches the network ID of the node. Errors:
RpcError::ExpectedDataMissingif the note with the specified root is not found.
Provided Methods§
Sourcefn get_nullifier_commit_height<'life0, 'life1, 'async_trait>(
&'life0 self,
nullifier: &'life1 Nullifier,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockNumber>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_nullifier_commit_height<'life0, 'life1, 'async_trait>(
&'life0 self,
nullifier: &'life1 Nullifier,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockNumber>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches the commit height where the nullifier was consumed. If the nullifier isn’t found,
then None is returned.
The block_num parameter is the block number to start the search from.
The default implementation of this method uses
NodeRpcClient::sync_nullifiers.
Sourcefn get_public_note_records<'life0, 'life1, 'async_trait>(
&'life0 self,
note_ids: &'life1 [NoteId],
current_timestamp: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<InputNoteRecord>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_public_note_records<'life0, 'life1, 'async_trait>(
&'life0 self,
note_ids: &'life1 [NoteId],
current_timestamp: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<InputNoteRecord>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches public note-related data for a list of NoteId and builds InputNoteRecords
with it. If a note is not found or it’s private, it is ignored and will not be included
in the returned list.
The default implementation of this method uses NodeRpcClient::get_notes_by_id.
Sourcefn get_updated_public_accounts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
local_accounts: &'life1 [&'life2 AccountHeader],
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_updated_public_accounts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
local_accounts: &'life1 [&'life2 AccountHeader],
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetches the public accounts that have been updated since the last known state of the accounts.
The local_accounts parameter is a list of account headers that the client has
stored locally and that it wants to check for updates. If an account is private or didn’t
change, it is ignored and will not be included in the returned list.
The default implementation of this method uses NodeRpcClient::get_account_details.
Sourcefn get_block_header_with_proof<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<(BlockHeader, MmrProof), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_header_with_proof<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<(BlockHeader, MmrProof), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Given a block number, fetches the block header corresponding to that height from the node along with the MMR proof.
The default implementation of this method uses
NodeRpcClient::get_block_header_by_number.
Sourcefn get_note_by_id<'life0, 'async_trait>(
&'life0 self,
note_id: NoteId,
) -> Pin<Box<dyn Future<Output = Result<FetchedNote, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_note_by_id<'life0, 'async_trait>(
&'life0 self,
note_id: NoteId,
) -> Pin<Box<dyn Future<Output = Result<FetchedNote, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches the note with the specified ID.
The default implementation of this method uses NodeRpcClient::get_notes_by_id.
Errors:
RpcError::NoteNotFoundif the note with the specified ID is not found.