[][src]Struct ed25519_bip32::XPrv

pub struct 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_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 Eq for XPrv[src]

impl PartialEq<XPrv> for XPrv[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Drop for XPrv[src]

impl Clone for XPrv[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl AsRef<[u8]> 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 Sync for XPrv

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]