This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create note & commitment | |
let note = to | |
.create_note(value, Fs::random(&mut rng), &JUBJUB) | |
.unwrap(); | |
let cm = Node::new(note.cm(&JUBJUB).into_repr()); | |
// create empty commitment tree and add commitment | |
let mut tree = CommitmentTree::new(); | |
tree.append(cm).unwrap(); | |
let witness = IncrementalWitness::from_tree(&tree); |