pub enum TransparentSpendAuthority {
SpendingKey(TransparentSpendingKey),
Derived,
}
Expand description
The cryptographic authorization needed to spend funds from a transparent Zcash address.
TransparentSpendAuthority
represents the spending capability for transparent
addresses (those starting with ‘t’). It distinguishes between directly stored keys
and keys that are derived from another source, such as an HD wallet seed.
§Zcash Concept Relation
In Zcash’s transparent address system (inherited from Bitcoin):
- Spending requires proving ownership through cryptographic signatures
- This typically involves a private key corresponding to a public key hash (P2PKH) or a script hash (P2SH)
- In hierarchical deterministic (HD) wallets, transparent keys are often derived from a master seed using BIP-44 paths
§Data Preservation
During wallet migration, the TransparentSpendAuthority
preserves:
- Directly stored spending keys that exist in the source wallet
- Information about keys that are derived from HD wallet seeds
This ensures that spending capability is maintained after migration while preserving the wallet’s key management structure.
§Examples
// Direct spending key
let spending_key = TransparentSpendingKey::new([0; 32]);
let spend_authority = TransparentSpendAuthority::SpendingKey(spending_key);
// Derived key (from HD wallet seed)
let derived_authority = TransparentSpendAuthority::Derived;
Variants§
SpendingKey(TransparentSpendingKey)
Direct spending key stored in the wallet
Derived
Spending key derived from another source (e.g., HD wallet seed) The actual derivation information is typically stored with the address
Trait Implementations§
Source§impl Clone for TransparentSpendAuthority
impl Clone for TransparentSpendAuthority
Source§fn clone(&self) -> TransparentSpendAuthority
fn clone(&self) -> TransparentSpendAuthority
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TransparentSpendAuthority
impl Debug for TransparentSpendAuthority
Source§impl From<TransparentSpendAuthority> for Envelope
impl From<TransparentSpendAuthority> for Envelope
Source§fn from(value: TransparentSpendAuthority) -> Self
fn from(value: TransparentSpendAuthority) -> Self
Source§impl TryFrom<Envelope> for TransparentSpendAuthority
impl TryFrom<Envelope> for TransparentSpendAuthority
impl StructuralPartialEq for TransparentSpendAuthority
Auto Trait Implementations§
impl Freeze for TransparentSpendAuthority
impl RefUnwindSafe for TransparentSpendAuthority
impl Send for TransparentSpendAuthority
impl Sync for TransparentSpendAuthority
impl Unpin for TransparentSpendAuthority
impl UnwindSafe for TransparentSpendAuthority
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> EnvelopeEncodable for T
impl<T> EnvelopeEncodable for T
Source§fn into_envelope(self) -> Envelope
fn into_envelope(self) -> Envelope
Converts the value into an envelope by using its Into<Envelope>
implementation.
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