Document how to obtain inputs for `Builder::add_spend`

Closes zcash/orchard#244.
This commit is contained in:
Jack Grigg 2022-06-23 22:51:05 +00:00
parent 1a1c3c30b0
commit e76a91adff
1 changed files with 8 additions and 0 deletions

View File

@ -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,