Struct ed25519_dalek_bip32::ExtendedSecretKey
source · [−]pub struct ExtendedSecretKey {
pub depth: u8,
pub child_index: ChildIndex,
pub secret_key: SecretKey,
pub chain_code: [u8; 32],
}
Expand description
An expanded secret key with chain code and meta data
Fields
depth: u8
How many derivations this key is from the root (0 for root)
child_index: ChildIndex
Child index of the key used to derive from parent (Normal(0)
for root)
secret_key: SecretKey
Secret Key
chain_code: [u8; 32]
Chain code
Implementations
sourceimpl ExtendedSecretKey
impl ExtendedSecretKey
sourcepub fn derive<P: AsRef<[ChildIndex]>>(&self, path: &P) -> Result<Self>
pub fn derive<P: AsRef<[ChildIndex]>>(&self, path: &P) -> Result<Self>
Derive an extended secret key fom the current using a derivation path
sourcepub fn derive_child(&self, index: ChildIndex) -> Result<Self>
pub fn derive_child(&self, index: ChildIndex) -> Result<Self>
Derive a child extended secret key with an index
sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Get the associated public key
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ExtendedSecretKey
impl Send for ExtendedSecretKey
impl Sync for ExtendedSecretKey
impl Unpin for ExtendedSecretKey
impl UnwindSafe for ExtendedSecretKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more