Add memo to Note, remove NotePlaintext
This commit is contained in:
parent
5258e891dc
commit
d795b8bfd9
|
@ -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<NonNegative>,
|
||||
rcm: CommitmentRandomness,
|
||||
memo: Memo,
|
||||
/// The note memo, after decryption
|
||||
pub memo: Memo,
|
||||
}
|
||||
|
|
|
@ -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<NonNegative>,
|
||||
rho: NullifierSeed,
|
||||
rcm: CommitmentRandomness,
|
||||
memo: Memo,
|
||||
/// The note memo, after decryption
|
||||
pub memo: Memo,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue