Add memo to Note, remove NotePlaintext

This commit is contained in:
Deirdre Connolly 2020-08-28 03:54:31 -04:00 committed by Deirdre Connolly
parent 5258e891dc
commit d795b8bfd9
2 changed files with 6 additions and 19 deletions

View File

@ -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 recipients 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<NonNegative>,
rcm: CommitmentRandomness,
memo: Memo,
/// The note memo, after decryption
pub memo: Memo,
}

View File

@ -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 recipients 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<NonNegative>,
rho: NullifierSeed,
rcm: CommitmentRandomness,
memo: Memo,
/// The note memo, after decryption
pub memo: Memo,
}