Skip to content

Commit

Permalink
Fill out note components
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Feb 8, 2021
1 parent bf9e77b commit 5bce857
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/note.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,39 @@
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 {
/// The recipient of the funds.
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 {
Expand Down

0 comments on commit 5bce857

Please sign in to comment.