Struct iop_keyvault_wasm::JsBip32PublicNode
source · [−]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
sourceimpl 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
sourceimpl Clone for JsBip32PublicNode
impl Clone for JsBip32PublicNode
sourcefn clone(&self) -> JsBip32PublicNode
fn clone(&self) -> JsBip32PublicNode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for JsBip32PublicNode
impl Debug for JsBip32PublicNode
sourceimpl From<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
impl From<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
sourcefn from(inner: Bip32PublicNode<Secp256k1>) -> Self
fn from(inner: Bip32PublicNode<Secp256k1>) -> Self
Converts to this type from the input type.
sourceimpl From<JsBip32PublicNode> for JsValue
impl From<JsBip32PublicNode> for JsValue
sourcefn from(value: JsBip32PublicNode) -> Self
fn from(value: JsBip32PublicNode) -> Self
Converts to this type from the input type.
sourceimpl FromWasmAbi for JsBip32PublicNode
impl FromWasmAbi for JsBip32PublicNode
sourceimpl IntoWasmAbi for JsBip32PublicNode
impl IntoWasmAbi for JsBip32PublicNode
sourceimpl OptionFromWasmAbi for JsBip32PublicNode
impl OptionFromWasmAbi for JsBip32PublicNode
sourceimpl OptionIntoWasmAbi for JsBip32PublicNode
impl OptionIntoWasmAbi for JsBip32PublicNode
sourceimpl RefFromWasmAbi for JsBip32PublicNode
impl RefFromWasmAbi for JsBip32PublicNode
type Anchor = Ref<'static, JsBip32PublicNode>
type Anchor = Ref<'static, JsBip32PublicNode>
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. Read more
sourceunsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
Recover a Self::Anchor
from Self::Abi
. Read more
sourceimpl RefMutFromWasmAbi for JsBip32PublicNode
impl RefMutFromWasmAbi for JsBip32PublicNode
type Anchor = RefMut<'static, JsBip32PublicNode>
type Anchor = RefMut<'static, JsBip32PublicNode>
Same as RefFromWasmAbi::Anchor
sourceunsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as RefFromWasmAbi::ref_from_abi
sourceimpl WasmDescribe for JsBip32PublicNode
impl WasmDescribe for JsBip32PublicNode
sourceimpl Wraps<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
impl Wraps<Bip32PublicNode<Secp256k1>> for JsBip32PublicNode
sourcefn inner(&self) -> &Bip32PublicNode<Secp256k1>
fn inner(&self) -> &Bip32PublicNode<Secp256k1>
Converts a reference to a WASM type to a reference to the underlying Rust type.
Auto Trait Implementations
impl !RefUnwindSafe for JsBip32PublicNode
impl !Send for JsBip32PublicNode
impl !Sync for JsBip32PublicNode
impl Unpin for JsBip32PublicNode
impl !UnwindSafe for JsBip32PublicNode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
sourcefn 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
. Read more