11// SPDX-License-Identifier: CC0-1.0
22
3- //! A spending plan or *plan* for short is a representation of a particular spending path on a
4- //! descriptor. This allows us to analayze a choice of spending path without producing any
3+ //! A spending plan (or *plan*) is a representation of a particular spending path on a
4+ //! descriptor.
5+ //!
6+ //! This allows us to analayze a choice of spending path without producing any
57//! signatures or other witness data for it.
68//!
79//! To make a plan you provide the descriptor with "assets" like which keys you are able to use, hash
@@ -67,7 +69,9 @@ pub trait AssetProvider<Pk: MiniscriptKey> {
6769 }
6870
6971 /// Given a keyhash, look up the EC signature and the associated key.
72+ ///
7073 /// Returns the key if a signature is found.
74+ ///
7175 /// Even if signatures for public key Hashes are not available, the users
7276 /// can use this map to provide pkh -> pk mapping which can be useful
7377 /// for dissatisfying pkh.
@@ -76,7 +80,9 @@ pub trait AssetProvider<Pk: MiniscriptKey> {
7680 }
7781
7882 /// Given a keyhash, look up the schnorr signature and the associated key.
83+ ///
7984 /// Returns the key and sig len if a signature is found.
85+ ///
8086 /// Even if signatures for public key Hashes are not available, the users
8187 /// can use this map to provide pkh -> pk mapping which can be useful
8288 /// for dissatisfying pkh.
@@ -211,7 +217,9 @@ where
211217 fn check_after ( & self , l : absolute:: LockTime ) -> bool { Satisfier :: check_after ( self , l) }
212218}
213219
214- /// Representation of a particular spending path on a descriptor. Contains the witness template
220+ /// Representation of a particular spending path on a descriptor.
221+ ///
222+ /// Contains the witness template
215223/// and the timelocks needed for satisfying the plan.
216224/// Calling `plan` on a Descriptor will return this structure,
217225/// containing the cheapest spending path possible (considering the `Assets` given)
@@ -499,7 +507,9 @@ impl TaprootAvailableLeaves {
499507/// The Assets we can use to satisfy a particular spending path
500508#[ derive( Debug , Default ) ]
501509pub struct Assets {
502- /// Keys the user can sign for, and how. A pair `(fingerprint, derivation_path)` is
510+ /// Keys the user can sign for, and how.
511+ ///
512+ /// A pair `(fingerprint, derivation_path)` is
503513 /// provided, meaning that the user can sign using the key with `fingerprint`,
504514 /// derived with either `derivation_path` or a derivation path that extends `derivation_path`
505515 /// by exactly one child number. For example, if the derivation path `m/0/1` is provided, the
0 commit comments