Fill out note components

This commit is contained in:
Jack Grigg 2021-02-08 15:21:04 +00:00
parent bf9e77b629
commit 5bce857569
1 changed files with 27 additions and 0 deletions

View File

@ -1,5 +1,23 @@
use crate::{keys::FullViewingKey, value::NoteValue, Address};
/// The ZIP 212 seed randomness for a note.
#[derive(Debug)]
struct RandomSeed([u8; 32]);
impl RandomSeed {
fn psi(&self) -> () {
todo!()
}
fn rcm(&self) -> () {
todo!()
}
fn esk(&self) -> () {
todo!()
}
}
/// A discrete amount of funds received by an address.
#[derive(Debug)]
pub struct Note {
@ -7,6 +25,15 @@ pub struct Note {
recipient: Address,
/// The value of this note.
value: NoteValue,
/// A unique creation ID for this note.
///
/// This is set to the nullifier of the note that was spent in the [`Action`] that
/// created this note.
///
/// [`Action`]: crate::bundle::Action
rho: Nullifier,
/// The seed randomness for various note components.
rseed: RandomSeed,
}
impl Note {