Type Alias hotshot_task_impls::builder::v0_1::BuilderClient

source ·
pub type BuilderClient<TYPES> = BuilderClient<TYPES, Version>;
Expand description

Client for builder API

Aliased Type§

struct BuilderClient<TYPES> {
    client: Client<Error, StaticVersion<0, 1>>,
    _marker: PhantomData<TYPES>,
}

Fields§

§client: Client<Error, StaticVersion<0, 1>>

Underlying surf_disco::Client for the legacy builder api

§_marker: PhantomData<TYPES>

Marker for [NodeType] used here

Implementations§

source§

impl<TYPES: NodeType> BuilderClient<TYPES>

source

pub async fn claim_block_header_input( &self, block_hash: BuilderCommitment, view_number: u64, sender: TYPES::SignatureKey, signature: &<<TYPES as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType, ) -> Result<AvailableBlockHeaderInput<TYPES>, BuilderClientError>

Claim block header input

§Errors
source

pub async fn claim_block( &self, block_hash: BuilderCommitment, view_number: u64, sender: TYPES::SignatureKey, signature: &<<TYPES as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType, ) -> Result<AvailableBlockData<TYPES>, BuilderClientError>

Claim block

§Errors
source

pub async fn claim_block_with_num_nodes( &self, block_hash: BuilderCommitment, view_number: u64, sender: TYPES::SignatureKey, signature: &<<TYPES as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType, num_nodes: usize, ) -> Result<AvailableBlockData<TYPES>, BuilderClientError>

Claim block and provide the number of nodes information to the builder for VID computation.

§Errors