Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cbc2f40

Browse files
committedAug 7, 2023
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 fe89ea2 commit cbc2f40

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
@@ -140,6 +140,10 @@ use std::error;
140140
use bitcoin::blockdata::{opcodes, script};
141141
use bitcoin::hashes::{hash160, ripemd160, sha256, Hash};
142142
use bitcoin::locktime::absolute;
143+
/// `ScriptContext` alias to make usage of the library more ergonomic by reducing naming conflicts.
144+
pub use Context as ScriptContext;
145+
/// `MiniscriptKey` alias to make usage of the library more ergonomic by reducing naming conflicts.
146+
pub use Key as MiniscriptKey;
143147

144148
pub use crate::descriptor::{DefiniteDescriptorKey, Descriptor, DescriptorPublicKey};
145149
pub use crate::interpreter::Interpreter;

0 commit comments

Comments
 (0)
Please sign in to comment.