diff --git a/zebra-chain/src/sapling/note.rs b/zebra-chain/src/sapling/note.rs index 9789daece..5425cf48a 100644 --- a/zebra-chain/src/sapling/note.rs +++ b/zebra-chain/src/sapling/note.rs @@ -26,6 +26,7 @@ pub use nullifiers::Nullifier; /// A Note represents that a value is spendable by the recipient who /// holds the spending key corresponding to a given shielded payment /// address. +#[derive(Clone, Debug)] pub struct Note { /// The diversifer of the recipient’s shielded payment address. pub diversifier: Diversifier, @@ -37,12 +38,6 @@ pub struct Note { /// A random commitment trapdoor used to produce the associated /// note commitment. pub rcm: CommitmentRandomness, -} - -/// The decrypted form of encrypted Sapling notes on the blockchain. -pub struct NotePlaintext { - diversifier: Diversifier, - value: Amount, - rcm: CommitmentRandomness, - memo: Memo, + /// The note memo, after decryption + pub memo: Memo, } diff --git a/zebra-chain/src/sprout/note.rs b/zebra-chain/src/sprout/note.rs index 16ffac985..860da6c2b 100644 --- a/zebra-chain/src/sprout/note.rs +++ b/zebra-chain/src/sprout/note.rs @@ -27,7 +27,7 @@ pub use nullifiers::{Nullifier, NullifierSeed}; /// address. /// /// https://zips.z.cash/protocol/protocol.pdf#notes -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Debug)] #[cfg_attr(test, derive(proptest_derive::Arbitrary))] pub struct Note { /// The paying key of the recipient’s shielded payment address @@ -39,14 +39,6 @@ pub struct Note { pub rho: NullifierSeed, /// A random commitment trapdoor pub rcm: CommitmentRandomness, -} - -/// The decrypted form of encrypted Sprout notes on the blockchain. -#[derive(Clone, Debug)] -#[cfg_attr(test, derive(proptest_derive::Arbitrary))] -pub struct NotePlaintext { - value: Amount, - rho: NullifierSeed, - rcm: CommitmentRandomness, - memo: Memo, + /// The note memo, after decryption + pub memo: Memo, }