Trait kaspa_wasm::rpc::RpcApi
source · pub trait RpcApi: Sync + Send + AnySync {
Show 73 methods
// Required methods
fn ping_call<'life0, 'async_trait>(
&'life0 self,
request: PingRequest
) -> Pin<Box<dyn Future<Output = Result<PingResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_metrics_call<'life0, 'async_trait>(
&'life0 self,
request: GetMetricsRequest
) -> Pin<Box<dyn Future<Output = Result<GetMetricsResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_server_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetServerInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetServerInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_sync_status_call<'life0, 'async_trait>(
&'life0 self,
request: GetSyncStatusRequest
) -> Pin<Box<dyn Future<Output = Result<GetSyncStatusResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_current_network_call<'life0, 'async_trait>(
&'life0 self,
request: GetCurrentNetworkRequest
) -> Pin<Box<dyn Future<Output = Result<GetCurrentNetworkResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn submit_block_call<'life0, 'async_trait>(
&'life0 self,
request: SubmitBlockRequest
) -> Pin<Box<dyn Future<Output = Result<SubmitBlockResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_block_template_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockTemplateRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_peer_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetPeerAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetPeerAddressesResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_sink_call<'life0, 'async_trait>(
&'life0 self,
request: GetSinkRequest
) -> Pin<Box<dyn Future<Output = Result<GetSinkResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_mempool_entry_call<'life0, 'async_trait>(
&'life0 self,
request: GetMempoolEntryRequest
) -> Pin<Box<dyn Future<Output = Result<GetMempoolEntryResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_mempool_entries_call<'life0, 'async_trait>(
&'life0 self,
request: GetMempoolEntriesRequest
) -> Pin<Box<dyn Future<Output = Result<GetMempoolEntriesResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_connected_peer_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetConnectedPeerInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetConnectedPeerInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn add_peer_call<'life0, 'async_trait>(
&'life0 self,
request: AddPeerRequest
) -> Pin<Box<dyn Future<Output = Result<AddPeerResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn submit_transaction_call<'life0, 'async_trait>(
&'life0 self,
request: SubmitTransactionRequest
) -> Pin<Box<dyn Future<Output = Result<SubmitTransactionResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_block_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlockResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_subnetwork_call<'life0, 'async_trait>(
&'life0 self,
request: GetSubnetworkRequest
) -> Pin<Box<dyn Future<Output = Result<GetSubnetworkResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_virtual_chain_from_block_call<'life0, 'async_trait>(
&'life0 self,
request: GetVirtualChainFromBlockRequest
) -> Pin<Box<dyn Future<Output = Result<GetVirtualChainFromBlockResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_blocks_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlocksRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlocksResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_block_count_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockCountRequest
) -> Pin<Box<dyn Future<Output = Result<BlockCount, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_block_dag_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockDagInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlockDagInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn resolve_finality_conflict_call<'life0, 'async_trait>(
&'life0 self,
request: ResolveFinalityConflictRequest
) -> Pin<Box<dyn Future<Output = Result<ResolveFinalityConflictResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn shutdown_call<'life0, 'async_trait>(
&'life0 self,
request: ShutdownRequest
) -> Pin<Box<dyn Future<Output = Result<ShutdownResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_headers_call<'life0, 'async_trait>(
&'life0 self,
request: GetHeadersRequest
) -> Pin<Box<dyn Future<Output = Result<GetHeadersResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_balance_by_address_call<'life0, 'async_trait>(
&'life0 self,
request: GetBalanceByAddressRequest
) -> Pin<Box<dyn Future<Output = Result<GetBalanceByAddressResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_balances_by_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetBalancesByAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetBalancesByAddressesResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_utxos_by_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetUtxosByAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetUtxosByAddressesResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_sink_blue_score_call<'life0, 'async_trait>(
&'life0 self,
request: GetSinkBlueScoreRequest
) -> Pin<Box<dyn Future<Output = Result<GetSinkBlueScoreResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn ban_call<'life0, 'async_trait>(
&'life0 self,
request: BanRequest
) -> Pin<Box<dyn Future<Output = Result<BanResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn unban_call<'life0, 'async_trait>(
&'life0 self,
request: UnbanRequest
) -> Pin<Box<dyn Future<Output = Result<UnbanResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn estimate_network_hashes_per_second_call<'life0, 'async_trait>(
&'life0 self,
request: EstimateNetworkHashesPerSecondRequest
) -> Pin<Box<dyn Future<Output = Result<EstimateNetworkHashesPerSecondResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_mempool_entries_by_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetMempoolEntriesByAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetMempoolEntriesByAddressesResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_coin_supply_call<'life0, 'async_trait>(
&'life0 self,
request: GetCoinSupplyRequest
) -> Pin<Box<dyn Future<Output = Result<GetCoinSupplyResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_daa_score_timestamp_estimate_call<'life0, 'async_trait>(
&'life0 self,
request: GetDaaScoreTimestampEstimateRequest
) -> Pin<Box<dyn Future<Output = Result<GetDaaScoreTimestampEstimateResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn register_new_listener(
&self,
connection: ChannelConnection<Notification>
) -> u64;
fn unregister_listener<'life0, 'async_trait>(
&'life0 self,
id: u64
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn start_notify<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn stop_notify<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided methods
fn ping<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_metrics<'life0, 'async_trait>(
&'life0 self,
process_metrics: bool,
connection_metrics: bool,
bandwidth_metrics: bool,
consensus_metrics: bool
) -> Pin<Box<dyn Future<Output = Result<GetMetricsResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_server_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetServerInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_sync_status<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_current_network<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<NetworkType, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn submit_block<'life0, 'async_trait>(
&'life0 self,
block: RpcBlock,
allow_non_daa_blocks: bool
) -> Pin<Box<dyn Future<Output = Result<SubmitBlockResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_block_template<'life0, 'async_trait>(
&'life0 self,
pay_address: Address,
extra_data: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_peer_addresses<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetPeerAddressesResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_sink<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetSinkResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_mempool_entry<'life0, 'async_trait>(
&'life0 self,
transaction_id: Hash,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<RpcMempoolEntry, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_mempool_entries<'life0, 'async_trait>(
&'life0 self,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntry>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_connected_peer_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetConnectedPeerInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn add_peer<'life0, 'async_trait>(
&'life0 self,
peer_address: ContextualNetAddress,
is_permanent: bool
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: RpcTransaction,
allow_orphan: bool
) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_block<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
include_transactions: bool
) -> Pin<Box<dyn Future<Output = Result<RpcBlock, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_subnetwork<'life0, 'async_trait>(
&'life0 self,
subnetwork_id: SubnetworkId
) -> Pin<Box<dyn Future<Output = Result<GetSubnetworkResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_virtual_chain_from_block<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
include_accepted_transaction_ids: bool
) -> Pin<Box<dyn Future<Output = Result<GetVirtualChainFromBlockResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_blocks<'life0, 'async_trait>(
&'life0 self,
low_hash: Option<Hash>,
include_blocks: bool,
include_transactions: bool
) -> Pin<Box<dyn Future<Output = Result<GetBlocksResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_block_count<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BlockCount, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_block_dag_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetBlockDagInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn resolve_finality_conflict<'life0, 'async_trait>(
&'life0 self,
finality_block_hash: Hash
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn shutdown<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_headers<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
limit: u64,
is_ascending: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<Header>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_balance_by_address<'life0, 'async_trait>(
&'life0 self,
address: Address
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_balances_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcBalancesByAddressesEntry>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_utxos_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcUtxosByAddressesEntry>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_sink_blue_score<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn ban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn unban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetInfoResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn estimate_network_hashes_per_second<'life0, 'async_trait>(
&'life0 self,
window_size: u32,
start_hash: Option<Hash>
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_mempool_entries_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntryByAddress>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_coin_supply<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetCoinSupplyResponse, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn get_daa_score_timestamp_estimate<'life0, 'async_trait>(
&'life0 self,
daa_scores: Vec<u64>
) -> Pin<Box<dyn Future<Output = Result<Vec<u64>, RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn execute_subscribe_command<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope,
command: Command
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
}
Expand description
Client RPC Api
The RpcApi
trait defines RPC calls taking a request message as unique parameter.
For each RPC call a matching readily implemented function taking detailed parameters is also provided.
Required Methods§
fn ping_call<'life0, 'async_trait>(
&'life0 self,
request: PingRequest
) -> Pin<Box<dyn Future<Output = Result<PingResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_metrics_call<'life0, 'async_trait>(
&'life0 self,
request: GetMetricsRequest
) -> Pin<Box<dyn Future<Output = Result<GetMetricsResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_server_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetServerInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetServerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sync_status_call<'life0, 'async_trait>(
&'life0 self,
request: GetSyncStatusRequest
) -> Pin<Box<dyn Future<Output = Result<GetSyncStatusResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_current_network_call<'life0, 'async_trait>(
&'life0 self,
request: GetCurrentNetworkRequest
) -> Pin<Box<dyn Future<Output = Result<GetCurrentNetworkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_block_call<'life0, 'async_trait>(
&'life0 self,
request: SubmitBlockRequest
) -> Pin<Box<dyn Future<Output = Result<SubmitBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_template_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockTemplateRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_peer_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetPeerAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetPeerAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sink_call<'life0, 'async_trait>(
&'life0 self,
request: GetSinkRequest
) -> Pin<Box<dyn Future<Output = Result<GetSinkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entry_call<'life0, 'async_trait>(
&'life0 self,
request: GetMempoolEntryRequest
) -> Pin<Box<dyn Future<Output = Result<GetMempoolEntryResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entries_call<'life0, 'async_trait>(
&'life0 self,
request: GetMempoolEntriesRequest
) -> Pin<Box<dyn Future<Output = Result<GetMempoolEntriesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_connected_peer_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetConnectedPeerInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetConnectedPeerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn add_peer_call<'life0, 'async_trait>(
&'life0 self,
request: AddPeerRequest
) -> Pin<Box<dyn Future<Output = Result<AddPeerResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_transaction_call<'life0, 'async_trait>(
&'life0 self,
request: SubmitTransactionRequest
) -> Pin<Box<dyn Future<Output = Result<SubmitTransactionResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_subnetwork_call<'life0, 'async_trait>(
&'life0 self,
request: GetSubnetworkRequest
) -> Pin<Box<dyn Future<Output = Result<GetSubnetworkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_virtual_chain_from_block_call<'life0, 'async_trait>(
&'life0 self,
request: GetVirtualChainFromBlockRequest
) -> Pin<Box<dyn Future<Output = Result<GetVirtualChainFromBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_blocks_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlocksRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlocksResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_count_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockCountRequest
) -> Pin<Box<dyn Future<Output = Result<BlockCount, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_dag_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetBlockDagInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetBlockDagInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn resolve_finality_conflict_call<'life0, 'async_trait>(
&'life0 self,
request: ResolveFinalityConflictRequest
) -> Pin<Box<dyn Future<Output = Result<ResolveFinalityConflictResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn shutdown_call<'life0, 'async_trait>(
&'life0 self,
request: ShutdownRequest
) -> Pin<Box<dyn Future<Output = Result<ShutdownResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_headers_call<'life0, 'async_trait>(
&'life0 self,
request: GetHeadersRequest
) -> Pin<Box<dyn Future<Output = Result<GetHeadersResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_balance_by_address_call<'life0, 'async_trait>(
&'life0 self,
request: GetBalanceByAddressRequest
) -> Pin<Box<dyn Future<Output = Result<GetBalanceByAddressResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_balances_by_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetBalancesByAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetBalancesByAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_utxos_by_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetUtxosByAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetUtxosByAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sink_blue_score_call<'life0, 'async_trait>(
&'life0 self,
request: GetSinkBlueScoreRequest
) -> Pin<Box<dyn Future<Output = Result<GetSinkBlueScoreResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn ban_call<'life0, 'async_trait>(
&'life0 self,
request: BanRequest
) -> Pin<Box<dyn Future<Output = Result<BanResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn unban_call<'life0, 'async_trait>(
&'life0 self,
request: UnbanRequest
) -> Pin<Box<dyn Future<Output = Result<UnbanResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn get_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_info_call<'life0, 'async_trait>(
&'life0 self,
request: GetInfoRequest
) -> Pin<Box<dyn Future<Output = Result<GetInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns info about the node.
fn estimate_network_hashes_per_second_call<'life0, 'async_trait>(
&'life0 self,
request: EstimateNetworkHashesPerSecondRequest
) -> Pin<Box<dyn Future<Output = Result<EstimateNetworkHashesPerSecondResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entries_by_addresses_call<'life0, 'async_trait>(
&'life0 self,
request: GetMempoolEntriesByAddressesRequest
) -> Pin<Box<dyn Future<Output = Result<GetMempoolEntriesByAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_coin_supply_call<'life0, 'async_trait>(
&'life0 self,
request: GetCoinSupplyRequest
) -> Pin<Box<dyn Future<Output = Result<GetCoinSupplyResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_daa_score_timestamp_estimate_call<'life0, 'async_trait>(
&'life0 self,
request: GetDaaScoreTimestampEstimateRequest
) -> Pin<Box<dyn Future<Output = Result<GetDaaScoreTimestampEstimateResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn register_new_listener(
&self,
connection: ChannelConnection<Notification>
) -> u64
fn register_new_listener( &self, connection: ChannelConnection<Notification> ) -> u64
Register a new listener and returns an id identifying it.
sourcefn unregister_listener<'life0, 'async_trait>(
&'life0 self,
id: u64
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn unregister_listener<'life0, 'async_trait>(
&'life0 self,
id: u64
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Unregister an existing listener.
Stop all notifications for this listener, unregister the id and its associated connection.
Provided Methods§
sourcefn ping<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn ping<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_metrics<'life0, 'async_trait>(
&'life0 self,
process_metrics: bool,
connection_metrics: bool,
bandwidth_metrics: bool,
consensus_metrics: bool
) -> Pin<Box<dyn Future<Output = Result<GetMetricsResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_server_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetServerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sync_status<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn get_current_network<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<NetworkType, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_current_network<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<NetworkType, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests the network the node is currently running against.
sourcefn submit_block<'life0, 'async_trait>(
&'life0 self,
block: RpcBlock,
allow_non_daa_blocks: bool
) -> Pin<Box<dyn Future<Output = Result<SubmitBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_block<'life0, 'async_trait>(
&'life0 self,
block: RpcBlock,
allow_non_daa_blocks: bool
) -> Pin<Box<dyn Future<Output = Result<SubmitBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Submit a block into the DAG.
Blocks are generally expected to have been generated using the get_block_template call.
sourcefn get_block_template<'life0, 'async_trait>(
&'life0 self,
pay_address: Address,
extra_data: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_template<'life0, 'async_trait>(
&'life0 self,
pay_address: Address,
extra_data: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<GetBlockTemplateResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Request a current block template.
Callers are expected to solve the block template and submit it using the submit_block call.
sourcefn get_peer_addresses<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetPeerAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_peer_addresses<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetPeerAddressesResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests the list of known kaspad addresses in the current network (mainnet, testnet, etc.)
sourcefn get_sink<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetSinkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sink<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetSinkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
requests the hash of the current virtual’s selected parent.
sourcefn get_mempool_entry<'life0, 'async_trait>(
&'life0 self,
transaction_id: Hash,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<RpcMempoolEntry, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entry<'life0, 'async_trait>(
&'life0 self,
transaction_id: Hash,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<RpcMempoolEntry, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests information about a specific transaction in the mempool.
sourcefn get_mempool_entries<'life0, 'async_trait>(
&'life0 self,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entries<'life0, 'async_trait>(
&'life0 self,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests information about all the transactions currently in the mempool.
sourcefn get_connected_peer_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetConnectedPeerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_connected_peer_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetConnectedPeerInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
requests information about all the p2p peers currently connected to this node.
sourcefn add_peer<'life0, 'async_trait>(
&'life0 self,
peer_address: ContextualNetAddress,
is_permanent: bool
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn add_peer<'life0, 'async_trait>(
&'life0 self,
peer_address: ContextualNetAddress,
is_permanent: bool
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Adds a peer to the node’s outgoing connection list.
This will, in most cases, result in the node connecting to said peer.
sourcefn submit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: RpcTransaction,
allow_orphan: bool
) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn submit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: RpcTransaction,
allow_orphan: bool
) -> Pin<Box<dyn Future<Output = Result<Hash, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Submits a transaction to the mempool.
sourcefn get_block<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
include_transactions: bool
) -> Pin<Box<dyn Future<Output = Result<RpcBlock, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block<'life0, 'async_trait>(
&'life0 self,
hash: Hash,
include_transactions: bool
) -> Pin<Box<dyn Future<Output = Result<RpcBlock, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests information about a specific block.
sourcefn get_subnetwork<'life0, 'async_trait>(
&'life0 self,
subnetwork_id: SubnetworkId
) -> Pin<Box<dyn Future<Output = Result<GetSubnetworkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_subnetwork<'life0, 'async_trait>(
&'life0 self,
subnetwork_id: SubnetworkId
) -> Pin<Box<dyn Future<Output = Result<GetSubnetworkResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests information about a specific subnetwork.
sourcefn get_virtual_chain_from_block<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
include_accepted_transaction_ids: bool
) -> Pin<Box<dyn Future<Output = Result<GetVirtualChainFromBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_virtual_chain_from_block<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
include_accepted_transaction_ids: bool
) -> Pin<Box<dyn Future<Output = Result<GetVirtualChainFromBlockResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests the virtual selected parent chain from some start_hash
to this node’s current virtual.
sourcefn get_blocks<'life0, 'async_trait>(
&'life0 self,
low_hash: Option<Hash>,
include_blocks: bool,
include_transactions: bool
) -> Pin<Box<dyn Future<Output = Result<GetBlocksResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_blocks<'life0, 'async_trait>(
&'life0 self,
low_hash: Option<Hash>,
include_blocks: bool,
include_transactions: bool
) -> Pin<Box<dyn Future<Output = Result<GetBlocksResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests blocks between a certain block low_hash
up to this node’s current virtual.
sourcefn get_block_count<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BlockCount, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_count<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BlockCount, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests the current number of blocks in this node.
Note that this number may decrease as pruning occurs.
sourcefn get_block_dag_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetBlockDagInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_dag_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetBlockDagInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests general information about the current state of this node’s DAG.
sourcefn resolve_finality_conflict<'life0, 'async_trait>(
&'life0 self,
finality_block_hash: Hash
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn resolve_finality_conflict<'life0, 'async_trait>(
&'life0 self,
finality_block_hash: Hash
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn shutdown<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Shuts down this node.
sourcefn get_headers<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
limit: u64,
is_ascending: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<Header>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_headers<'life0, 'async_trait>(
&'life0 self,
start_hash: Hash,
limit: u64,
is_ascending: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<Header>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests headers between the given start_hash
and the current virtual, up to the given limit.
sourcefn get_balance_by_address<'life0, 'async_trait>(
&'life0 self,
address: Address
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_balance_by_address<'life0, 'async_trait>(
&'life0 self,
address: Address
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the total balance in unspent transactions towards a given address.
This call is only available when this node was started with --utxoindex
.
sourcefn get_balances_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcBalancesByAddressesEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_balances_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcBalancesByAddressesEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn get_utxos_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcUtxosByAddressesEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_utxos_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcUtxosByAddressesEntry>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests all current UTXOs for the given node addresses.
This call is only available when this node was started with --utxoindex
.
sourcefn get_sink_blue_score<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_sink_blue_score<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Requests the blue score of the current selected parent of the virtual block.
sourcefn ban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn ban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Bans the given ip.
sourcefn unban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn unban<'life0, 'async_trait>(
&'life0 self,
ip: IpAddress
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Unbans the given ip.
fn get_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetInfoResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn estimate_network_hashes_per_second<'life0, 'async_trait>(
&'life0 self,
window_size: u32,
start_hash: Option<Hash>
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn estimate_network_hashes_per_second<'life0, 'async_trait>(
&'life0 self,
window_size: u32,
start_hash: Option<Hash>
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn get_mempool_entries_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntryByAddress>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mempool_entries_by_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>,
include_orphan_pool: bool,
filter_transaction_pool: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMempoolEntryByAddress>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn get_coin_supply<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetCoinSupplyResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_coin_supply<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GetCoinSupplyResponse, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_daa_score_timestamp_estimate<'life0, 'async_trait>(
&'life0 self,
daa_scores: Vec<u64>
) -> Pin<Box<dyn Future<Output = Result<Vec<u64>, RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
sourcefn execute_subscribe_command<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope,
command: Command
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_subscribe_command<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope,
command: Command
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Execute a subscription command leading to either start or stop sending notifications of some type to a listener.
Implementations§
source§impl dyn RpcApi
impl dyn RpcApi
pub fn is<_T>(&self) -> boolwhere
_T: Any,
dyn RpcApi: Downcast<_T>,
pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch>where
_T: Any,
dyn RpcApi: Downcast<_T>,
pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch>where
_T: Any,
dyn RpcApi: Downcast<_T>,
pub fn downcast<_T>(
self: Box<dyn RpcApi>
) -> Result<Box<_T>, DowncastError<Box<dyn RpcApi>>>where
_T: Any,
dyn RpcApi: Downcast<_T>,
pub fn downcast_rc<_T>(
self: Rc<dyn RpcApi>
) -> Result<Rc<_T>, DowncastError<Rc<dyn RpcApi>>>where
_T: Any,
dyn RpcApi: Downcast<_T>,
pub fn downcast_arc<_T>(
self: Arc<dyn RpcApi>
) -> Result<Arc<_T>, DowncastError<Arc<dyn RpcApi>>>where
_T: AnySync,
dyn RpcApi: DowncastSync<_T>,
Trait Implementations§
Implementations on Foreign Types§
source§impl RpcApi for KaspaRpcClient
impl RpcApi for KaspaRpcClient
source§fn register_new_listener(
&self,
connection: ChannelConnection<Notification>
) -> u64
fn register_new_listener( &self, connection: ChannelConnection<Notification> ) -> u64
Register a new listener and returns an id and a channel receiver.
source§fn unregister_listener<'life0, 'async_trait>(
&'life0 self,
id: u64
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
KaspaRpcClient: 'async_trait,
fn unregister_listener<'life0, 'async_trait>(
&'life0 self,
id: u64
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
KaspaRpcClient: 'async_trait,
Unregister an existing listener.
Stop all notifications for this listener and drop its channel.
source§fn start_notify<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
KaspaRpcClient: 'async_trait,
fn start_notify<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
KaspaRpcClient: 'async_trait,
Start sending notifications of some type to a listener.
source§fn stop_notify<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
KaspaRpcClient: 'async_trait,
fn stop_notify<'life0, 'async_trait>(
&'life0 self,
id: u64,
scope: Scope
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
'life0: 'async_trait,
KaspaRpcClient: 'async_trait,
Stop sending notifications of some type to a listener.