@@ -27,7 +27,7 @@ use core::str::FromStr;
2727use hashes:: hex:: FromHex ;
2828use hashes:: { Hash , hash160, hex} ;
2929use internals:: write_err;
30- pub use secp256k1:: { self , KeyPair , Parity , Secp256k1 , Verification , XOnlyPublicKey , constants} ;
30+ pub use secp256k1:: { self , Keypair , Parity , Secp256k1 , Verification , XOnlyPublicKey , constants} ;
3131
3232use crate :: hash_types:: { PubkeyHash , WPubkeyHash } ;
3333use crate :: network:: constants:: Network ;
@@ -542,7 +542,7 @@ impl fmt::Display for TweakedPublicKey {
542542}
543543
544544/// Untweaked BIP-340 key pair
545- pub type UntweakedKeyPair = KeyPair ;
545+ pub type UntweakedKeyPair = Keypair ;
546546
547547/// Tweaked BIP-340 key pair
548548///
@@ -563,7 +563,7 @@ pub type UntweakedKeyPair = KeyPair;
563563#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
564564#[ cfg_attr( feature = "serde" , serde( crate = "actual_serde" ) ) ]
565565#[ cfg_attr( feature = "serde" , serde( transparent) ) ]
566- pub struct TweakedKeyPair ( KeyPair ) ;
566+ pub struct TweakedKeyPair ( Keypair ) ;
567567
568568/// A trait for tweaking BIP340 key types (x-only public keys and key pairs).
569569pub trait TapTweak {
@@ -693,11 +693,11 @@ impl TweakedKeyPair {
693693 /// This method is dangerous and can lead to loss of funds if used incorrectly.
694694 /// Specifically, in multi-party protocols a peer can provide a value that allows them to steal.
695695 #[ inline]
696- pub fn dangerous_assume_tweaked ( pair : KeyPair ) -> TweakedKeyPair { TweakedKeyPair ( pair) }
696+ pub fn dangerous_assume_tweaked ( pair : Keypair ) -> TweakedKeyPair { TweakedKeyPair ( pair) }
697697
698698 /// Returns the underlying key pair.
699699 #[ inline]
700- pub fn to_inner ( self ) -> KeyPair { self . 0 }
700+ pub fn to_inner ( self ) -> Keypair { self . 0 }
701701
702702 /// Returns the [`TweakedPublicKey`] and its [`Parity`] for this [`TweakedKeyPair`].
703703 #[ inline]
@@ -712,7 +712,7 @@ impl From<TweakedPublicKey> for XOnlyPublicKey {
712712 fn from ( pair : TweakedPublicKey ) -> Self { pair. 0 }
713713}
714714
715- impl From < TweakedKeyPair > for KeyPair {
715+ impl From < TweakedKeyPair > for Keypair {
716716 #[ inline]
717717 fn from ( pair : TweakedKeyPair ) -> Self { pair. 0 }
718718}
@@ -1048,7 +1048,7 @@ mod tests {
10481048 use secp256k1:: rand;
10491049
10501050 let secp = Secp256k1 :: new ( ) ;
1051- let kp = KeyPair :: new ( & secp, & mut rand:: thread_rng ( ) ) ;
1051+ let kp = Keypair :: new ( & secp, & mut rand:: thread_rng ( ) ) ;
10521052
10531053 let _ = PublicKey :: new ( kp) ;
10541054 let _ = PublicKey :: new_uncompressed ( kp) ;
0 commit comments