pub struct MultisigAggregatedSignature { /* private fields */ }
Expand description
Aggregated signature from members of a multisig committee.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-aggregated-signature = (vector multisig-member-signature)
u16 ; bitmap
multisig-committee
There is also a legacy encoding for this type defined as:
legacy-multisig-aggregated-signature = (vector multisig-member-signature)
roaring-bitmap ; bitmap
legacy-multisig-committee
roaring-bitmap = bytes ; where the contents of the bytes are valid
; according to the serialized spec for
; roaring bitmaps
See here for the specification for the serialized format of RoaringBitmaps.
Implementations§
Source§impl MultisigAggregatedSignature
impl MultisigAggregatedSignature
Sourcepub fn new(
committee: MultisigCommittee,
signatures: Vec<MultisigMemberSignature>,
bitmap: u16,
) -> Self
pub fn new( committee: MultisigCommittee, signatures: Vec<MultisigMemberSignature>, bitmap: u16, ) -> Self
Construct a new aggregated multisig signature.
Since the list of signatures doesn’t contain sufficient information to identify which committee member provided the signature, it is up to the caller to ensure that the provided signature list is in the same order as it’s corresponding member in the provided committee and that it’s position in the provided bitmap is set.
Sourcepub fn signatures(&self) -> &[MultisigMemberSignature]
pub fn signatures(&self) -> &[MultisigMemberSignature]
The list of signatures from committee members
Sourcepub fn bitmap(&self) -> u16
pub fn bitmap(&self) -> u16
The bitmap that indicates which committee members provided their signature.
Sourcepub fn legacy_bitmap(&self) -> Option<&RoaringBitmap>
pub fn legacy_bitmap(&self) -> Option<&RoaringBitmap>
The legacy roaring bitmap, if this is a legacy formatted signature
Sourcepub fn with_legacy_bitmap(&mut self, legacy_bitmap: RoaringBitmap)
pub fn with_legacy_bitmap(&mut self, legacy_bitmap: RoaringBitmap)
Configure with a legacy roaring bitmap
Sourcepub fn committee(&self) -> &MultisigCommittee
pub fn committee(&self) -> &MultisigCommittee
The committee for this aggregated signature
Trait Implementations§
Source§impl Arbitrary for MultisigAggregatedSignature
impl Arbitrary for MultisigAggregatedSignature
Source§type Parameters = ()
type Parameters = ()
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = BoxedStrategy<MultisigAggregatedSignature>
type Strategy = BoxedStrategy<MultisigAggregatedSignature>
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl Clone for MultisigAggregatedSignature
impl Clone for MultisigAggregatedSignature
Source§fn clone(&self) -> MultisigAggregatedSignature
fn clone(&self) -> MultisigAggregatedSignature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MultisigAggregatedSignature
impl Debug for MultisigAggregatedSignature
Source§impl<'de> Deserialize<'de> for MultisigAggregatedSignature
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for MultisigAggregatedSignature
serde
only.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>,
Source§impl Serialize for MultisigAggregatedSignature
Available on crate feature serde
only.
impl Serialize for MultisigAggregatedSignature
serde
only.impl Eq for MultisigAggregatedSignature
Auto Trait Implementations§
impl Freeze for MultisigAggregatedSignature
impl RefUnwindSafe for MultisigAggregatedSignature
impl Send for MultisigAggregatedSignature
impl Sync for MultisigAggregatedSignature
impl Unpin for MultisigAggregatedSignature
impl UnwindSafe for MultisigAggregatedSignature
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read more