Skip to content

Commit f531be3

Browse files
committed
Merge rust-bitcoin#348: Re-export types to reduce breaking changes downstream
eab549c Re-export types to reduce breaking changes downstream (sanket1729) Pull request description: . ACKs for top commit: elichai: ACK eab549c apoelstra: ACK eab549c Tree-SHA512: ca3b2c09d68f3401302528779eff4de3204680bd1bbb1795df8e397e562d6e8c10781e083b97c0c3e81c754d70197852e55640976a879b2e8c4584905026736c
2 parents 6a89320 + eab549c commit f531be3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/lib.rs

+19
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,25 @@ pub use context::global::SECP256K1;
168168
#[cfg(feature = "bitcoin_hashes")]
169169
use hashes::Hash;
170170

171+
// Backwards compatible changes
172+
/// Schnorr Sig related methods
173+
#[deprecated(since = "0.21.0", note = "Use schnorr instead.")]
174+
pub mod schnorrsig {
175+
#[deprecated(since = "0.21.0", note = "Use crate::XOnlyPublicKey instead.")]
176+
/// backwards compatible re-export of xonly key
177+
pub type PublicKey = super::XOnlyPublicKey;
178+
/// backwards compatible re-export of keypair
179+
#[deprecated(since = "0.21.0", note = "Use crate::KeyPair instead.")]
180+
pub type KeyPair = super::KeyPair;
181+
/// backwards compatible re-export of schnorr signatures
182+
#[deprecated(since = "0.21.0", note = "Use schnorr::Signature instead.")]
183+
pub type Signature = super::schnorr::Signature;
184+
}
185+
186+
#[deprecated(since = "0.21.0", note = "Use ecdsa::Signature instead.")]
187+
/// backwards compatible re-export of ecdsa signatures
188+
pub type Signature = ecdsa::Signature;
189+
171190
/// Trait describing something that promises to be a 32-byte random number; in particular,
172191
/// it has negligible probability of being zero or overflowing the group order. Such objects
173192
/// may be converted to `Message`s without any error paths.

0 commit comments

Comments
 (0)