pub struct DirtyKeyInfo<E: Curve> {
pub curve: CurveName<E>,
pub shared_public_key: NonZero<Point<E>>,
pub public_shares: Vec<NonZero<Point<E>>>,
pub vss_setup: Option<VssSetup<E>>,
pub chain_code: Option<ChainCode>,
}Expand description
Public Key Info
Contains public information about the TSS key, including shared public key, commitments to secret shares and etc.
Fields§
§curve: CurveName<E>Guard that ensures curve consistency for deseraization
Public key corresponding to shared secret key. Corresponds to X in paper.
Public shares of all signers sharing the key
public_shares[i] corresponds to public share (or public commitment) of $\ith$ party.
vss_setup: Option<VssSetup<E>>Verifiable secret sharing setup, present if key was generated using VSS scheme
chain_code: Option<ChainCode>hd-wallet only.Chain code associated with the key, if HD wallets support was enabled
Implementations§
Source§impl<E: Curve> DirtyKeyInfo<E>
impl<E: Curve> DirtyKeyInfo<E>
Returns share preimage associated with j-th signer
- For additive shares, share preimage is defined as
j+1 - For VSS-shares, share preimage is scalar $I_j$ such that $x_j = F(I_j)$ where $F(x)$ is polynomial co-shared by the signers and $x_j$ is secret share of j-th signer
Note: if you have no idea what it is, probably you don’t need it.
Source§impl<E: Curve> DirtyKeyInfo<E>
impl<E: Curve> DirtyKeyInfo<E>
Sourcepub fn is_hd_wallet(&self) -> bool
Available on crate feature hd-wallet only.
pub fn is_hd_wallet(&self) -> bool
hd-wallet only.Checks whether the key is HD-capable
Sourcepub fn extended_public_key(&self) -> Option<ExtendedPublicKey<E>>
Available on crate feature hd-wallet only.
pub fn extended_public_key(&self) -> Option<ExtendedPublicKey<E>>
hd-wallet only.Returns extended public key, if HD support was enabled
Sourcepub fn derive_child_public_key<Hd: HdWallet<E>, ChildIndex>(
&self,
derivation_path: impl IntoIterator<Item = ChildIndex>,
) -> Result<ExtendedPublicKey<E>, HdError<<ChildIndex as TryInto<NonHardenedIndex>>::Error>>where
NonHardenedIndex: TryFrom<ChildIndex>,
Available on crate feature hd-wallet only.
pub fn derive_child_public_key<Hd: HdWallet<E>, ChildIndex>(
&self,
derivation_path: impl IntoIterator<Item = ChildIndex>,
) -> Result<ExtendedPublicKey<E>, HdError<<ChildIndex as TryInto<NonHardenedIndex>>::Error>>where
NonHardenedIndex: TryFrom<ChildIndex>,
hd-wallet only.Derives child public key, if it’s HD key, using HdWallet algorithm
Trait Implementations§
Source§fn as_ref(&self) -> &DirtyKeyInfo<E>
fn as_ref(&self) -> &DirtyKeyInfo<E>
Source§impl<E: Clone + Curve> Clone for DirtyKeyInfo<E>
impl<E: Clone + Curve> Clone for DirtyKeyInfo<E>
Source§fn clone(&self) -> DirtyKeyInfo<E>
fn clone(&self) -> DirtyKeyInfo<E>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more