Skip to content

Commit d794371

Browse files
committed
Add MiniscriptKey and ScriptContext aliases
We just renamed the `MinscriptKey` trait to `Key` and `ScriptContext` to `Context`. Add an alias for each of them to the original name. This helps backwards compatibility but also makes the library more ergonomic since the new names are so generic they could cause naming conflicts in downstream crates.
1 parent 35a9141 commit d794371

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ use std::error;
138138
use bitcoin::blockdata::{opcodes, script};
139139
use bitcoin::hashes::{hash160, ripemd160, sha256, Hash};
140140
use bitcoin::locktime::absolute;
141+
/// `ScriptContext` alias to make usage of the library more ergonomic by reducing naming conflicts.
142+
pub use Context as ScriptContext;
143+
/// `MiniscriptKey` alias to make usage of the library more ergonomic by reducing naming conflicts.
144+
pub use Key as MiniscriptKey;
141145

142146
pub use crate::descriptor::{DefiniteDescriptorKey, Descriptor, DescriptorPublicKey};
143147
pub use crate::interpreter::Interpreter;

0 commit comments

Comments
 (0)