Skip to content

Instantly share code, notes, and snippets.

// 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);