pub struct JsBip32PublicNode { /* private fields */ }
Expand description
In BIP-0032 a neutered extended private key is an extended public key. This object represents such an extended public key in a given subtree. It is able to do normal (public) derivation, signature verification, creating and validating key identifiers
Implementations§
Source§impl JsBip32PublicNode
impl JsBip32PublicNode
Sourcepub fn derive_normal(&self, idx: i32) -> Result<JsBip32PublicNode, JsValue>
pub fn derive_normal(&self, idx: i32) -> Result<JsBip32PublicNode, JsValue>
Create a new node with normal (public) derivation with the given index.
Sourcepub fn to_public_key(&self) -> JsSecpPublicKey
pub fn to_public_key(&self) -> JsSecpPublicKey
Creates the public key that belongs to this node for verifying authentications done by the corresponding private key.
Sourcepub fn to_key_id(&self) -> JsSecpKeyId
pub fn to_key_id(&self) -> JsSecpKeyId
Creates the key identifier for the public key. This is an extra layer of security for single-use keys, so the revealing of the public key can be delayed to the point when the authenticated action (spending some coin or revoking access) makes the public key irrelevant after the action is successful.
Ark (and therefore Hydra) uses a different algorithm for calculating key identifiers. That is only available at {@link SecpPublicKey.arkKeyId}
Trait Implementations§
Source§impl Clone for JsBip32PublicNode
impl Clone for JsBip32PublicNode
Source§fn clone(&self) -> JsBip32PublicNode
fn clone(&self) -> JsBip32PublicNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for JsBip32PublicNode
impl Debug for JsBip32PublicNode
Source§impl From<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
impl From<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
Source§fn from(inner: Bip32PublicNode<Secp256k1>) -> JsBip32PublicNode
fn from(inner: Bip32PublicNode<Secp256k1>) -> JsBip32PublicNode
Source§impl From<JsBip32PublicNode> for JsValue
impl From<JsBip32PublicNode> for JsValue
Source§fn from(value: JsBip32PublicNode) -> JsValue
fn from(value: JsBip32PublicNode) -> JsValue
Source§impl FromWasmAbi for JsBip32PublicNode
impl FromWasmAbi for JsBip32PublicNode
Source§impl IntoWasmAbi for JsBip32PublicNode
impl IntoWasmAbi for JsBip32PublicNode
Source§impl LongRefFromWasmAbi for JsBip32PublicNode
impl LongRefFromWasmAbi for JsBip32PublicNode
Source§type Anchor = RcRef<JsBip32PublicNode>
type Anchor = RcRef<JsBip32PublicNode>
RefFromWasmAbi::Anchor
Source§unsafe fn long_ref_from_abi(
js: <JsBip32PublicNode as LongRefFromWasmAbi>::Abi,
) -> <JsBip32PublicNode as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <JsBip32PublicNode as LongRefFromWasmAbi>::Abi, ) -> <JsBip32PublicNode as LongRefFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi
Source§impl OptionFromWasmAbi for JsBip32PublicNode
impl OptionFromWasmAbi for JsBip32PublicNode
Source§fn is_none(abi: &<JsBip32PublicNode as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<JsBip32PublicNode as FromWasmAbi>::Abi) -> bool
None
, and otherwise it will be passed to
FromWasmAbi
.Source§impl OptionIntoWasmAbi for JsBip32PublicNode
impl OptionIntoWasmAbi for JsBip32PublicNode
Source§fn none() -> <JsBip32PublicNode as IntoWasmAbi>::Abi
fn none() -> <JsBip32PublicNode as IntoWasmAbi>::Abi
None
branch of this option. Read moreSource§impl RefFromWasmAbi for JsBip32PublicNode
impl RefFromWasmAbi for JsBip32PublicNode
Source§type Anchor = RcRef<JsBip32PublicNode>
type Anchor = RcRef<JsBip32PublicNode>
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: <JsBip32PublicNode as RefFromWasmAbi>::Abi,
) -> <JsBip32PublicNode as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <JsBip32PublicNode as RefFromWasmAbi>::Abi, ) -> <JsBip32PublicNode as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for JsBip32PublicNode
impl RefMutFromWasmAbi for JsBip32PublicNode
Source§type Anchor = RcRefMut<JsBip32PublicNode>
type Anchor = RcRefMut<JsBip32PublicNode>
RefFromWasmAbi::Anchor
Source§unsafe fn ref_mut_from_abi(
js: <JsBip32PublicNode as RefMutFromWasmAbi>::Abi,
) -> <JsBip32PublicNode as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <JsBip32PublicNode as RefMutFromWasmAbi>::Abi, ) -> <JsBip32PublicNode as RefMutFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi
Source§impl TryFromJsValue for JsBip32PublicNode
impl TryFromJsValue for JsBip32PublicNode
Source§fn try_from_js_value(
value: JsValue,
) -> Result<JsBip32PublicNode, <JsBip32PublicNode as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue, ) -> Result<JsBip32PublicNode, <JsBip32PublicNode as TryFromJsValue>::Error>
Source§impl VectorFromWasmAbi for JsBip32PublicNode
impl VectorFromWasmAbi for JsBip32PublicNode
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <JsBip32PublicNode as VectorFromWasmAbi>::Abi, ) -> Box<[JsBip32PublicNode]>
Source§impl VectorIntoWasmAbi for JsBip32PublicNode
impl VectorIntoWasmAbi for JsBip32PublicNode
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[JsBip32PublicNode]>, ) -> <JsBip32PublicNode as VectorIntoWasmAbi>::Abi
Source§impl Wraps<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
impl Wraps<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
Source§fn inner(&self) -> &Bip32PublicNode<Secp256k1>
fn inner(&self) -> &Bip32PublicNode<Secp256k1>
Auto Trait Implementations§
impl Freeze for JsBip32PublicNode
impl !RefUnwindSafe for JsBip32PublicNode
impl !Send for JsBip32PublicNode
impl !Sync for JsBip32PublicNode
impl Unpin for JsBip32PublicNode
impl !UnwindSafe for JsBip32PublicNode
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
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
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.