diff --git a/src/lib.rs b/src/lib.rs index 711e3fe65..5bac1c908 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -390,7 +390,8 @@ impl hash::Hash for DummySha256Hash { } } -/// Provides the conversion information required in [`TranslatePk`] +/// Describes an object that can translate various keys and hashes from one key to the type +/// associated with the other key. Used by the [`TranslatePk`] trait to do the actual translations. pub trait Translator
where P: MiniscriptKey, @@ -440,12 +441,8 @@ where } } -/// Converts a descriptor using abstract keys to one using specific keys. -/// -/// # Panics -/// -/// If `fpk` returns an uncompressed key when converting to a segwit descriptor. -/// To prevent this panic, ensure `fpk` returns an error in this case instead. +/// Converts a descriptor using abstract keys to one using specific keys. Uses translator `t` to do +/// the actual translation function calls. pub trait TranslatePk
where
P: MiniscriptKey,
@@ -454,9 +451,8 @@ where
/// The associated output type. This must be `Self ;
`.
type Output;
- /// Translates a struct from one generic to another where the translation
- /// for Pk is provided by function `fpk`, and translation for PkH is
- /// provided by function `fpkh`.
+ /// Translates a struct from one generic to another where the translations
+ /// for Pk are provided by the given [`Translator`].
fn translate_pk