pub struct NativeClient<C> { /* private fields */ }Expand description
A native adapter around a caller-owned JSON-RPC transport. Calls submit exactly once. Unknown result variants retain their complete raw result.
Implementations§
Source§impl<C> NativeClient<C>
impl<C> NativeClient<C>
Sourcepub fn new(inner: C) -> NativeClient<C>
pub fn new(inner: C) -> NativeClient<C>
Wrap an existing transport without connecting or changing its settings.
Sourcepub fn into_inner(self) -> C
pub fn into_inner(self) -> C
Recover the caller’s transport.
Source§impl<C> NativeClient<C>
impl<C> NativeClient<C>
Sourcepub async fn get_version_info(
&self,
request: EmptyRequest,
) -> Result<DecodedResponse<VersionInfo>, NativeClientError>
pub async fn get_version_info( &self, request: EmptyRequest, ) -> Result<DecodedResponse<VersionInfo>, NativeClientError>
Describe compatibility and configured methods.
Accepts omitted params, {}, [], or null; clients send {}.
Sourcepub async fn get_network_info(
&self,
request: EmptyRequest,
) -> Result<DecodedResponse<NetworkInfo>, NativeClientError>
pub async fn get_network_info( &self, request: EmptyRequest, ) -> Result<DecodedResponse<NetworkInfo>, NativeClientError>
Read the signing network identity.
Accepts omitted params, {}, [], or null; clients send {}.
Sourcepub async fn get_chain_tip(
&self,
request: EmptyRequest,
) -> Result<DecodedResponse<ChainTip>, NativeClientError>
pub async fn get_chain_tip( &self, request: EmptyRequest, ) -> Result<DecodedResponse<ChainTip>, NativeClientError>
Read the committed chain tip.
Accepts omitted params, {}, [], or null; clients send {}.
Sourcepub async fn get_chain_config(
&self,
request: EmptyRequest,
) -> Result<DecodedResponse<ChainConfig>, NativeClientError>
pub async fn get_chain_config( &self, request: EmptyRequest, ) -> Result<DecodedResponse<ChainConfig>, NativeClientError>
Read the chain configuration and observation height.
Accepts omitted params, {}, [], or null; clients send {}.
Sourcepub async fn get_server_limits(
&self,
request: EmptyRequest,
) -> Result<DecodedResponse<ServerLimits>, NativeClientError>
pub async fn get_server_limits( &self, request: EmptyRequest, ) -> Result<DecodedResponse<ServerLimits>, NativeClientError>
Read configured request limits.
Accepts omitted params, {}, [], or null; clients send {}.
Sourcepub async fn send_transaction(
&self,
request: SendTransactionRequest,
) -> Result<DecodedResponse<SendTransactionResult>, NativeClientError>
pub async fn send_transaction( &self, request: SendTransactionRequest, ) -> Result<DecodedResponse<SendTransactionResult>, NativeClientError>
Submit a signed envelope for authoritative admission.
Sourcepub async fn get_transaction_status(
&self,
request: TransactionQuery,
) -> Result<DecodedResponse<TransactionStatus>, NativeClientError>
pub async fn get_transaction_status( &self, request: TransactionQuery, ) -> Result<DecodedResponse<TransactionStatus>, NativeClientError>
Read retained transaction observations.
Sourcepub async fn get_transaction_receipt(
&self,
request: TransactionQuery,
) -> Result<DecodedResponse<Option<TransactionReceipt>>, NativeClientError>
pub async fn get_transaction_receipt( &self, request: TransactionQuery, ) -> Result<DecodedResponse<Option<TransactionReceipt>>, NativeClientError>
Read indexed execution, or null when no receipt is available.
Sourcepub async fn simulate_invocation(
&self,
request: SimulateInvocationRequest,
) -> Result<DecodedResponse<SimulationResult>, NativeClientError>
pub async fn simulate_invocation( &self, request: SimulateInvocationRequest, ) -> Result<DecodedResponse<SimulationResult>, NativeClientError>
Simulate an invocation without committing state.
Sourcepub async fn simulate_invocations(
&self,
request: SimulateInvocationsRequest,
) -> Result<DecodedResponse<SimulationResults>, NativeClientError>
pub async fn simulate_invocations( &self, request: SimulateInvocationsRequest, ) -> Result<DecodedResponse<SimulationResults>, NativeClientError>
Simulate a batch against one state snapshot.
Sourcepub async fn get_storage(
&self,
request: StorageQuery,
) -> Result<DecodedResponse<StorageResult>, NativeClientError>
pub async fn get_storage( &self, request: StorageQuery, ) -> Result<DecodedResponse<StorageResult>, NativeClientError>
Read serialized storage at an address.
Sourcepub async fn get_balance(
&self,
request: AddressQuery,
) -> Result<DecodedResponse<BalanceResult>, NativeClientError>
pub async fn get_balance( &self, request: AddressQuery, ) -> Result<DecodedResponse<BalanceResult>, NativeClientError>
Read native token balance and its state height.
Sourcepub async fn get_registered_auth(
&self,
request: AddressQuery,
) -> Result<DecodedResponse<RegisteredAuthResult>, NativeClientError>
pub async fn get_registered_auth( &self, request: AddressQuery, ) -> Result<DecodedResponse<RegisteredAuthResult>, NativeClientError>
Read registered authorization at an address.
Sourcepub async fn get_events(
&self,
request: EventQuery,
) -> Result<DecodedResponse<EventPage>, NativeClientError>
pub async fn get_events( &self, request: EventQuery, ) -> Result<DecodedResponse<EventPage>, NativeClientError>
Scan indexed events matching the supplied filters.
Sourcepub async fn get_transactions_by_root_address(
&self,
request: RootAddressQuery,
) -> Result<DecodedResponse<TransactionRefPage>, NativeClientError>
pub async fn get_transactions_by_root_address( &self, request: RootAddressQuery, ) -> Result<DecodedResponse<TransactionRefPage>, NativeClientError>
Read transactions whose root invocation targets the address, excluding internal calls and incoming transfers.
Sourcepub async fn get_block_by_height(
&self,
request: BlockQuery,
) -> Result<DecodedResponse<Option<BlockInfo>>, NativeClientError>
pub async fn get_block_by_height( &self, request: BlockQuery, ) -> Result<DecodedResponse<Option<BlockInfo>>, NativeClientError>
Read committed block metadata, or null when unavailable.
Sourcepub async fn get_transactions_by_block(
&self,
request: BlockPageRequest,
) -> Result<DecodedResponse<TransactionRefPage>, NativeClientError>
pub async fn get_transactions_by_block( &self, request: BlockPageRequest, ) -> Result<DecodedResponse<TransactionRefPage>, NativeClientError>
Read a page of transactions in a committed block.
Sourcepub async fn request_airdrop(
&self,
request: AirdropRequest,
) -> Result<DecodedResponse<AirdropAttempt>, NativeClientError>
pub async fn request_airdrop( &self, request: AirdropRequest, ) -> Result<DecodedResponse<AirdropAttempt>, NativeClientError>
Request one faucet funding attempt. Receipt polling is a separate operation.
Sourcepub async fn fund_account(
&self,
request: FundAccountRequest,
) -> Result<DecodedResponse<FundingSubmission>, NativeClientError>
pub async fn fund_account( &self, request: FundAccountRequest, ) -> Result<DecodedResponse<FundingSubmission>, NativeClientError>
Submit a local funding transfer.
Sourcepub async fn get_pending_transaction_count(
&self,
request: EmptyRequest,
) -> Result<DecodedResponse<PendingTransactionCount>, NativeClientError>
pub async fn get_pending_transaction_count( &self, request: EmptyRequest, ) -> Result<DecodedResponse<PendingTransactionCount>, NativeClientError>
Read the local scheduler pending count.
Accepts omitted params, {}, [], or null; clients send {}.
Trait Implementations§
Source§impl<C> Clone for NativeClient<C>where
C: Clone,
impl<C> Clone for NativeClient<C>where
C: Clone,
Source§fn clone(&self) -> NativeClient<C>
fn clone(&self) -> NativeClient<C>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more