[−][src]Struct ed25519_bip32::XPrv
HDWallet extended private key
Effectively this is ed25519 extended secret key (64 bytes) followed by a chain code (32 bytes)
Methods
impl XPrv
[src]
pub fn normalize_bytes(bytes: [u8; 96]) -> Self
[src]
takes the given raw bytes and perform some modifications to normalize to a valid XPrv.
pub fn from_nonextended(bytes: [u8; 32], chain_code: [u8; 32]) -> Self
[src]
Takes a non-extended ed25519 key and hash through SHA512 it in the same way the standard Ed25519 signature system make extended key, but also clean the 3rd highest bit of the key as described in the paper
pub fn from_bytes_verified(bytes: [u8; 96]) -> Result<Self, PrivateKeyError>
[src]
Create a XPrv
by taking ownership of the given array
This function may returns an error if it does not have the expected format.
pub fn from_slice_verified(bytes: &[u8]) -> Result<Self, PrivateKeyError>
[src]
pub fn public(&self) -> XPub
[src]
Get the associated XPub
pub fn sign<T>(&self, message: &[u8]) -> Signature<T>
[src]
sign the given message with the XPrv
.
pub fn verify<T>(&self, message: &[u8], signature: &Signature<T>) -> bool
[src]
verify a given signature
pub fn derive(&self, scheme: DerivationScheme, index: DerivationIndex) -> Self
[src]
pub fn get_extended(&self, out: &mut [u8; 64])
[src]
Trait Implementations
impl Drop for XPrv
[src]
impl Eq for XPrv
[src]
impl Clone for XPrv
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl AsRef<[u8]> for XPrv
[src]
impl PartialEq<XPrv> for XPrv
[src]
impl From<XPrv> for [u8; 96]
[src]
impl Debug for XPrv
[src]
impl Display for XPrv
[src]
Auto Trait Implementations
impl Send for XPrv
impl Unpin for XPrv
impl Sync for XPrv
impl UnwindSafe for XPrv
impl RefUnwindSafe for XPrv
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,