1//! Sprout notes
23mod ciphertexts;
4mod mac;
5mod nullifiers;
67#[cfg(any(test, feature = "proptest-impl"))]
8mod arbitrary;
910use crate::{
11 amount::{Amount, NonNegative},
12 transaction::Memo,
13};
1415use super::{commitment::CommitmentRandomness, keys::PayingKey};
1617pub use mac::Mac;
1819pub use ciphertexts::EncryptedNote;
2021pub use nullifiers::{Nullifier, NullifierSeed};
2223/// A Note represents that a value is spendable by the recipient who
24/// holds the spending key corresponding to a given shielded payment
25/// address.
26///
27/// <https://zips.z.cash/protocol/protocol.pdf#notes>
28#[derive(Clone, Debug)]
29#[cfg_attr(
30 any(test, feature = "proptest-impl"),
31 derive(proptest_derive::Arbitrary)
32)]
33pub struct Note {
34/// The paying key of the recipient's shielded payment address
35pub paying_key: PayingKey,
36/// An integer representing the value of the note in zatoshi (1 ZEC
37 /// = 10^8 zatoshi)
38pub value: Amount<NonNegative>,
39/// Input to PRF^nf to derive the nullifier of the note
40pub rho: NullifierSeed,
41/// A random commitment trapdoor
42pub rcm: CommitmentRandomness,
43/// The note memo, after decryption
44pub memo: Memo,
45}