pub enum Client {
Grpc(GrpcClient),
}Variants§
Grpc(GrpcClient)
Trait Implementations§
Source§impl From<GrpcClient> for Client
impl From<GrpcClient> for Client
Source§fn from(client: GrpcClient) -> Self
fn from(client: GrpcClient) -> Self
Converts to this type from the input type.
Source§impl ValidatorNode for Client
impl ValidatorNode for Client
type NotificationStream = Pin<Box<dyn Stream<Item = Notification> + Send>>
fn address(&self) -> String
Source§async fn handle_block_proposal(
&self,
proposal: BlockProposal,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_block_proposal( &self, proposal: BlockProposal, ) -> Result<ChainInfoResponse, NodeError>
Proposes a new block.
Source§async fn handle_lite_certificate(
&self,
certificate: LiteCertificate<'_>,
delivery: CrossChainMessageDelivery,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_lite_certificate( &self, certificate: LiteCertificate<'_>, delivery: CrossChainMessageDelivery, ) -> Result<ChainInfoResponse, NodeError>
Processes a certificate without a value.
Source§async fn handle_timeout_certificate(
&self,
certificate: TimeoutCertificate,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_timeout_certificate( &self, certificate: TimeoutCertificate, ) -> Result<ChainInfoResponse, NodeError>
Processes a timeout certificate.
Source§async fn handle_confirmed_certificate(
&self,
certificate: ConfirmedBlockCertificate,
delivery: CrossChainMessageDelivery,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_confirmed_certificate( &self, certificate: ConfirmedBlockCertificate, delivery: CrossChainMessageDelivery, ) -> Result<ChainInfoResponse, NodeError>
Processes a confirmed certificate.
Source§async fn handle_validated_certificate(
&self,
certificate: ValidatedBlockCertificate,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_validated_certificate( &self, certificate: ValidatedBlockCertificate, ) -> Result<ChainInfoResponse, NodeError>
Processes a validated certificate.
Source§async fn handle_chain_info_query(
&self,
query: ChainInfoQuery,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_chain_info_query( &self, query: ChainInfoQuery, ) -> Result<ChainInfoResponse, NodeError>
Handles information queries for this chain.
Source§async fn subscribe(
&self,
chains: Vec<ChainId>,
) -> Result<Self::NotificationStream, NodeError>
async fn subscribe( &self, chains: Vec<ChainId>, ) -> Result<Self::NotificationStream, NodeError>
Subscribes to receiving notifications for a collection of chains.
Source§async fn get_version_info(&self) -> Result<VersionInfo, NodeError>
async fn get_version_info(&self) -> Result<VersionInfo, NodeError>
Gets the version info for this validator node.
Source§async fn get_network_description(&self) -> Result<NetworkDescription, NodeError>
async fn get_network_description(&self) -> Result<NetworkDescription, NodeError>
Gets the network’s description.
async fn upload_blob(&self, content: BlobContent) -> Result<BlobId, NodeError>
Source§async fn download_blob(&self, blob_id: BlobId) -> Result<BlobContent, NodeError>
async fn download_blob(&self, blob_id: BlobId) -> Result<BlobContent, NodeError>
Downloads a blob. Returns an error if the validator does not have the blob.
Source§async fn download_pending_blob(
&self,
chain_id: ChainId,
blob_id: BlobId,
) -> Result<BlobContent, NodeError>
async fn download_pending_blob( &self, chain_id: ChainId, blob_id: BlobId, ) -> Result<BlobContent, NodeError>
Downloads a blob that belongs to a pending proposal or the locking block on a chain.
Source§async fn handle_pending_blob(
&self,
chain_id: ChainId,
blob: BlobContent,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_pending_blob( &self, chain_id: ChainId, blob: BlobContent, ) -> Result<ChainInfoResponse, NodeError>
Handles a blob that belongs to a pending proposal or validated block certificate.
async fn download_certificate( &self, hash: CryptoHash, ) -> Result<ConfirmedBlockCertificate, NodeError>
Source§async fn download_certificates(
&self,
hashes: Vec<CryptoHash>,
) -> Result<Vec<ConfirmedBlockCertificate>, NodeError>
async fn download_certificates( &self, hashes: Vec<CryptoHash>, ) -> Result<Vec<ConfirmedBlockCertificate>, NodeError>
Requests a batch of certificates from the validator.
Source§async fn download_certificates_by_heights(
&self,
chain_id: ChainId,
heights: Vec<BlockHeight>,
) -> Result<Vec<ConfirmedBlockCertificate>, NodeError>
async fn download_certificates_by_heights( &self, chain_id: ChainId, heights: Vec<BlockHeight>, ) -> Result<Vec<ConfirmedBlockCertificate>, NodeError>
Requests a batch of certificates from a specific chain by heights. Read more
Source§async fn blob_last_used_by(
&self,
blob_id: BlobId,
) -> Result<CryptoHash, NodeError>
async fn blob_last_used_by( &self, blob_id: BlobId, ) -> Result<CryptoHash, NodeError>
Returns the hash of the
Certificate that last used a blob.Source§async fn missing_blob_ids(
&self,
blob_ids: Vec<BlobId>,
) -> Result<Vec<BlobId>, NodeError>
async fn missing_blob_ids( &self, blob_ids: Vec<BlobId>, ) -> Result<Vec<BlobId>, NodeError>
Returns the missing
Blobs by their IDs.Source§async fn blob_last_used_by_certificate(
&self,
blob_id: BlobId,
) -> Result<ConfirmedBlockCertificate, NodeError>
async fn blob_last_used_by_certificate( &self, blob_id: BlobId, ) -> Result<ConfirmedBlockCertificate, NodeError>
Returns the certificate that last used the blob.
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl !UnwindSafe for Client
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::RequestSource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.