zebra_chain/sapling/
note.rs

1//! Sapling notes
2
3mod ciphertexts;
4mod nullifiers;
5
6#[cfg(any(test, feature = "proptest-impl"))]
7mod arbitrary;
8
9use crate::{
10    amount::{Amount, NonNegative},
11    transaction::Memo,
12};
13
14use super::{
15    commitment::CommitmentRandomness,
16    keys::{Diversifier, TransmissionKey},
17};
18
19pub use ciphertexts::{EncryptedNote, WrappedNoteKey};
20
21pub use nullifiers::Nullifier;
22
23/// 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#[derive(Clone, Debug)]
27pub struct Note {
28    /// The diversifer of the recipient's shielded payment address.
29    pub diversifier: Diversifier,
30    /// The diversified transmission key of the recipient's shielded
31    /// payment address.
32    pub transmission_key: TransmissionKey,
33    /// An integer representing the value of the note in zatoshi.
34    pub value: Amount<NonNegative>,
35    /// A random commitment trapdoor used to produce the associated
36    /// note commitment.
37    pub rcm: CommitmentRandomness,
38    /// The note memo, after decryption
39    pub memo: Memo,
40}