pub struct StmClerk<D: Clone + Digest> { /* private fields */ }
Expand description
Clerk
can verify and aggregate SingleSignature
s and verify AggregateSignature
s.
Clerks can only be generated with the registration closed.
This avoids that a Merkle Tree is computed before all parties have registered.
Implementations§
Source§impl<D: Digest + Clone + FixedOutput> Clerk<D>
impl<D: Digest + Clone + FixedOutput> Clerk<D>
Sourcepub fn new_clerk_from_closed_key_registration(
params: &Parameters,
closed_reg: &ClosedKeyRegistration<D>,
) -> Self
pub fn new_clerk_from_closed_key_registration( params: &Parameters, closed_reg: &ClosedKeyRegistration<D>, ) -> Self
Create a new Clerk
from a closed registration instance.
Sourcepub fn from_registration(
params: &Parameters,
closed_reg: &ClosedKeyRegistration<D>,
) -> Self
👎Deprecated since 0.4.9: Use new_clerk_from_closed_key_registration
instead
pub fn from_registration( params: &Parameters, closed_reg: &ClosedKeyRegistration<D>, ) -> Self
new_clerk_from_closed_key_registration
insteadCreate a new Clerk
from a closed registration instance.
Sourcepub fn new_clerk_from_signer(signer: &Signer<D>) -> Self
pub fn new_clerk_from_signer(signer: &Signer<D>) -> Self
Create a Clerk from a signer.
Sourcepub fn from_signer(signer: &Signer<D>) -> Self
👎Deprecated since 0.4.9: Use new_clerk_from_signer
instead
pub fn from_signer(signer: &Signer<D>) -> Self
new_clerk_from_signer
insteadCreate a Clerk from a signer.
Sourcepub fn aggregate_signatures(
&self,
sigs: &[SingleSignature],
msg: &[u8],
) -> Result<AggregateSignature<D>, AggregationError>
pub fn aggregate_signatures( &self, sigs: &[SingleSignature], msg: &[u8], ) -> Result<AggregateSignature<D>, AggregationError>
Aggregate a set of signatures for their corresponding indices.
This function first deduplicates the repeated signatures, and if there are enough signatures, it collects the merkle tree indexes of unique signatures. The list of merkle tree indexes is used to create a batch proof, to prove that all signatures are from eligible signers.
It returns an instance of AggregateSignature
.
Sourcepub fn aggregate(
&self,
sigs: &[SingleSignature],
msg: &[u8],
) -> Result<AggregateSignature<D>, AggregationError>
👎Deprecated since 0.4.9: Use aggregate_signatures
instead
pub fn aggregate( &self, sigs: &[SingleSignature], msg: &[u8], ) -> Result<AggregateSignature<D>, AggregationError>
aggregate_signatures
insteadAggregate a set of signatures for their corresponding indices.
This function first deduplicates the repeated signatures, and if there are enough signatures, it collects the merkle tree indexes of unique signatures. The list of merkle tree indexes is used to create a batch proof, to prove that all signatures are from eligible signers.
It returns an instance of AggregateSignature
.
Sourcepub fn compute_aggregate_verification_key(&self) -> AggregateVerificationKey<D>
pub fn compute_aggregate_verification_key(&self) -> AggregateVerificationKey<D>
Compute the AggregateVerificationKey
related to the used registration.
Sourcepub fn compute_avk(&self) -> AggregateVerificationKey<D>
👎Deprecated since 0.4.9: Use compute_aggregate_verification_key
instead
pub fn compute_avk(&self) -> AggregateVerificationKey<D>
compute_aggregate_verification_key
insteadCompute the AggregateVerificationKey
related to the used registration.
Sourcepub fn get_registered_party_for_index(
&self,
party_index: &Index,
) -> Option<(VerificationKey, Stake)>
pub fn get_registered_party_for_index( &self, party_index: &Index, ) -> Option<(VerificationKey, Stake)>
Get the (VK, stake) of a party given its index.
Sourcepub fn get_reg_party(
&self,
party_index: &Index,
) -> Option<(VerificationKey, Stake)>
👎Deprecated since 0.4.9: Use get_registered_party_for_index
instead
pub fn get_reg_party( &self, party_index: &Index, ) -> Option<(VerificationKey, Stake)>
get_registered_party_for_index
insteadGet the (VK, stake) of a party given its index.