pub struct JsBip44PublicKey { /* private fields */ }
Expand description
Represents a public key with a given index within a sub-account used on the chain for verifying signatures or validating key identifiers.
Implementations§
Source§impl JsBip44PublicKey
impl JsBip44PublicKey
Sourcepub fn node(&self) -> JsBip32PublicNode
pub fn node(&self) -> JsBip32PublicNode
Returns the underlying {@link Bip32PublicNode}.
Sourcepub fn to_public_key(&self) -> JsSecpPublicKey
pub fn to_public_key(&self) -> JsSecpPublicKey
Creates the public key for verifying authentications done by this 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.
This method chooses the right algorithm used for creating key identifiers on the given network.
Sourcepub fn bip32_path(&self) -> String
pub fn bip32_path(&self) -> String
Accessor for the BIP32 path of the sub-account.
Sourcepub fn to_p2pkh_addr(&self) -> String
pub fn to_p2pkh_addr(&self) -> String
Returns the P2PKH address that belongs key with the version byte of the network.
Trait Implementations§
Source§impl Clone for JsBip44PublicKey
impl Clone for JsBip44PublicKey
Source§fn clone(&self) -> JsBip44PublicKey
fn clone(&self) -> JsBip44PublicKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for JsBip44PublicKey
impl Debug for JsBip44PublicKey
Source§impl From<Bip44PublicKey<Secp256k1>> for JsBip44PublicKey
impl From<Bip44PublicKey<Secp256k1>> for JsBip44PublicKey
Source§fn from(inner: Bip44PublicKey<Secp256k1>) -> JsBip44PublicKey
fn from(inner: Bip44PublicKey<Secp256k1>) -> JsBip44PublicKey
Source§impl From<JsBip44PublicKey> for JsValue
impl From<JsBip44PublicKey> for JsValue
Source§fn from(value: JsBip44PublicKey) -> JsValue
fn from(value: JsBip44PublicKey) -> JsValue
Source§impl FromWasmAbi for JsBip44PublicKey
impl FromWasmAbi for JsBip44PublicKey
Source§impl IntoWasmAbi for JsBip44PublicKey
impl IntoWasmAbi for JsBip44PublicKey
Source§impl LongRefFromWasmAbi for JsBip44PublicKey
impl LongRefFromWasmAbi for JsBip44PublicKey
Source§type Anchor = RcRef<JsBip44PublicKey>
type Anchor = RcRef<JsBip44PublicKey>
RefFromWasmAbi::Anchor
Source§unsafe fn long_ref_from_abi(
js: <JsBip44PublicKey as LongRefFromWasmAbi>::Abi,
) -> <JsBip44PublicKey as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <JsBip44PublicKey as LongRefFromWasmAbi>::Abi, ) -> <JsBip44PublicKey as LongRefFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi
Source§impl OptionFromWasmAbi for JsBip44PublicKey
impl OptionFromWasmAbi for JsBip44PublicKey
Source§fn is_none(abi: &<JsBip44PublicKey as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<JsBip44PublicKey as FromWasmAbi>::Abi) -> bool
None
, and otherwise it will be passed to
FromWasmAbi
.Source§impl OptionIntoWasmAbi for JsBip44PublicKey
impl OptionIntoWasmAbi for JsBip44PublicKey
Source§fn none() -> <JsBip44PublicKey as IntoWasmAbi>::Abi
fn none() -> <JsBip44PublicKey as IntoWasmAbi>::Abi
None
branch of this option. Read moreSource§impl RefFromWasmAbi for JsBip44PublicKey
impl RefFromWasmAbi for JsBip44PublicKey
Source§type Anchor = RcRef<JsBip44PublicKey>
type Anchor = RcRef<JsBip44PublicKey>
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: <JsBip44PublicKey as RefFromWasmAbi>::Abi,
) -> <JsBip44PublicKey as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <JsBip44PublicKey as RefFromWasmAbi>::Abi, ) -> <JsBip44PublicKey as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for JsBip44PublicKey
impl RefMutFromWasmAbi for JsBip44PublicKey
Source§type Anchor = RcRefMut<JsBip44PublicKey>
type Anchor = RcRefMut<JsBip44PublicKey>
RefFromWasmAbi::Anchor
Source§unsafe fn ref_mut_from_abi(
js: <JsBip44PublicKey as RefMutFromWasmAbi>::Abi,
) -> <JsBip44PublicKey as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <JsBip44PublicKey as RefMutFromWasmAbi>::Abi, ) -> <JsBip44PublicKey as RefMutFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi
Source§impl TryFromJsValue for JsBip44PublicKey
impl TryFromJsValue for JsBip44PublicKey
Source§fn try_from_js_value(
value: JsValue,
) -> Result<JsBip44PublicKey, <JsBip44PublicKey as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue, ) -> Result<JsBip44PublicKey, <JsBip44PublicKey as TryFromJsValue>::Error>
Source§impl VectorFromWasmAbi for JsBip44PublicKey
impl VectorFromWasmAbi for JsBip44PublicKey
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <JsBip44PublicKey as VectorFromWasmAbi>::Abi, ) -> Box<[JsBip44PublicKey]>
Source§impl VectorIntoWasmAbi for JsBip44PublicKey
impl VectorIntoWasmAbi for JsBip44PublicKey
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[JsBip44PublicKey]>, ) -> <JsBip44PublicKey as VectorIntoWasmAbi>::Abi
Source§impl Wraps<Bip44PublicKey<Secp256k1>> for JsBip44PublicKey
impl Wraps<Bip44PublicKey<Secp256k1>> for JsBip44PublicKey
Source§fn inner(&self) -> &Bip44PublicKey<Secp256k1>
fn inner(&self) -> &Bip44PublicKey<Secp256k1>
Auto Trait Implementations§
impl Freeze for JsBip44PublicKey
impl !RefUnwindSafe for JsBip44PublicKey
impl !Send for JsBip44PublicKey
impl !Sync for JsBip44PublicKey
impl Unpin for JsBip44PublicKey
impl !UnwindSafe for JsBip44PublicKey
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
.