pub struct MuSigKeyAgg {
pub pubkeys: Vec<[u8; 33]>,
pub aggregated_pubkey: [u8; 33],
pub xonly_pubkey: [u8; 32],
pub coefficients: Vec<[u8; 32]>,
pub parity: bool,
}Expand description
MuSig2 key aggregation context
Fields§
§pubkeys: Vec<[u8; 33]>Individual public keys (33 bytes compressed)
aggregated_pubkey: [u8; 33]Aggregated public key (33 bytes compressed)
xonly_pubkey: [u8; 32]X-only aggregated public key (32 bytes)
coefficients: Vec<[u8; 32]>Key aggregation coefficients
parity: boolWhether the aggregated key needed negation
Implementations§
Source§impl MuSigKeyAgg
impl MuSigKeyAgg
Sourcepub fn aggregated_pubkey(&self) -> &[u8; 33]
pub fn aggregated_pubkey(&self) -> &[u8; 33]
Get the aggregated public key (33 bytes compressed)
Sourcepub fn xonly_pubkey(&self) -> &[u8; 32]
pub fn xonly_pubkey(&self) -> &[u8; 32]
Get the x-only aggregated public key (32 bytes, for Taproot)
Sourcepub fn coefficient_for(&self, pubkey: &[u8; 33]) -> Option<&[u8; 32]>
pub fn coefficient_for(&self, pubkey: &[u8; 33]) -> Option<&[u8; 32]>
Get the coefficient for a specific public key
Sourcepub fn contains(&self, pubkey: &[u8; 33]) -> bool
pub fn contains(&self, pubkey: &[u8; 33]) -> bool
Check if a public key is part of this aggregation
Sourcepub fn participant_count(&self) -> usize
pub fn participant_count(&self) -> usize
Get number of participants
Trait Implementations§
Source§impl Clone for MuSigKeyAgg
impl Clone for MuSigKeyAgg
Source§fn clone(&self) -> MuSigKeyAgg
fn clone(&self) -> MuSigKeyAgg
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 moreAuto Trait Implementations§
impl Freeze for MuSigKeyAgg
impl RefUnwindSafe for MuSigKeyAgg
impl Send for MuSigKeyAgg
impl Sync for MuSigKeyAgg
impl Unpin for MuSigKeyAgg
impl UnwindSafe for MuSigKeyAgg
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