Skip to content

Commit 43e2424

Browse files
committed
Add MiniscriptKey alias to Key
We just renamed the `MinscriptKey` trait to `Key`, add an alias to the original name. This helps backwards compatibility but also makes the library more ergonomic since `Key` is so generic it could conflict with other names in downstream crates.
1 parent 35a9141 commit 43e2424

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ pub use crate::miniscript::satisfy::{Preimage32, Satisfier};
148148
pub use crate::miniscript::{hash256, Miniscript};
149149
use crate::prelude::*;
150150

151+
/// Export a type alias to make usage of the library more ergonomic since the
152+
/// `Key` trait name is so generic that it may cause naming conflicts.
153+
pub use Key as MiniscriptKey;
154+
151155
///Public key trait which can be converted to Hash type
152156
pub trait Key: Clone + Eq + Ord + fmt::Debug + fmt::Display + hash::Hash {
153157
/// Returns true if the pubkey is uncompressed. Defaults to `false`.

0 commit comments

Comments
 (0)