From e76a91adff185d495ddcf4ad34ab2318901835db Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 23 Jun 2022 22:51:05 +0000 Subject: [PATCH] Document how to obtain inputs for `Builder::add_spend` Closes zcash/orchard#244. --- src/builder.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/builder.rs b/src/builder.rs index 8ccc6274..fd1e9fd5 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -236,8 +236,16 @@ impl Builder { /// Adds a note to be spent in this transaction. /// + /// - `note` is a spendable note, obtained by trial-decrypting an [`Action`] using the + /// [`zcash_note_encryption`] crate instantiated with [`OrchardDomain`]. + /// - `merkle_path` can be obtained using the [`incrementalmerkletree`] crate + /// instantiated with [`MerkleHashOrchard`]. + /// /// Returns an error if the given Merkle path does not have the required anchor for /// the given note. + /// + /// [`OrchardDomain`]: crate::note_encryption::OrchardDomain + /// [`MerkleHashOrchard`]: crate::tree::MerkleHashOrchard pub fn add_spend( &mut self, fvk: FullViewingKey,