pub struct QueriesClient<T> { /* private fields */ }Implementations§
Source§impl QueriesClient<Channel>
impl QueriesClient<Channel>
Source§impl<T> QueriesClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> QueriesClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> QueriesClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn get_blocks(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Streaming<ArrivedBlockInfo>>, Status>
pub async fn get_blocks( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Streaming<ArrivedBlockInfo>>, Status>
Return a stream of blocks that arrive from the time the query is made onward. This can be used to listen for incoming blocks.
Sourcepub async fn get_finalized_blocks(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Streaming<FinalizedBlockInfo>>, Status>
pub async fn get_finalized_blocks( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Streaming<FinalizedBlockInfo>>, Status>
Return a stream of blocks that are finalized from the time the query is made onward. This can be used to listen for newly finalized blocks. Note that there is no guarantee that blocks will not be skipped if the client is too slow in processing the stream, however blocks will always be sent by increasing block height.
Sourcepub async fn get_account_info(
&mut self,
request: impl IntoRequest<AccountInfoRequest>,
) -> Result<Response<AccountInfo>, Status>
pub async fn get_account_info( &mut self, request: impl IntoRequest<AccountInfoRequest>, ) -> Result<Response<AccountInfo>, Status>
Retrieve the information about the given account in the given block.
Sourcepub async fn get_token_info(
&mut self,
request: impl IntoRequest<TokenInfoRequest>,
) -> Result<Response<TokenInfo>, Status>
pub async fn get_token_info( &mut self, request: impl IntoRequest<TokenInfoRequest>, ) -> Result<Response<TokenInfo>, Status>
Retrieve the information about the given token in the given block.
Sourcepub async fn get_account_list(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<AccountAddress>>, Status>
pub async fn get_account_list( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<AccountAddress>>, Status>
Retrieve the list of accounts that exist at the end of the given block.
Sourcepub async fn get_token_list(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<TokenId>>, Status>
pub async fn get_token_list( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<TokenId>>, Status>
Retrieve the list of protocol level tokens that exist at the end of the given block.
Sourcepub async fn get_module_list(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<ModuleRef>>, Status>
pub async fn get_module_list( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<ModuleRef>>, Status>
Get a list of all smart contract modules. The stream will end when all modules that exist in the state at the end of the given block have been returned.
Sourcepub async fn get_ancestors(
&mut self,
request: impl IntoRequest<AncestorsRequest>,
) -> Result<Response<Streaming<BlockHash>>, Status>
pub async fn get_ancestors( &mut self, request: impl IntoRequest<AncestorsRequest>, ) -> Result<Response<Streaming<BlockHash>>, Status>
Get a stream of ancestors for the provided block. Starting with the provided block itself, moving backwards until no more ancestors or the requested number of ancestors has been returned.
Sourcepub async fn get_module_source(
&mut self,
request: impl IntoRequest<ModuleSourceRequest>,
) -> Result<Response<VersionedModuleSource>, Status>
pub async fn get_module_source( &mut self, request: impl IntoRequest<ModuleSourceRequest>, ) -> Result<Response<VersionedModuleSource>, Status>
Get the source of a smart contract module.
Sourcepub async fn get_instance_list(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<ContractAddress>>, Status>
pub async fn get_instance_list( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<ContractAddress>>, Status>
Get a list of addresses for all smart contract instances. The stream will end when all instances that exist in the state at the end of the given block has been returned.
Sourcepub async fn get_instance_info(
&mut self,
request: impl IntoRequest<InstanceInfoRequest>,
) -> Result<Response<InstanceInfo>, Status>
pub async fn get_instance_info( &mut self, request: impl IntoRequest<InstanceInfoRequest>, ) -> Result<Response<InstanceInfo>, Status>
Get info about a smart contract instance as it appears at the end of the given block.
Sourcepub async fn get_instance_state(
&mut self,
request: impl IntoRequest<InstanceInfoRequest>,
) -> Result<Response<Streaming<InstanceStateKvPair>>, Status>
pub async fn get_instance_state( &mut self, request: impl IntoRequest<InstanceInfoRequest>, ) -> Result<Response<Streaming<InstanceStateKvPair>>, Status>
Get the exact state of a specific contract instance, streamed as a list of key-value pairs. The list is streamed in lexicographic order of keys.
Sourcepub async fn instance_state_lookup(
&mut self,
request: impl IntoRequest<InstanceStateLookupRequest>,
) -> Result<Response<InstanceStateValueAtKey>, Status>
pub async fn instance_state_lookup( &mut self, request: impl IntoRequest<InstanceStateLookupRequest>, ) -> Result<Response<InstanceStateValueAtKey>, Status>
Get the value at a specific key of a contract state. In contrast to
GetInstanceState this is more efficient, but requires the user to know
the specific key to look for.
Sourcepub async fn get_next_account_sequence_number(
&mut self,
request: impl IntoRequest<AccountAddress>,
) -> Result<Response<NextAccountSequenceNumber>, Status>
pub async fn get_next_account_sequence_number( &mut self, request: impl IntoRequest<AccountAddress>, ) -> Result<Response<NextAccountSequenceNumber>, Status>
Get the best guess as to what the next account sequence number should be. If all account transactions are finalized then this information is reliable. Otherwise this is the best guess, assuming all other transactions will be committed to blocks and eventually finalized.
Sourcepub async fn get_consensus_info(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<ConsensusInfo>, Status>
pub async fn get_consensus_info( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<ConsensusInfo>, Status>
Get information about the current state of consensus.
Sourcepub async fn get_block_item_status(
&mut self,
request: impl IntoRequest<TransactionHash>,
) -> Result<Response<BlockItemStatus>, Status>
pub async fn get_block_item_status( &mut self, request: impl IntoRequest<TransactionHash>, ) -> Result<Response<BlockItemStatus>, Status>
Get the status of and information about a specific block item (transaction).
Sourcepub async fn get_cryptographic_parameters(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<CryptographicParameters>, Status>
pub async fn get_cryptographic_parameters( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<CryptographicParameters>, Status>
Get the cryptographic parameters in a given block.
Sourcepub async fn get_block_info(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<BlockInfo>, Status>
pub async fn get_block_info( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<BlockInfo>, Status>
Get information, such as height, timings, and transaction counts for the given block.
Sourcepub async fn get_baker_list(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<BakerId>>, Status>
pub async fn get_baker_list( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<BakerId>>, Status>
Get all the bakers at the end of the given block.
Sourcepub async fn get_pool_info(
&mut self,
request: impl IntoRequest<PoolInfoRequest>,
) -> Result<Response<PoolInfoResponse>, Status>
pub async fn get_pool_info( &mut self, request: impl IntoRequest<PoolInfoRequest>, ) -> Result<Response<PoolInfoResponse>, Status>
Get information about a given pool at the end of a given block.
Sourcepub async fn get_passive_delegation_info(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<PassiveDelegationInfo>, Status>
pub async fn get_passive_delegation_info( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<PassiveDelegationInfo>, Status>
Get information about the passive delegators at the end of a given block.
Sourcepub async fn get_blocks_at_height(
&mut self,
request: impl IntoRequest<BlocksAtHeightRequest>,
) -> Result<Response<BlocksAtHeightResponse>, Status>
pub async fn get_blocks_at_height( &mut self, request: impl IntoRequest<BlocksAtHeightRequest>, ) -> Result<Response<BlocksAtHeightResponse>, Status>
Get a list of live blocks at a given height.
Sourcepub async fn get_tokenomics_info(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<TokenomicsInfo>, Status>
pub async fn get_tokenomics_info( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<TokenomicsInfo>, Status>
Get information about tokenomics at the end of a given block.
Sourcepub async fn invoke_instance(
&mut self,
request: impl IntoRequest<InvokeInstanceRequest>,
) -> Result<Response<InvokeInstanceResponse>, Status>
pub async fn invoke_instance( &mut self, request: impl IntoRequest<InvokeInstanceRequest>, ) -> Result<Response<InvokeInstanceResponse>, Status>
Run the smart contract entrypoint in a given context and in the state at the end of the given block.
Sourcepub async fn get_pool_delegators(
&mut self,
request: impl IntoRequest<GetPoolDelegatorsRequest>,
) -> Result<Response<Streaming<DelegatorInfo>>, Status>
pub async fn get_pool_delegators( &mut self, request: impl IntoRequest<GetPoolDelegatorsRequest>, ) -> Result<Response<Streaming<DelegatorInfo>>, Status>
Get the registered delegators of a given pool at the end of a given block.
In contrast to the GetPoolDelegatorsRewardPeriod which returns delegators
that are fixed for the reward period of the block, this endpoint returns the
list of delegators that are registered in the block. Any changes to delegators
are immediately visible in this list.
The stream will end when all the delegators has been returned.
Sourcepub async fn get_pool_delegators_reward_period(
&mut self,
request: impl IntoRequest<GetPoolDelegatorsRequest>,
) -> Result<Response<Streaming<DelegatorRewardPeriodInfo>>, Status>
pub async fn get_pool_delegators_reward_period( &mut self, request: impl IntoRequest<GetPoolDelegatorsRequest>, ) -> Result<Response<Streaming<DelegatorRewardPeriodInfo>>, Status>
Get the fixed delegators of a given pool for the reward period of the given block.
In contracts to the GetPoolDelegators which returns delegators registered
for the given block, this endpoint returns the fixed delegators contributing
stake in the reward period containing the given block.
The stream will end when all the delegators has been returned.
Sourcepub async fn get_passive_delegators(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<DelegatorInfo>>, Status>
pub async fn get_passive_delegators( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<DelegatorInfo>>, Status>
Get the registered passive delegators at the end of a given block.
In contrast to the GetPassiveDelegatorsRewardPeriod which returns delegators
that are fixed for the reward period of the block, this endpoint returns the
list of delegators that are registered in the block. Any changes to delegators
are immediately visible in this list.
The stream will end when all the delegators has been returned.
Sourcepub async fn get_passive_delegators_reward_period(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<DelegatorRewardPeriodInfo>>, Status>
pub async fn get_passive_delegators_reward_period( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<DelegatorRewardPeriodInfo>>, Status>
Get the fixed passive delegators for the reward period of the given block.
In contracts to the GetPassiveDelegators which returns delegators registered
for the given block, this endpoint returns the fixed delegators contributing
stake in the reward period containing the given block.
The stream will end when all the delegators has been returned.
Sourcepub async fn get_branches(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Branch>, Status>
pub async fn get_branches( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Branch>, Status>
Get the current branches of blocks starting from and including the last finalized block.
Sourcepub async fn get_election_info(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<ElectionInfo>, Status>
pub async fn get_election_info( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<ElectionInfo>, Status>
Get information related to the baker election for a particular block.
Sourcepub async fn get_identity_providers(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<IpInfo>>, Status>
pub async fn get_identity_providers( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<IpInfo>>, Status>
Get the identity providers registered as of the end of a given block. The stream will end when all the identity providers have been returned.
Sourcepub async fn get_anonymity_revokers(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<ArInfo>>, Status>
pub async fn get_anonymity_revokers( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<ArInfo>>, Status>
Get the anonymity revokers registered as of the end of a given block. The stream will end when all the anonymity revokers have been returned.
Sourcepub async fn get_account_non_finalized_transactions(
&mut self,
request: impl IntoRequest<AccountAddress>,
) -> Result<Response<Streaming<TransactionHash>>, Status>
pub async fn get_account_non_finalized_transactions( &mut self, request: impl IntoRequest<AccountAddress>, ) -> Result<Response<Streaming<TransactionHash>>, Status>
Get a list of non-finalized transaction hashes for a given account. This endpoint is not expected to return a large amount of data in most cases, but in bad network condtions it might. The stream will end when all the non-finalized transaction hashes have been returned.
Sourcepub async fn get_block_transaction_events(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<BlockItemSummary>>, Status>
pub async fn get_block_transaction_events( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<BlockItemSummary>>, Status>
Get a list of transaction events in a given block. The stream will end when all the transaction events for a given block have been returned.
Sourcepub async fn get_block_special_events(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<BlockSpecialEvent>>, Status>
pub async fn get_block_special_events( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<BlockSpecialEvent>>, Status>
Get a list of special events in a given block. These are events generated by the protocol, such as minting and reward payouts. They are not directly generated by any transaction. The stream will end when all the special events for a given block have been returned.
Sourcepub async fn get_block_pending_updates(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<PendingUpdate>>, Status>
pub async fn get_block_pending_updates( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<PendingUpdate>>, Status>
Get the pending updates to chain parameters at the end of a given block. The stream will end when all the pending updates for a given block have been returned.
Sourcepub async fn get_next_update_sequence_numbers(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<NextUpdateSequenceNumbers>, Status>
pub async fn get_next_update_sequence_numbers( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<NextUpdateSequenceNumbers>, Status>
Get next available sequence numbers for updating chain parameters after a given block.
Sourcepub async fn get_scheduled_release_accounts(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<AccountPending>>, Status>
pub async fn get_scheduled_release_accounts( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<AccountPending>>, Status>
Get all accounts that have scheduled releases, with the timestamp of the first pending scheduled release for that account. (Note, this only identifies accounts by index, and only indicates the first pending release for each account.)
Sourcepub async fn get_cooldown_accounts(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<AccountPending>>, Status>
pub async fn get_cooldown_accounts( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<AccountPending>>, Status>
Get all accounts that have stake in cooldown, with the timestamp of the first pending cooldown expiry for each account. (Note, this only identifies accounts by index, and only indicates the first pending cooldown for each account.) Prior to protocol version 7, the resulting stream will always be empty.
Sourcepub async fn get_pre_cooldown_accounts(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<AccountIndex>>, Status>
pub async fn get_pre_cooldown_accounts( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<AccountIndex>>, Status>
Get all accounts that have stake in pre-cooldown. (This only identifies accounts by index.) Prior to protocol version 7, the resulting stream will always be empty.
Sourcepub async fn get_pre_pre_cooldown_accounts(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<AccountIndex>>, Status>
pub async fn get_pre_pre_cooldown_accounts( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<AccountIndex>>, Status>
Get all accounts that have stake in pre-pre-cooldown. (This only identifies accounts by index.) Prior to protocol version 7, the resulting stream will always be empty.
Sourcepub async fn get_baker_earliest_win_time(
&mut self,
request: impl IntoRequest<BakerId>,
) -> Result<Response<Timestamp>, Status>
pub async fn get_baker_earliest_win_time( &mut self, request: impl IntoRequest<BakerId>, ) -> Result<Response<Timestamp>, Status>
Get the projected earliest time at which a particular baker will be required to bake a block. If the current consensus version is 0, this returns the status ‘Unavailable’, as the endpoint is only supported by consensus version 1.
If the baker is not a baker for the current reward period, this returns a timestamp at the start of the next reward period. If the baker is a baker for the current reward period, the earliest win time is projected from the current round forward, assuming that each round after the last finalized round will take the minimum block time. (If blocks take longer, or timeouts occur, the actual time may be later, and the reported time in subsequent queries may reflect this.) At the end of an epoch (or if the baker is not projected to bake before the end of the epoch) the earliest win time for a (current) baker will be projected as the start of the next epoch. This is because the seed for the leader election is updated at the epoch boundary, and so the winners cannot be predicted beyond that. Note that in some circumstances the returned timestamp can be in the past, especially at the end of an epoch.
Sourcepub async fn shutdown(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Empty>, Status>
pub async fn shutdown( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Empty>, Status>
Shut down the node. Return a GRPC error if the shutdown failed.
Sourcepub async fn peer_connect(
&mut self,
request: impl IntoRequest<IpSocketAddress>,
) -> Result<Response<Empty>, Status>
pub async fn peer_connect( &mut self, request: impl IntoRequest<IpSocketAddress>, ) -> Result<Response<Empty>, Status>
Suggest to a peer to connect to the submitted peer details. This, if successful, adds the peer to the list of given addresses. Otherwise return a GRPC error. Note. The peer might not be connected to instantly, in that case the node will try to establish the connection in near future. This function returns a GRPC status ‘Ok’ in this case.
Sourcepub async fn peer_disconnect(
&mut self,
request: impl IntoRequest<IpSocketAddress>,
) -> Result<Response<Empty>, Status>
pub async fn peer_disconnect( &mut self, request: impl IntoRequest<IpSocketAddress>, ) -> Result<Response<Empty>, Status>
Disconnect from the peer and remove them from the given addresses list if they are on it. Return if the request was processed successfully. Otherwise return a GRPC error.
Sourcepub async fn get_banned_peers(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<BannedPeers>, Status>
pub async fn get_banned_peers( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<BannedPeers>, Status>
Get a list of banned peers.
Sourcepub async fn ban_peer(
&mut self,
request: impl IntoRequest<PeerToBan>,
) -> Result<Response<Empty>, Status>
pub async fn ban_peer( &mut self, request: impl IntoRequest<PeerToBan>, ) -> Result<Response<Empty>, Status>
Ban the given peer. Returns a GRPC error if the action failed.
Sourcepub async fn unban_peer(
&mut self,
request: impl IntoRequest<BannedPeer>,
) -> Result<Response<Empty>, Status>
pub async fn unban_peer( &mut self, request: impl IntoRequest<BannedPeer>, ) -> Result<Response<Empty>, Status>
Unban the banned peer. Returns a GRPC error if the action failed.
Sourcepub async fn dump_start(
&mut self,
request: impl IntoRequest<DumpRequest>,
) -> Result<Response<Empty>, Status>
pub async fn dump_start( &mut self, request: impl IntoRequest<DumpRequest>, ) -> Result<Response<Empty>, Status>
Start dumping packages into the specified file.
Only enabled if the node was built with the network_dump feature.
Returns a GRPC error if the network dump failed to start.
Sourcepub async fn dump_stop(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Empty>, Status>
pub async fn dump_stop( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Empty>, Status>
Stop dumping packages.
Only enabled if the node was built with the network_dump feature.
Returns a GRPC error if the network dump failed to be stopped.
Sourcepub async fn get_peers_info(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<PeersInfo>, Status>
pub async fn get_peers_info( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<PeersInfo>, Status>
Get a list of the peers that the node is connected to and assoicated network related information for each peer.
Sourcepub async fn get_node_info(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<NodeInfo>, Status>
pub async fn get_node_info( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<NodeInfo>, Status>
Get information about the node.
The NodeInfo includes information of
- Meta information such as the, version of the node, type of the node, uptime and the local time of the node.
- NetworkInfo which yields data such as the node id, packets sent/received, average bytes per second sent/received.
- ConsensusInfo. The
ConsensusInforeturned depends on if the node supports the protocol on chain and whether the node is configured as a baker or not.
Sourcepub async fn send_block_item(
&mut self,
request: impl IntoRequest<SendBlockItemRequest>,
) -> Result<Response<TransactionHash>, Status>
pub async fn send_block_item( &mut self, request: impl IntoRequest<SendBlockItemRequest>, ) -> Result<Response<TransactionHash>, Status>
Send a block item. A block item is either an AccountTransaction, which is
a transaction signed and paid for by an account, a CredentialDeployment,
which creates a new account, or UpdateInstruction, which is an
instruction to change some parameters of the chain. Update instructions can
only be sent by the governance committee.
Returns a hash of the block item, which can be used with
GetBlockItemStatus.
Sourcepub async fn get_account_transaction_sign_hash(
&mut self,
request: impl IntoRequest<PreAccountTransaction>,
) -> Result<Response<AccountTransactionSignHash>, Status>
pub async fn get_account_transaction_sign_hash( &mut self, request: impl IntoRequest<PreAccountTransaction>, ) -> Result<Response<AccountTransactionSignHash>, Status>
Get the hash to be signed for an account transaction. The hash returned
should be signed and the signatures included as an
AccountTransactionSignature when calling SendBlockItem. This is provided as
a convenience to support cases where the right SDK is not available for
interacting with the node. If an SDK is available then it is strongly
recommended to compute this hash off-line using it. That reduces the trust
in the node, removes networking failure modes, and will perform better.
Sourcepub async fn get_block_chain_parameters(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<ChainParameters>, Status>
pub async fn get_block_chain_parameters( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<ChainParameters>, Status>
Get the values of chain parameters in effect in the given block.
Sourcepub async fn get_block_finalization_summary(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<BlockFinalizationSummary>, Status>
pub async fn get_block_finalization_summary( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<BlockFinalizationSummary>, Status>
Get the summary of the finalization data in a given block.
Sourcepub async fn get_block_items(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<BlockItem>>, Status>
pub async fn get_block_items( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<BlockItem>>, Status>
Get the items of a block.
Sourcepub async fn get_bakers_reward_period(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<Streaming<BakerRewardPeriodInfo>>, Status>
pub async fn get_bakers_reward_period( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<Streaming<BakerRewardPeriodInfo>>, Status>
Get all bakers in the reward period of a block. This endpoint is only supported for protocol version 6 and onwards. If the protocol does not support the endpoint then an ‘IllegalArgument’ error is returned.
Sourcepub async fn get_block_certificates(
&mut self,
request: impl IntoRequest<BlockHashInput>,
) -> Result<Response<BlockCertificates>, Status>
pub async fn get_block_certificates( &mut self, request: impl IntoRequest<BlockHashInput>, ) -> Result<Response<BlockCertificates>, Status>
For a non-genesis block, this returns the quorum certificate, a timeout certificate (if present) and epoch finalization entry (if present). Note that, if the block being pointed to is not a product of ConcordiumBFT, then the response will be a grpc error (invalid argument). If the endpoint is not enabled by the node, then an ‘unimplemented’ error will be returned.
Sourcepub async fn get_winning_bakers_epoch(
&mut self,
request: impl IntoRequest<EpochRequest>,
) -> Result<Response<Streaming<WinningBaker>>, Status>
pub async fn get_winning_bakers_epoch( &mut self, request: impl IntoRequest<EpochRequest>, ) -> Result<Response<Streaming<WinningBaker>>, Status>
Get the list of bakers that won the lottery in a particular historical epoch (i.e. the last finalized block is in a later epoch). This lists the winners for each round in the epoch, starting from the round after the last block in the previous epoch, running to the round before the first block in the next epoch. It also indicates if a block in each round was included in the finalized chain.
The following error cases are possible:
NOT_FOUNDif the query specifies an unknown block.UNAVAILABLEif the query is for an epoch that is not finalized in the current genesis index, or is for a future genesis index.INVALID_ARGUMENTif the query is for an epoch that is not finalized for a past genesis index.INVALID_ARGUMENTif the query is for a genesis index at consensus version 0.INVALID_ARGUMENTif the inputEpochRequestis malformed.UNIMPLEMENTEDif the endpoint is disabled on the node.
Sourcepub async fn get_first_block_epoch(
&mut self,
request: impl IntoRequest<EpochRequest>,
) -> Result<Response<BlockHash>, Status>
pub async fn get_first_block_epoch( &mut self, request: impl IntoRequest<EpochRequest>, ) -> Result<Response<BlockHash>, Status>
Get the block hash of the first finalized block in a specified epoch.
The following error cases are possible:
NOT_FOUNDif the query specifies an unknown block.UNAVAILABLEif the query is for an epoch that is not finalized in the current genesis index, or is for a future genesis index.INVALID_ARGUMENTif the query is for an epoch with no finalized blocks for a past genesis index.INVALID_ARGUMENTif the inputEpochRequestis malformed.UNIMPLEMENTEDif the endpoint is disabled on the node.
Sourcepub async fn get_consensus_detailed_status(
&mut self,
request: impl IntoRequest<ConsensusDetailedStatusQuery>,
) -> Result<Response<ConsensusDetailedStatus>, Status>
pub async fn get_consensus_detailed_status( &mut self, request: impl IntoRequest<ConsensusDetailedStatusQuery>, ) -> Result<Response<ConsensusDetailedStatus>, Status>
Get the detailed status of the consensus. This is only available for consensus version 1.
The following error cases are possible:
NOT_FOUNDif the query specifies an unknown genesis index.INVALID_ARGUMENTif the query specifies a genesis index at consensus version 0.UNIMPLEMENTEDif the endpoint is disabled on the node.
Sourcepub async fn dry_run(
&mut self,
request: impl IntoStreamingRequest<Message = DryRunRequest>,
) -> Result<Response<Streaming<DryRunResponse>>, Status>
pub async fn dry_run( &mut self, request: impl IntoStreamingRequest<Message = DryRunRequest>, ) -> Result<Response<Streaming<DryRunResponse>>, Status>
Dry run a series of transactions and operations on a state derived from a specified block.
The server should send a single DryRunResponse for each DryRunRequest received, unless
the call fails with an error status code. If a request produces a DryRunErrorResponse, then
the server will still process subsequent requests, just as if the request causing the error
did not happen.
The first request should be load_block_at_state to determine the block state that will be
used for the dry run.
The server associates each request with an energy cost, and limits the total energy that may
be expended in a single invocation of DryRun. This limit is reported as quota in the
initial metadata returned by the server. If executing an operation exceeds the limit,
the server terminates the session with RESOURCE_EXHAUSTED.
The server also imposes a timeout for a dry-run session to complete. The server reports
the timeout duration in milliseconds in the initial metadata field timeout. If the session
is not completed before the timeout elapses, the server terminates the session with
DEADLINE_EXCEEDED.
The following error cases are possible:
INVALID_ARGUMENTif anyDryRunRequestis malformed.RESOURCE_EXHAUSTEDif the energy quota is exceeded.DEADLINE_EXCEEDEDif the session does not complete before the server-imposed timeout.RESOURCE_EXHAUSTEDif the server is not currently accepting newDryRunsessions. (The server may impose a limit on the number of concurrent sessions.)INTERNALif an interal server error occurs. This should not happen, and likely indicates a bug.UNIMPLEMENTEDif the endpoint is disabled on the node.
Trait Implementations§
Source§impl<T: Clone> Clone for QueriesClient<T>
impl<T: Clone> Clone for QueriesClient<T>
Source§fn clone(&self) -> QueriesClient<T>
fn clone(&self) -> QueriesClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for QueriesClient<T>
impl<T> RefUnwindSafe for QueriesClient<T>where
T: RefUnwindSafe,
impl<T> Send for QueriesClient<T>where
T: Send,
impl<T> Sync for QueriesClient<T>where
T: Sync,
impl<T> Unpin for QueriesClient<T>where
T: Unpin,
impl<T> UnwindSafe for QueriesClient<T>where
T: UnwindSafe,
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,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.