Struct tari_crypto::musig::JointKeyBuilder [−][src]
Implementations
impl<K, P> JointKeyBuilder<P, K> where
K: SecretKey + Mul<P, Output = P>,
P: PublicKey<K = K>,
[src]
K: SecretKey + Mul<P, Output = P>,
P: PublicKey<K = K>,
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]
&mut self,
keys: T
) -> Result<usize, MuSigError>
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,
P: RefUnwindSafe,
impl<P, K> Send for JointKeyBuilder<P, K> where
P: Send,
P: Send,
impl<P, K> Sync for JointKeyBuilder<P, K> where
P: Sync,
P: Sync,
impl<P, K> Unpin for JointKeyBuilder<P, K> where
P: Unpin,
P: Unpin,
impl<P, K> UnwindSafe for JointKeyBuilder<P, K> where
P: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
pub fn cast(self) -> U
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
pub fn from_bits(t: T) -> T
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
pub fn into_bits(self) -> U
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,