[][src]Struct iop_keyvault::Seed

pub struct Seed { /* fields omitted */ }

The seed used for BIP32 derivations. A seed cannot be turned back into a phrase, because there is salted hashing involed in creating it from the BIP39 mnemonic phrase.

Implementations

impl Seed[src]

pub const BITS: usize[src]

Number of bits in entropy generated from the bip39 mnemonic

pub const DEMO_PHRASE: &'static str[src]

A BIP39 phrase we use in most of the demo videos and proof-of-concept applications. Do not use it in production code.

pub const PASSWORD: &'static str[src]

Legacy password used in the 0.0.1 version of the crate. Since 0.0.2 the crate always requires a password, which should be "" by default when the user does not provide one.

pub fn from_bytes(bytes: &[u8]) -> Fallible<Self>[src]

Creates seed from a raw 512-bit binary seed

Example

let bytes = "86f07ba8b38f3de2080912569a07b21ca4ae2275bc305a14ff928c7dc5407f32a1a3a26d4e2c4d9d5e434209c1db3578d94402cf313f3546344d0e4661c9f8d9";
let seed_res = Seed::from_bytes(hex::decode(bytes).unwrap().as_slice());
assert!(seed_res.is_ok());

pub fn as_bytes(&self) -> &[u8][src]

Returns the bytes of the seed

Trait Implementations

impl Debug for Seed[src]

impl<'de> Deserialize<'de> for Seed[src]

impl Serialize for Seed[src]

Auto Trait Implementations

impl RefUnwindSafe for Seed

impl Send for Seed

impl Sync for Seed

impl Unpin for Seed

impl UnwindSafe for Seed

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,