pub struct JsBip44PublicAccount { /* private fields */ }
Expand description
Represents the public API of a given account of a given coin in the BIP32 tree.
Implementations§
Source§impl JsBip44PublicAccount
impl JsBip44PublicAccount
Sourcepub fn node(&self) -> JsBip32PublicNode
pub fn node(&self) -> JsBip32PublicNode
Returns the underlying {@link Bip32PublicNode}.
Sourcepub fn chain(&self, change: bool) -> Result<JsBip44PublicSubAccount, JsValue>
pub fn chain(&self, change: bool) -> Result<JsBip44PublicSubAccount, JsValue>
Creates a sub-account for either external keys (receiving addresses) or internal keys (change addresses). This distinction is a common practice that might help in accounting.
Sourcepub fn key(&self, idx: i32) -> Result<JsBip44PublicKey, JsValue>
pub fn key(&self, idx: i32) -> Result<JsBip44PublicKey, JsValue>
Creates a key with a given index used on the chain for storing balance or authenticating actions. By default these keys are made on the receiving sub-account.
Sourcepub fn bip32_path(&self) -> String
pub fn bip32_path(&self) -> String
Accessor for the BIP32 path of the account.
Trait Implementations§
Source§impl Clone for JsBip44PublicAccount
impl Clone for JsBip44PublicAccount
Source§fn clone(&self) -> JsBip44PublicAccount
fn clone(&self) -> JsBip44PublicAccount
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 JsBip44PublicAccount
impl Debug for JsBip44PublicAccount
Source§impl From<Bip44PublicAccount<Secp256k1>> for JsBip44PublicAccount
impl From<Bip44PublicAccount<Secp256k1>> for JsBip44PublicAccount
Source§fn from(inner: Bip44PublicAccount<Secp256k1>) -> JsBip44PublicAccount
fn from(inner: Bip44PublicAccount<Secp256k1>) -> JsBip44PublicAccount
Converts to this type from the input type.
Source§impl From<JsBip44PublicAccount> for JsValue
impl From<JsBip44PublicAccount> for JsValue
Source§fn from(value: JsBip44PublicAccount) -> JsValue
fn from(value: JsBip44PublicAccount) -> JsValue
Converts to this type from the input type.
Source§impl FromWasmAbi for JsBip44PublicAccount
impl FromWasmAbi for JsBip44PublicAccount
Source§impl IntoWasmAbi for JsBip44PublicAccount
impl IntoWasmAbi for JsBip44PublicAccount
Source§impl LongRefFromWasmAbi for JsBip44PublicAccount
impl LongRefFromWasmAbi for JsBip44PublicAccount
Source§type Anchor = RcRef<JsBip44PublicAccount>
type Anchor = RcRef<JsBip44PublicAccount>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn long_ref_from_abi(
js: <JsBip44PublicAccount as LongRefFromWasmAbi>::Abi,
) -> <JsBip44PublicAccount as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <JsBip44PublicAccount as LongRefFromWasmAbi>::Abi, ) -> <JsBip44PublicAccount as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl OptionFromWasmAbi for JsBip44PublicAccount
impl OptionFromWasmAbi for JsBip44PublicAccount
Source§fn is_none(abi: &<JsBip44PublicAccount as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<JsBip44PublicAccount 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 JsBip44PublicAccount
impl OptionIntoWasmAbi for JsBip44PublicAccount
Source§fn none() -> <JsBip44PublicAccount as IntoWasmAbi>::Abi
fn none() -> <JsBip44PublicAccount 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 JsBip44PublicAccount
impl RefFromWasmAbi for JsBip44PublicAccount
Source§type Anchor = RcRef<JsBip44PublicAccount>
type Anchor = RcRef<JsBip44PublicAccount>
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: <JsBip44PublicAccount as RefFromWasmAbi>::Abi,
) -> <JsBip44PublicAccount as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <JsBip44PublicAccount as RefFromWasmAbi>::Abi, ) -> <JsBip44PublicAccount as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for JsBip44PublicAccount
impl RefMutFromWasmAbi for JsBip44PublicAccount
Source§type Anchor = RcRefMut<JsBip44PublicAccount>
type Anchor = RcRefMut<JsBip44PublicAccount>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn ref_mut_from_abi(
js: <JsBip44PublicAccount as RefMutFromWasmAbi>::Abi,
) -> <JsBip44PublicAccount as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <JsBip44PublicAccount as RefMutFromWasmAbi>::Abi, ) -> <JsBip44PublicAccount as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl TryFromJsValue for JsBip44PublicAccount
impl TryFromJsValue for JsBip44PublicAccount
Source§fn try_from_js_value(
value: JsValue,
) -> Result<JsBip44PublicAccount, <JsBip44PublicAccount as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue, ) -> Result<JsBip44PublicAccount, <JsBip44PublicAccount as TryFromJsValue>::Error>
Performs the conversion.
Source§impl VectorFromWasmAbi for JsBip44PublicAccount
impl VectorFromWasmAbi for JsBip44PublicAccount
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <JsBip44PublicAccount as VectorFromWasmAbi>::Abi, ) -> Box<[JsBip44PublicAccount]>
Source§impl VectorIntoWasmAbi for JsBip44PublicAccount
impl VectorIntoWasmAbi for JsBip44PublicAccount
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[JsBip44PublicAccount]>, ) -> <JsBip44PublicAccount as VectorIntoWasmAbi>::Abi
Source§impl Wraps<Bip44PublicAccount<Secp256k1>> for JsBip44PublicAccount
impl Wraps<Bip44PublicAccount<Secp256k1>> for JsBip44PublicAccount
Source§fn inner(&self) -> &Bip44PublicAccount<Secp256k1>
fn inner(&self) -> &Bip44PublicAccount<Secp256k1>
Converts a reference to a WASM type to a reference to the underlying Rust type.
Auto Trait Implementations§
impl Freeze for JsBip44PublicAccount
impl !RefUnwindSafe for JsBip44PublicAccount
impl !Send for JsBip44PublicAccount
impl !Sync for JsBip44PublicAccount
impl Unpin for JsBip44PublicAccount
impl !UnwindSafe for JsBip44PublicAccount
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
.