pub struct SingleSignature {
pub signer_index: SignerIndex,
/* private fields */
}Expand description
Single signature created by a single party who has won the lottery. Contains the underlying signature for the proof system and the registration index of the signer.
Fields§
§signer_index: SignerIndexMerkle tree index of the signer.
Implementations§
Source§impl SingleSignature
impl SingleSignature
Sourcepub fn verify<D: MembershipDigest>(
&self,
params: &Parameters,
pk: &VerificationKeyForConcatenation,
stake: &Stake,
avk: &AggregateVerificationKey<D>,
msg: &[u8],
) -> StmResult<()>
pub fn verify<D: MembershipDigest>( &self, params: &Parameters, pk: &VerificationKeyForConcatenation, stake: &Stake, avk: &AggregateVerificationKey<D>, msg: &[u8], ) -> StmResult<()>
Verify a SingleSignature by validating the underlying single signature for proof system.
Sourcepub fn to_bytes(&self) -> StmResult<Vec<u8>>
pub fn to_bytes(&self) -> StmResult<Vec<u8>>
Convert a SingleSignature into bytes using CBOR encoding.
Sourcepub fn from_bytes<D: MembershipDigest>(
bytes: &[u8],
) -> StmResult<SingleSignature>
pub fn from_bytes<D: MembershipDigest>( bytes: &[u8], ) -> StmResult<SingleSignature>
Extract a SingleSignature from a byte slice.
Supports both CBOR-encoded (version-prefixed) and legacy manually packed formats.
Sourcepub fn get_concatenation_signature_indices(&self) -> Vec<LotteryIndex> ⓘ
pub fn get_concatenation_signature_indices(&self) -> Vec<LotteryIndex> ⓘ
Get indices of the single signature for concatenation proof system.
Sourcepub fn get_concatenation_signature_sigma(&self) -> BlsSignature
pub fn get_concatenation_signature_sigma(&self) -> BlsSignature
Get underlying BLS signature of the concatenation single signature.
Sourcepub fn set_concatenation_signature_indices(&mut self, indices: &[LotteryIndex])
pub fn set_concatenation_signature_indices(&mut self, indices: &[LotteryIndex])
Set the indices of the single signature for concatenation proof system.
Trait Implementations§
Source§impl Clone for SingleSignature
impl Clone for SingleSignature
Source§fn clone(&self) -> SingleSignature
fn clone(&self) -> SingleSignature
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SingleSignature
impl Debug for SingleSignature
Source§impl<'de> Deserialize<'de> for SingleSignature
impl<'de> Deserialize<'de> for SingleSignature
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SingleSignature
impl Hash for SingleSignature
Source§impl Ord for SingleSignature
impl Ord for SingleSignature
Source§impl PartialEq for SingleSignature
impl PartialEq for SingleSignature
Source§impl PartialOrd for SingleSignature
impl PartialOrd for SingleSignature
Source§impl Serialize for SingleSignature
impl Serialize for SingleSignature
impl Eq for SingleSignature
Auto Trait Implementations§
impl Freeze for SingleSignature
impl RefUnwindSafe for SingleSignature
impl Send for SingleSignature
impl Sync for SingleSignature
impl Unpin for SingleSignature
impl UnsafeUnpin for SingleSignature
impl UnwindSafe for SingleSignature
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