Skip to content

Commit eb40a7b

Browse files
Improve the AssetProvider docs
1 parent 6151612 commit eb40a7b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/plan.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ use crate::{DefiniteDescriptorKey, DescriptorPublicKey, Error, MiniscriptKey, To
3333

3434
/// Trait describing a present/missing lookup table for constructing witness templates
3535
///
36-
/// This trait mirrors the [`Satisfier`] trait with the difference that instead of returning the
37-
/// item if it's present, it only returns a boolean to indicate its presence.
36+
/// This trait mirrors the [`Satisfier`] trait, with the difference that most methods just return a
37+
/// boolean indicating the item presence. The methods looking up keys return the key
38+
/// length, the methods looking up public key hashes return the public key, and a few other methods
39+
/// need to return the item itself.
3840
///
3941
/// This trait is automatically implemented for every type that is also a satisfier, and simply
4042
/// proxies the queries to the satisfier and returns whether an item is available or not.
4143
///
42-
/// All the methods have a default implementation that returns `false`.
44+
/// All the methods have a default implementation that returns `false` or `None`.
4345
pub trait AssetProvider<Pk: MiniscriptKey> {
4446
/// Given a public key, look up an ECDSA signature with that key
4547
fn provider_lookup_ecdsa_sig(&self, _: &Pk) -> bool {

0 commit comments

Comments
 (0)