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-committeeThere 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 bitmapsSee here for the specification for the serialized format of RoaringBitmaps.
Implementations§
Source§impl MultisigAggregatedSignature
impl MultisigAggregatedSignature
pub fn from_serialized_bytes( bytes: impl AsRef<[u8]>, ) -> Result<Self, SignatureFromBytesError>
Available on crate feature
serde only.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.
pub fn committee(&self) -> &MultisigCommittee
Trait Implementations§
Source§impl Arbitrary for MultisigAggregatedSignature
impl Arbitrary for MultisigAggregatedSignature
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<MultisigAggregatedSignature>
type Strategy = BoxedStrategy<MultisigAggregatedSignature>
The type of
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
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 MultisigAggregatedSignature
impl Debug for MultisigAggregatedSignature
Source§impl<'de> Deserialize<'de> for MultisigAggregatedSignature
Available on crate feature serde only.
impl<'de> Deserialize<'de> for MultisigAggregatedSignature
Available on crate feature
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for MultisigAggregatedSignature
impl JsonSchema for MultisigAggregatedSignature
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for MultisigAggregatedSignature
Available on crate feature serde only.
impl Serialize for MultisigAggregatedSignature
Available on crate feature
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more