Struct iop_keyvault::Bip44Account[][src]

pub struct Bip44Account<C: KeyDerivationCrypto + 'static> { /* fields omitted */ }

Represents a given account of a given coin in the BIP32 tree.

Implementations

impl<C: KeyDerivationCrypto + 'static> Bip44Account<C>[src]

pub fn new(
    path: Bip44AccountPath,
    network: &'static dyn Network<Suite = C>,
    node: Bip32Node<C>
) -> Self
[src]

Backdoor to mount a BIP44 account at any place in the BIP32 tree. Use only for implementing advanced or fringe non-standard use-cases.

pub fn node(&self) -> &Bip32Node<C>[src]

Accessor for the underlying BIP32 node.

pub fn chain(&self, chain: Chain) -> Result<Bip44SubAccount<C>>[src]

Creates a sub-account for either external keys (receiving addresses) or internal keys (change addresses). This distinction might help in accounting.

pub fn key(&self, key: i32) -> Result<Bip44Key<C>>[src]

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.

pub fn bip44_path(&self) -> &Bip44AccountPath[src]

Accessor for the BIP44 path of the account.

pub fn bip32_path(&self) -> &Path[src]

Accessor for the BIP32 path of the account.

pub fn neuter(&self) -> Bip44PublicAccount<C>[src]

Neuters the account and converts it into its public API

pub fn network(&self) -> &'static dyn Network<Suite = C>[src]

Accessor for the underlying nwtwork.

impl Bip44Account<Secp256k1>[src]

pub fn from_xprv(
    account: i32,
    xprv: impl AsRef<str>,
    network: &'static dyn Network<Suite = Secp256k1>
) -> Result<Bip44Account<Secp256k1>>
[src]

Recreates the private API of a BIP44 account from its parts

pub fn to_xprv(&self) -> String[src]

Returns the extended private key in the BIP32 readable format with the version bytes of the network.

Trait Implementations

impl<C: Clone + KeyDerivationCrypto + 'static> Clone for Bip44Account<C>[src]

impl<C: Debug + KeyDerivationCrypto + 'static> Debug for Bip44Account<C>[src]

Auto Trait Implementations

impl<C> !RefUnwindSafe for Bip44Account<C>

impl<C> !Send for Bip44Account<C>

impl<C> !Sync for Bip44Account<C>

impl<C> Unpin for Bip44Account<C> where
    <C as KeyDerivationCrypto>::ExtendedPrivateKey: Unpin

impl<C> !UnwindSafe for Bip44Account<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,