pub struct JsBip44Account { /* private fields */ }
Expand description
Represents the private API of a given account of a given coin in the BIP32 tree.
Implementations§
Source§impl JsBip44Account
impl JsBip44Account
Sourcepub fn node(&self) -> JsBip32Node
pub fn node(&self) -> JsBip32Node
Returns the underlying {@link Bip32Node}.
Sourcepub fn chain(&self, change: bool) -> Result<JsBip44SubAccount, JsValue>
pub fn chain(&self, change: bool) -> Result<JsBip44SubAccount, 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<JsBip44Key, JsValue>
pub fn key(&self, idx: i32) -> Result<JsBip44Key, 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.
Sourcepub fn neuter(&self) -> JsBip44PublicAccount
pub fn neuter(&self) -> JsBip44PublicAccount
Neuters the account and converts it into its public API
Trait Implementations§
Source§impl Clone for JsBip44Account
impl Clone for JsBip44Account
Source§fn clone(&self) -> JsBip44Account
fn clone(&self) -> JsBip44Account
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 JsBip44Account
impl Debug for JsBip44Account
Source§impl From<Bip44Account<Secp256k1>> for JsBip44Account
impl From<Bip44Account<Secp256k1>> for JsBip44Account
Source§fn from(inner: Bip44Account<Secp256k1>) -> JsBip44Account
fn from(inner: Bip44Account<Secp256k1>) -> JsBip44Account
Converts to this type from the input type.
Source§impl From<JsBip44Account> for JsValue
impl From<JsBip44Account> for JsValue
Source§fn from(value: JsBip44Account) -> JsValue
fn from(value: JsBip44Account) -> JsValue
Converts to this type from the input type.
Source§impl FromWasmAbi for JsBip44Account
impl FromWasmAbi for JsBip44Account
Source§impl IntoWasmAbi for JsBip44Account
impl IntoWasmAbi for JsBip44Account
Source§impl LongRefFromWasmAbi for JsBip44Account
impl LongRefFromWasmAbi for JsBip44Account
Source§type Anchor = RcRef<JsBip44Account>
type Anchor = RcRef<JsBip44Account>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn long_ref_from_abi(
js: <JsBip44Account as LongRefFromWasmAbi>::Abi,
) -> <JsBip44Account as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <JsBip44Account as LongRefFromWasmAbi>::Abi, ) -> <JsBip44Account as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl OptionFromWasmAbi for JsBip44Account
impl OptionFromWasmAbi for JsBip44Account
Source§fn is_none(abi: &<JsBip44Account as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<JsBip44Account 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 JsBip44Account
impl OptionIntoWasmAbi for JsBip44Account
Source§fn none() -> <JsBip44Account as IntoWasmAbi>::Abi
fn none() -> <JsBip44Account 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 JsBip44Account
impl RefFromWasmAbi for JsBip44Account
Source§type Anchor = RcRef<JsBip44Account>
type Anchor = RcRef<JsBip44Account>
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: <JsBip44Account as RefFromWasmAbi>::Abi,
) -> <JsBip44Account as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <JsBip44Account as RefFromWasmAbi>::Abi, ) -> <JsBip44Account as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for JsBip44Account
impl RefMutFromWasmAbi for JsBip44Account
Source§type Anchor = RcRefMut<JsBip44Account>
type Anchor = RcRefMut<JsBip44Account>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn ref_mut_from_abi(
js: <JsBip44Account as RefMutFromWasmAbi>::Abi,
) -> <JsBip44Account as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <JsBip44Account as RefMutFromWasmAbi>::Abi, ) -> <JsBip44Account as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl TryFromJsValue for JsBip44Account
impl TryFromJsValue for JsBip44Account
Source§fn try_from_js_value(
value: JsValue,
) -> Result<JsBip44Account, <JsBip44Account as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue, ) -> Result<JsBip44Account, <JsBip44Account as TryFromJsValue>::Error>
Performs the conversion.
Source§impl VectorFromWasmAbi for JsBip44Account
impl VectorFromWasmAbi for JsBip44Account
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <JsBip44Account as VectorFromWasmAbi>::Abi, ) -> Box<[JsBip44Account]>
Source§impl VectorIntoWasmAbi for JsBip44Account
impl VectorIntoWasmAbi for JsBip44Account
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[JsBip44Account]>, ) -> <JsBip44Account as VectorIntoWasmAbi>::Abi
Source§impl Wraps<Bip44Account<Secp256k1>> for JsBip44Account
impl Wraps<Bip44Account<Secp256k1>> for JsBip44Account
Source§fn inner(&self) -> &Bip44Account<Secp256k1>
fn inner(&self) -> &Bip44Account<Secp256k1>
Converts a reference to a WASM type to a reference to the underlying Rust type.
Auto Trait Implementations§
impl Freeze for JsBip44Account
impl !RefUnwindSafe for JsBip44Account
impl !Send for JsBip44Account
impl !Sync for JsBip44Account
impl Unpin for JsBip44Account
impl !UnwindSafe for JsBip44Account
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
.