pub enum Ivk {
Orchard([u8; 64]),
Sapling([u8; 64]),
P2pkh([u8; 65]),
Unknown {
typecode: u32,
data: Vec<u8>,
},
}
Expand description
The set of known IVKs for Unified IVKs.
Variants§
Orchard([u8; 64])
The raw encoding of an Orchard Incoming Viewing Key.
(dk, ivk)
each 32 bytes.
Sapling([u8; 64])
Data contained within the Sapling component of a Unified Incoming Viewing Key.
In order to ensure that Unified Addresses can always be derived from UIVKs, we store more data here than was specified to be part of a Sapling IVK. Specifically, we store the same data here as we do for Orchard.
(dk, ivk)
each 32 bytes.
P2pkh([u8; 65])
A pruned version of the extended public key for the BIP 44 account corresponding to the
transparent address subtree from which transparent addresses are derived,
at the external change
BIP 44 path, i.e. m/44'/133'/<account_id>'/0
. This
includes just the chain code (32 bytes) and the compressed public key (33 bytes), and excludes
the depth of in the derivation tree, the parent key fingerprint, and the child key
number (which would reveal the wallet account number for which this UFVK was generated).
Transparent addresses don’t have “viewing keys” - the addresses themselves serve that purpose. However, we want the ability to derive diversified Unified Addresses from Unified Viewing Keys, and to not break the unlinkability property when they include transparent receivers. To achieve this, we treat the last hardened node in the BIP 44 derivation path as the “transparent viewing key”; all addresses derived from this node use non-hardened derivation, and can thus be derived just from this pruned extended public key.
Unknown
Trait Implementations§
impl Eq for Ivk
impl StructuralPartialEq for Ivk
Auto Trait Implementations§
impl Freeze for Ivk
impl RefUnwindSafe for Ivk
impl Send for Ivk
impl Sync for Ivk
impl Unpin for Ivk
impl UnwindSafe for Ivk
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