mirror of https://github.com/zcash/orchard.git
Document how to obtain inputs for `Builder::add_spend`
Closes zcash/orchard#244.
This commit is contained in:
parent
1a1c3c30b0
commit
e76a91adff
|
@ -236,8 +236,16 @@ impl Builder {
|
||||||
|
|
||||||
/// Adds a note to be spent in this transaction.
|
/// 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
|
/// Returns an error if the given Merkle path does not have the required anchor for
|
||||||
/// the given note.
|
/// the given note.
|
||||||
|
///
|
||||||
|
/// [`OrchardDomain`]: crate::note_encryption::OrchardDomain
|
||||||
|
/// [`MerkleHashOrchard`]: crate::tree::MerkleHashOrchard
|
||||||
pub fn add_spend(
|
pub fn add_spend(
|
||||||
&mut self,
|
&mut self,
|
||||||
fvk: FullViewingKey,
|
fvk: FullViewingKey,
|
||||||
|
|
Loading…
Reference in New Issue