pub struct CommittedMultiSigWires {
pub message: [Wire; 4],
pub epoch: Wire,
pub signer_set: [Wire; 8],
pub signers: Vec<SignerWires>,
}Expand description
The wires a committed aggregate occupies.
The message, the epoch and one commitment to the signer set are public. Every key and every signature is private.
So the statement is the same size whatever the number of signers.
Fields§
§message: [Wire; 4]§epoch: Wire§signer_set: [Wire; 8]§signers: Vec<SignerWires>Implementations§
Source§impl CommittedMultiSigWires
impl CommittedMultiSigWires
Sourcepub fn new(builder: &CircuitBuilder, num_signers: usize) -> Self
pub fn new(builder: &CircuitBuilder, num_signers: usize) -> Self
Allocates the wires for num_signers signers.
§Panics
If there are no signers. A commitment to nothing states nothing. So an empty aggregate is a mistake, not a degenerate case worth supporting.
Sourcepub fn populate(
&self,
w: &mut WitnessFiller<'_>,
message: &Message,
epoch: u32,
signatures: &[(XmssPublicKey, XmssSignature)],
)
pub fn populate( &self, w: &mut WitnessFiller<'_>, message: &Message, epoch: u32, signatures: &[(XmssPublicKey, XmssSignature)], )
Populates every wire from a message, an epoch and one key-and-signature pair per signer.
The commitment is computed over the pairs in the order given. Nothing is sorted here.
So a caller that has not sorted gets a statement its own circuit rejects. It never gets a statement about a set it did not mean.
§Panics
If the number of pairs is not the number of signers the wires were allocated for.
Trait Implementations§
Source§impl Clone for CommittedMultiSigWires
impl Clone for CommittedMultiSigWires
Source§fn clone(&self) -> CommittedMultiSigWires
fn clone(&self) -> CommittedMultiSigWires
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CommittedMultiSigWires
impl RefUnwindSafe for CommittedMultiSigWires
impl Send for CommittedMultiSigWires
impl Sync for CommittedMultiSigWires
impl Unpin for CommittedMultiSigWires
impl UnsafeUnpin for CommittedMultiSigWires
impl UnwindSafe for CommittedMultiSigWires
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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