Add multiple types to lay out NotePlaintext's for sprout and sapling
This commit is contained in:
parent
1a10975389
commit
8aefadd00f
|
@ -2,3 +2,9 @@
|
|||
mod memo;
|
||||
mod sapling;
|
||||
mod sprout;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct Diversifier(pub [u8; 11]);
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct NoteCommitmentRandomness(pub [u8; 32]);
|
||||
|
|
|
@ -5,6 +5,21 @@ use proptest::{arbitrary::Arbitrary, collection::vec, prelude::*};
|
|||
|
||||
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
|
||||
|
||||
use super::{Diversifier, Memo, NoteCommitmentRandomness};
|
||||
|
||||
pub struct Note {
|
||||
value: u64,
|
||||
diversifier: Diversifier,
|
||||
}
|
||||
|
||||
pub struct NotePlaintext {
|
||||
diversifier: Diversifier,
|
||||
value: u64,
|
||||
// TODO: refine as jub-jub appropriate in the base field.
|
||||
note_committment_randomness: NoteCommitmentRandomness,
|
||||
memo: Memo,
|
||||
}
|
||||
|
||||
/// A ciphertext component for encrypted output notes.
|
||||
pub struct EncryptedCiphertext(pub [u8; 580]);
|
||||
|
||||
|
|
|
@ -8,6 +8,17 @@ use proptest::{collection::vec, prelude::*};
|
|||
|
||||
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
|
||||
|
||||
pub struct Note {}
|
||||
|
||||
pub struct NotePlaintext {
|
||||
value: u64,
|
||||
// TODO: refine type
|
||||
rho: [u8; 32],
|
||||
// TODO: refine as jub-jub appropriate in the base field.
|
||||
note_committment_randomness: NoteCommitmentRandomness,
|
||||
memo: Memo,
|
||||
}
|
||||
|
||||
/// A ciphertext component for encrypted output notes.
|
||||
pub struct EncryptedCiphertext(pub [u8; 601]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue