pub struct Xpriv { /* private fields */ }
Implementations§
Source§impl Xpriv
impl Xpriv
pub fn new_master(testnet: bool, seed: &[u8]) -> Xpriv
pub fn decode(data: impl Borrow<[u8]>) -> Result<Xpriv, XkeyDecodeError>
pub fn encode(&self) -> [u8; 78]
pub fn is_testnet(&self) -> bool
pub fn depth(&self) -> u8
pub fn child_number(&self) -> DerivationIndex
pub fn parent_fp(&self) -> XpubFp
pub fn fingerprint(self) -> XpubFp
pub fn identifier(self) -> XpubId
pub fn to_xpub(self) -> Xpub
pub fn to_compr_pk(self) -> CompressedPk
pub fn to_xonly_pk(self) -> XOnlyPk
pub fn to_private_ecdsa(self) -> SecretKey
pub fn to_keypair_bip340(self) -> Keypair
Sourcepub fn derive_priv<I>(&self, path: impl AsRef<[I]>) -> Xpriv
pub fn derive_priv<I>(&self, path: impl AsRef<[I]>) -> Xpriv
Attempts to derive an extended private key from a path.
The path
argument can be both of type DerivationPath
or Vec<ChildNumber>
.
Sourcepub fn ckd_priv(&self, idx: impl Into<DerivationIndex>) -> Xpriv
pub fn ckd_priv(&self, idx: impl Into<DerivationIndex>) -> Xpriv
Private->Private child key derivation
pub fn chain_code(&self) -> ChainCode
Trait Implementations§
impl Copy for Xpriv
impl Eq for Xpriv
impl StructuralPartialEq for Xpriv
Auto Trait Implementations§
impl Freeze for Xpriv
impl RefUnwindSafe for Xpriv
impl Send for Xpriv
impl Sync for Xpriv
impl Unpin for Xpriv
impl UnwindSafe for Xpriv
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.