pub struct BtcAccount { /* private fields */ }Expand description
Bitcoin-specific derived account: unified DerivedAccount plus WIF,
address type, and structured path.
Implementations§
Source§impl BtcAccount
impl BtcAccount
Sourcepub const fn private_key_wif(&self) -> &Zeroizing<String>
pub const fn private_key_wif(&self) -> &Zeroizing<String>
Private key in WIF, zeroized on drop.
Sourcepub const fn address_type(&self) -> AddressType
pub const fn address_type(&self) -> AddressType
Address type used for this account.
Sourcepub const fn bip32_path(&self) -> &DerivationPath
pub const fn bip32_path(&self) -> &DerivationPath
Structured BIP-32 path.
Sourcepub const fn as_derived_account(&self) -> &DerivedAccount
pub const fn as_derived_account(&self) -> &DerivedAccount
Borrow the unified account.
Sourcepub fn into_derived_account(self) -> DerivedAccount
pub fn into_derived_account(self) -> DerivedAccount
Consume into the unified account.
Methods from Deref<Target = DerivedAccount>§
Sourcepub fn private_key_bytes(&self) -> &Zeroizing<[u8; 32]>
pub fn private_key_bytes(&self) -> &Zeroizing<[u8; 32]>
Raw 32-byte private key (zeroized on drop).
Sourcepub fn private_key_hex(&self) -> Zeroizing<String>
pub fn private_key_hex(&self) -> Zeroizing<String>
Lowercase hex-encoded private key (64 chars, zeroized on drop).
Sourcepub fn public_key(&self) -> &DerivedPublicKey
pub fn public_key(&self) -> &DerivedPublicKey
Typed public key, carrying algorithm + length information at the type level.
Sourcepub fn public_key_bytes(&self) -> &[u8] ⓘ
pub fn public_key_bytes(&self) -> &[u8] ⓘ
Public key bytes, chain-specific layout.
For pattern-matching on the algorithm, use
public_key instead.
Sourcepub fn public_key_hex(&self) -> String
pub fn public_key_hex(&self) -> String
Lowercase hex-encoded public key.
Trait Implementations§
Source§impl AsRef<DerivedAccount> for BtcAccount
impl AsRef<DerivedAccount> for BtcAccount
Source§fn as_ref(&self) -> &DerivedAccount
fn as_ref(&self) -> &DerivedAccount
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for BtcAccount
impl Clone for BtcAccount
Source§fn clone(&self) -> BtcAccount
fn clone(&self) -> BtcAccount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BtcAccount
impl Debug for BtcAccount
Source§impl Deref for BtcAccount
impl Deref for BtcAccount
Source§impl From<BtcAccount> for DerivedAccount
impl From<BtcAccount> for DerivedAccount
Source§fn from(btc: BtcAccount) -> Self
fn from(btc: BtcAccount) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BtcAccount
impl RefUnwindSafe for BtcAccount
impl Send for BtcAccount
impl Sync for BtcAccount
impl Unpin for BtcAccount
impl UnsafeUnpin for BtcAccount
impl UnwindSafe for BtcAccount
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