pub struct JsSeed { /* private fields */ }
Expand description
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§
Source§impl JsSeed
impl JsSeed
Sourcepub fn new(bytes: &[u8]) -> Result<JsSeed, JsValue>
pub fn new(bytes: &[u8]) -> Result<JsSeed, JsValue>
Creates seed from a raw 512-bit binary seed
Sourcepub fn demo_phrase() -> String
pub fn demo_phrase() -> String
A BIP39 phrase we use in most of the demo videos and proof-of-concept applications. Do not use it in production code.
Sourcepub fn legacy_password() -> String
pub fn legacy_password() -> String
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. (BIP39 standard for “25th word”)
Trait Implementations§
Source§impl FromWasmAbi for JsSeed
impl FromWasmAbi for JsSeed
Source§impl IntoWasmAbi for JsSeed
impl IntoWasmAbi for JsSeed
Source§impl LongRefFromWasmAbi for JsSeed
impl LongRefFromWasmAbi for JsSeed
Source§impl OptionFromWasmAbi for JsSeed
impl OptionFromWasmAbi for JsSeed
Source§impl OptionIntoWasmAbi for JsSeed
impl OptionIntoWasmAbi for JsSeed
Source§impl RefFromWasmAbi for JsSeed
impl RefFromWasmAbi for JsSeed
Source§type Anchor = RcRef<JsSeed>
type Anchor = RcRef<JsSeed>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§unsafe fn ref_from_abi(
js: <JsSeed as RefFromWasmAbi>::Abi,
) -> <JsSeed as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <JsSeed as RefFromWasmAbi>::Abi, ) -> <JsSeed as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for JsSeed
impl RefMutFromWasmAbi for JsSeed
Source§impl TryFromJsValue for JsSeed
impl TryFromJsValue for JsSeed
Source§impl VectorFromWasmAbi for JsSeed
impl VectorFromWasmAbi for JsSeed
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <JsSeed as VectorFromWasmAbi>::Abi, ) -> Box<[JsSeed]>
Source§impl VectorIntoWasmAbi for JsSeed
impl VectorIntoWasmAbi for JsSeed
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsSeed]>) -> <JsSeed as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for JsSeed
impl RefUnwindSafe for JsSeed
impl Send for JsSeed
impl Sync for JsSeed
impl Unpin for JsSeed
impl UnwindSafe for JsSeed
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.