Skip to content

Commit 0e3635f

Browse files
committed
Improve docs on trait MiniscriptKey
As part of refactoring the trait `MiniscriptKey`; improve the rustdocs on the trait.
1 parent 6fe4bce commit 0e3635f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/lib.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,22 @@ pub use descriptor::pretaproot::{traits::PreTaprootDescriptorTrait, PreTaprootDe
134134

135135
///Public key trait which can be converted to Hash type
136136
pub trait MiniscriptKey: Clone + Eq + Ord + fmt::Debug + fmt::Display + hash::Hash {
137-
/// Check if the publicKey is uncompressed. The default
138-
/// implementation returns false
137+
/// Returns true if the pubkey is uncompressed. Defaults to `false`.
139138
fn is_uncompressed(&self) -> bool {
140139
false
141140
}
142141

143-
/// Check if the publicKey is x-only. The default
144-
/// implementation returns false
145-
//
142+
/// Returns true if the pubkey is an x-only pubkey. Defaults to `false`.
146143
// This is required to know what in DescriptorPublicKey to know whether the inner
147144
// key in allowed in descriptor context
148145
fn is_x_only_key(&self) -> bool {
149146
false
150147
}
151148

152-
/// The associated Hash type with the publicKey
149+
/// The associated [`Hash`] type for this pubkey.
153150
type Hash: Clone + Eq + Ord + fmt::Display + fmt::Debug + hash::Hash;
154151

155-
/// Converts an object to PublicHash
152+
/// Converts this key to the associated pubkey hash.
156153
fn to_pubkeyhash(&self) -> Self::Hash;
157154
}
158155

0 commit comments

Comments
 (0)