Skip to main content

Rpc

Trait Rpc 

Source
pub trait Rpc:
    Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn status<'life0, 'async_trait>( &'life0 self, request: Request<()>, ) -> Pin<Box<dyn Future<Output = Result<Response<StoreStatus>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn check_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<NullifierList>, ) -> Pin<Box<dyn Future<Output = Result<Response<CheckNullifiersResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_account<'life0, 'async_trait>( &'life0 self, request: Request<AccountRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AccountResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_by_number<'life0, 'async_trait>( &'life0 self, request: Request<BlockNumber>, ) -> Pin<Box<dyn Future<Output = Result<Response<MaybeBlock>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_header_by_number<'life0, 'async_trait>( &'life0 self, request: Request<BlockHeaderByNumberRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockHeaderByNumberResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_notes_by_id<'life0, 'async_trait>( &'life0 self, request: Request<NoteIdList>, ) -> Pin<Box<dyn Future<Output = Result<Response<CommittedNoteList>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_note_script_by_root<'life0, 'async_trait>( &'life0 self, request: Request<NoteScriptRoot>, ) -> Pin<Box<dyn Future<Output = Result<Response<MaybeNoteScript>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<SyncNullifiersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncNullifiersResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_notes<'life0, 'async_trait>( &'life0 self, request: Request<SyncNotesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncNotesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_chain_mmr<'life0, 'async_trait>( &'life0 self, request: Request<SyncChainMmrRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncChainMmrResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_account_vault<'life0, 'async_trait>( &'life0 self, request: Request<SyncAccountVaultRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncAccountVaultResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_account_storage_maps<'life0, 'async_trait>( &'life0 self, request: Request<SyncAccountStorageMapsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncAccountStorageMapsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_transactions<'life0, 'async_trait>( &'life0 self, request: Request<SyncTransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncTransactionsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with RpcServer.

Required Methods§

Source

fn status<'life0, 'async_trait>( &'life0 self, request: Request<()>, ) -> Pin<Box<dyn Future<Output = Result<Response<StoreStatus>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the status info.

Source

fn check_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<NullifierList>, ) -> Pin<Box<dyn Future<Output = Result<Response<CheckNullifiersResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a Sparse Merkle Tree opening proof for each requested nullifier

Each proof demonstrates either:

  • Inclusion: Nullifier exists in the tree (note was consumed)
  • Non-inclusion: Nullifier does not exist (note was not consumed)

The leaf field indicates the status:

  • empty_leaf_index: Non-inclusion proof
  • single or multiple: Inclusion proof if the nullifier key is present

Verify proofs against the nullifier tree root in the latest block header.

Source

fn get_account<'life0, 'async_trait>( &'life0 self, request: Request<AccountRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<AccountResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the latest details the specified account.

Source

fn get_block_by_number<'life0, 'async_trait>( &'life0 self, request: Request<BlockNumber>, ) -> Pin<Box<dyn Future<Output = Result<Response<MaybeBlock>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns raw block data for the specified block number.

Source

fn get_block_header_by_number<'life0, 'async_trait>( &'life0 self, request: Request<BlockHeaderByNumberRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockHeaderByNumberResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves block header by given block number. Optionally, it also returns the MMR path and current chain length to authenticate the block’s inclusion.

Source

fn get_notes_by_id<'life0, 'async_trait>( &'life0 self, request: Request<NoteIdList>, ) -> Pin<Box<dyn Future<Output = Result<Response<CommittedNoteList>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a list of committed notes matching the provided note IDs.

Source

fn get_note_script_by_root<'life0, 'async_trait>( &'life0 self, request: Request<NoteScriptRoot>, ) -> Pin<Box<dyn Future<Output = Result<Response<MaybeNoteScript>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the script for a note by its root.

Source

fn sync_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<SyncNullifiersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncNullifiersResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a list of nullifiers that match the specified prefixes and are recorded in the node.

Note that only 16-bit prefixes are supported at this time.

Source

fn sync_notes<'life0, 'async_trait>( &'life0 self, request: Request<SyncNotesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncNotesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns blocks containing notes matching the requested tags within the given range.

The response batches as many blocks as fit within the response payload limit.

Source

fn sync_chain_mmr<'life0, 'async_trait>( &'life0 self, request: Request<SyncChainMmrRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncChainMmrResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns chain MMR updates within a block range.

Source

fn sync_account_vault<'life0, 'async_trait>( &'life0 self, request: Request<SyncAccountVaultRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncAccountVaultResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns account vault updates for specified account within a block range.

Source

fn sync_account_storage_maps<'life0, 'async_trait>( &'life0 self, request: Request<SyncAccountStorageMapsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncAccountStorageMapsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns storage map updates for specified account and storage slots within a block range.

Source

fn sync_transactions<'life0, 'async_trait>( &'life0 self, request: Request<SyncTransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncTransactionsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns transactions records for specific accounts within a block range.

Implementors§