pub struct AccountPubKey(/* private fields */);
Expand description
A BIP44 public key at the account path level m/44'/<coin_type>'/<account>'
.
This provides the necessary derivation capability for the transparent component of a unified full viewing key.
Implementations§
Source§impl AccountPubKey
impl AccountPubKey
Sourcepub fn derive_external_ivk(&self) -> Result<ExternalIvk, Error>
pub fn derive_external_ivk(&self) -> Result<ExternalIvk, Error>
Derives the BIP44 public key at the external “change level” path
m/44'/<coin_type>'/<account>'/0
.
Sourcepub fn derive_internal_ivk(&self) -> Result<InternalIvk, Error>
pub fn derive_internal_ivk(&self) -> Result<InternalIvk, Error>
Derives the BIP44 public key at the internal “change level” path
m/44'/<coin_type>'/<account>'/1
.
Sourcepub fn derive_ephemeral_ivk(&self) -> Result<EphemeralIvk, Error>
pub fn derive_ephemeral_ivk(&self) -> Result<EphemeralIvk, Error>
Derives the public key at the “ephemeral” path
m/44'/<coin_type>'/<account>'/2
.
Sourcepub fn derive_address_pubkey(
&self,
scope: TransparentKeyScope,
address_index: NonHardenedChildIndex,
) -> Result<PublicKey, Error>
pub fn derive_address_pubkey( &self, scope: TransparentKeyScope, address_index: NonHardenedChildIndex, ) -> Result<PublicKey, Error>
Derives the BIP44 public key at the “address level” path corresponding to the given scope and address index.
Sourcepub fn derive_pubkey_at_bip32_path<P: Parameters>(
&self,
params: &P,
expected_account_index: AccountId,
path: &[ChildNumber],
) -> Result<PublicKey, Error>
pub fn derive_pubkey_at_bip32_path<P: Parameters>( &self, params: &P, expected_account_index: AccountId, path: &[ChildNumber], ) -> Result<PublicKey, Error>
Derives the public key corresponding to the given full BIP 32 path.
This enforces that the path has a prefix that could have been used to derive this
AccountPubKey
.
Sourcepub fn ovks_for_shielding(&self) -> (InternalOvk, ExternalOvk)
pub fn ovks_for_shielding(&self) -> (InternalOvk, ExternalOvk)
Derives the internal ovk and external ovk corresponding to this transparent fvk. As specified in ZIP 316.
Sourcepub fn internal_ovk(&self) -> InternalOvk
pub fn internal_ovk(&self) -> InternalOvk
Derives the internal ovk corresponding to this transparent fvk.
Sourcepub fn external_ovk(&self) -> ExternalOvk
pub fn external_ovk(&self) -> ExternalOvk
Derives the external ovk corresponding to this transparent fvk.
pub fn serialize(&self) -> Vec<u8> ⓘ
pub fn deserialize(data: &[u8; 65]) -> Result<Self, Error>
Trait Implementations§
Source§impl Clone for AccountPubKey
impl Clone for AccountPubKey
Source§fn clone(&self) -> AccountPubKey
fn clone(&self) -> AccountPubKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for AccountPubKey
impl RefUnwindSafe for AccountPubKey
impl Send for AccountPubKey
impl Sync for AccountPubKey
impl Unpin for AccountPubKey
impl UnwindSafe for AccountPubKey
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more