pub struct JsBip32Node { /* private fields */ }
Expand description
In BIP-0032 each extended private key has the same operations, independently from the actual path. This struct represents such an extended private key in a given subtree.
Implementations§
Source§impl JsBip32Node
impl JsBip32Node
Sourcepub fn derive_normal(&self, idx: i32) -> Result<JsBip32Node, JsValue>
pub fn derive_normal(&self, idx: i32) -> Result<JsBip32Node, JsValue>
Create a new node with normal (public) derivation with the given index.
Sourcepub fn derive_hardened(&self, idx: i32) -> Result<JsBip32Node, JsValue>
pub fn derive_hardened(&self, idx: i32) -> Result<JsBip32Node, JsValue>
Create a new node with hardened (private) derivation with the given index.
Sourcepub fn to_private_key(&self) -> JsSecpPrivateKey
pub fn to_private_key(&self) -> JsSecpPrivateKey
Creates the {@SecpPrivateKey} that belongs to this node for authenticating actions.
Sourcepub fn neuter(&self) -> JsBip32PublicNode
pub fn neuter(&self) -> JsBip32PublicNode
Removes the ability to sign and derive hardened keys. The public node it returns is still able to provide normal derivation and signature verifications.
Trait Implementations§
Source§impl Clone for JsBip32Node
impl Clone for JsBip32Node
Source§fn clone(&self) -> JsBip32Node
fn clone(&self) -> JsBip32Node
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsBip32Node
impl Debug for JsBip32Node
Source§impl From<JsBip32Node> for JsValue
impl From<JsBip32Node> for JsValue
Source§fn from(value: JsBip32Node) -> JsValue
fn from(value: JsBip32Node) -> JsValue
Converts to this type from the input type.
Source§impl FromWasmAbi for JsBip32Node
impl FromWasmAbi for JsBip32Node
Source§impl IntoWasmAbi for JsBip32Node
impl IntoWasmAbi for JsBip32Node
Source§impl LongRefFromWasmAbi for JsBip32Node
impl LongRefFromWasmAbi for JsBip32Node
Source§type Anchor = RcRef<JsBip32Node>
type Anchor = RcRef<JsBip32Node>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn long_ref_from_abi(
js: <JsBip32Node as LongRefFromWasmAbi>::Abi,
) -> <JsBip32Node as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <JsBip32Node as LongRefFromWasmAbi>::Abi, ) -> <JsBip32Node as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl OptionFromWasmAbi for JsBip32Node
impl OptionFromWasmAbi for JsBip32Node
Source§fn is_none(abi: &<JsBip32Node as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<JsBip32Node as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None
, and otherwise it will be passed to
FromWasmAbi
.Source§impl OptionIntoWasmAbi for JsBip32Node
impl OptionIntoWasmAbi for JsBip32Node
Source§fn none() -> <JsBip32Node as IntoWasmAbi>::Abi
fn none() -> <JsBip32Node as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None
branch of this option. Read moreSource§impl RefFromWasmAbi for JsBip32Node
impl RefFromWasmAbi for JsBip32Node
Source§type Anchor = RcRef<JsBip32Node>
type Anchor = RcRef<JsBip32Node>
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: <JsBip32Node as RefFromWasmAbi>::Abi,
) -> <JsBip32Node as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <JsBip32Node as RefFromWasmAbi>::Abi, ) -> <JsBip32Node as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for JsBip32Node
impl RefMutFromWasmAbi for JsBip32Node
Source§type Anchor = RcRefMut<JsBip32Node>
type Anchor = RcRefMut<JsBip32Node>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn ref_mut_from_abi(
js: <JsBip32Node as RefMutFromWasmAbi>::Abi,
) -> <JsBip32Node as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <JsBip32Node as RefMutFromWasmAbi>::Abi, ) -> <JsBip32Node as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl TryFromJsValue for JsBip32Node
impl TryFromJsValue for JsBip32Node
Source§fn try_from_js_value(
value: JsValue,
) -> Result<JsBip32Node, <JsBip32Node as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue, ) -> Result<JsBip32Node, <JsBip32Node as TryFromJsValue>::Error>
Performs the conversion.
Source§impl VectorFromWasmAbi for JsBip32Node
impl VectorFromWasmAbi for JsBip32Node
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <JsBip32Node as VectorFromWasmAbi>::Abi, ) -> Box<[JsBip32Node]>
Source§impl VectorIntoWasmAbi for JsBip32Node
impl VectorIntoWasmAbi for JsBip32Node
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[JsBip32Node]>, ) -> <JsBip32Node as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for JsBip32Node
impl !RefUnwindSafe for JsBip32Node
impl !Send for JsBip32Node
impl !Sync for JsBip32Node
impl Unpin for JsBip32Node
impl !UnwindSafe for JsBip32Node
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
.