Struct tari_crypto::musig::JointKeyBuilder[][src]

pub struct JointKeyBuilder<P, K> where
    K: SecretKey,
    P: PublicKey<K = K>, 
{ /* fields omitted */ }

Implementations

impl<K, P> JointKeyBuilder<P, K> where
    K: SecretKey + Mul<P, Output = P>,
    P: PublicKey<K = K>, 
[src]

pub fn new(n: usize) -> Result<JointKeyBuilder<P, K>, MuSigError>[src]

Create a new JointKey instance containing no participant keys, or return TooManyParticipants if n exceeds MAX_SIGNATURES

pub fn num_signers(&self) -> usize[src]

The number of parties in the Joint key

pub fn add_key(&mut self, pub_key: P) -> Result<usize, MuSigError>[src]

Add a participant signer’s public key to the JointKey

pub fn key_exists(&self, key: &P) -> bool[src]

Checks whether the given public key is in the participants list

pub fn is_full(&self) -> bool[src]

Checks whether the number of pub_keys is equal to num_signers

pub fn add_keys<T: IntoIterator<Item = P>>(
    &mut self,
    keys: T
) -> Result<usize, MuSigError>
[src]

Add all the keys in keys to the participant list.

pub fn build<D: Digest>(self) -> Result<JointKey<P, K>, MuSigError>[src]

Produce a sorted, immutable joint Musig public key from the gathered set of conventional public keys

Auto Trait Implementations

impl<P, K> RefUnwindSafe for JointKeyBuilder<P, K> where
    P: RefUnwindSafe

impl<P, K> Send for JointKeyBuilder<P, K> where
    P: Send

impl<P, K> Sync for JointKeyBuilder<P, K> where
    P: Sync

impl<P, K> Unpin for JointKeyBuilder<P, K> where
    P: Unpin

impl<P, K> UnwindSafe for JointKeyBuilder<P, K> where
    P: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> From<T> for T[src]

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,