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>
impl<TYPES: NodeType> BuilderClient<TYPES>
sourcepub 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>
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
BuilderClientError::BlockNotFound
if block isn’t availableBuilderClientError::Api
if API isn’t responding or responds incorrectly
sourcepub 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>
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
BuilderClientError::BlockNotFound
if block isn’t availableBuilderClientError::Api
if API isn’t responding or responds incorrectly
sourcepub 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>
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
BuilderClientError::BlockNotFound
if block isn’t availableBuilderClientError::Api
if API isn’t responding or responds incorrectly