orchard/src/note.rs

35 lines
746 B
Rust
Raw Normal View History

use crate::{keys::FullViewingKey, value::NoteValue, Address};
2021-01-20 12:09:09 -08:00
/// A discrete amount of funds received by an address.
#[derive(Debug)]
pub struct Note {
2021-01-20 12:09:09 -08:00
/// The recipient of the funds.
recipient: Address,
2021-01-20 12:09:09 -08:00
/// The value of this note.
value: NoteValue,
2021-01-20 12:09:09 -08:00
}
impl Note {
2021-01-20 12:09:09 -08:00
/// Derives the commitment to this note.
pub fn commitment(&self) -> NoteCommitment {
todo!()
}
/// Derives the nullifier for this note.
pub fn nullifier(&self, _: &FullViewingKey) -> Nullifier {
2021-01-20 12:09:09 -08:00
todo!()
}
}
/// An encrypted note.
#[derive(Debug)]
pub struct EncryptedNote;
/// A commitment to a note.
#[derive(Debug)]
pub struct NoteCommitment;
/// A unique nullifier for a note.
#[derive(Debug)]
pub struct Nullifier;