Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/zcash_address/src/kind/unified/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use alloc::vec::Vec;
use core::convert::{TryFrom, TryInto};

/// The set of known Receivers for Unified Addresses.
///
/// Defined in [ZIP 316][zip-0316].
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum Receiver {
Orchard([u8; 43]),
Expand All @@ -24,6 +26,7 @@ impl TryFrom<(u32, &[u8])> for Receiver {
Typecode::P2sh => addr.try_into().map(Receiver::P2sh),
Typecode::Sapling => addr.try_into().map(Receiver::Sapling),
Typecode::Orchard => addr.try_into().map(Receiver::Orchard),
// Preserve unknown typecodes for forward compatibility.
Typecode::Unknown(_) => Ok(Receiver::Unknown {
typecode,
data: addr.to_vec(),
Expand Down
2 changes: 1 addition & 1 deletion components/zcash_address/src/kind/unified/fvk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Container for Ufvk {
/// Returns the FVKs contained within this UFVK, in the order they were
/// parsed from the string encoding.
///
/// This API is for advanced usage; in most cases you should use `Ufvk::receivers`.
/// This API is for advanced usage; in most cases you should use `Ufvk::items`.
fn items_as_parsed(&self) -> &[Fvk] {
&self.0
}
Expand Down