pub struct Seed(/* private fields */);
Available on crate feature
slip10
only.Expand description
A seed is an arbitrary bytestring used to create the root of the tree.
Several standards generate and/or restricts the size of the seed: BIP39: 512 bit seeds BIP32: between 128 and 512 bits; 256 bits is advised SLIP10: follows BIP32
But since the seed entropy is always passed through HMAC-SHA512 any bytesequence is acceptable, therefore formally the size requirement is context sensitive.
Implementations§
source§impl Seed
impl Seed
pub fn from_bytes(bs: &[u8]) -> Self
pub fn to_master_key<K: IsSecretKey>(&self) -> Slip10<K>
pub fn derive<K, I>(&self, chain: I) -> Slip10<K>where
K: IsSecretKey + WithSegment<<I as Iterator>::Item>,
I: Iterator,
<I as Iterator>::Item: Segment,
Trait Implementations§
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§
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> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)