@@ -24,7 +24,7 @@ use std::convert::TryFrom;
2424use std:: fmt;
2525
2626use bitcoin:: blockdata:: script:: { self , PushBytes } ;
27- use bitcoin:: { self , ScriptBuf as BtcScript , Weight } ;
27+ use bitcoin:: { self , PublicKey , ScriptBuf as BtcScript , Weight } ;
2828use elements:: secp256k1_zkp;
2929
3030use crate :: descriptor:: checksum:: { self , verify_checksum} ;
@@ -41,7 +41,7 @@ use crate::{
4141#[ derive( Clone , Ord , PartialOrd , Eq , PartialEq ) ]
4242pub struct Pegin < Pk : MiniscriptKey > {
4343 /// The untweaked pegin bitcoin descriptor
44- pub fed_desc : BtcDescriptor < Pk > ,
44+ pub fed_desc : BtcDescriptor < PublicKey > ,
4545 /// The redeem elements descriptor
4646 ///
4747 /// TODO: Allow pegin redeem descriptor with extensions
@@ -51,7 +51,7 @@ pub struct Pegin<Pk: MiniscriptKey> {
5151impl < Pk : MiniscriptKey > Pegin < Pk > {
5252 /// Create a new LegacyPegin descriptor
5353 pub fn new (
54- fed_desc : BtcDescriptor < Pk > ,
54+ fed_desc : BtcDescriptor < PublicKey > ,
5555 elem_desc : Descriptor < Pk , CovenantExt < CovExtArgs > > ,
5656 ) -> Self {
5757 Self {
@@ -76,15 +76,15 @@ impl<Pk: MiniscriptKey> fmt::Display for Pegin<Pk> {
7676 }
7777}
7878
79- impl < Pk : MiniscriptKey > Liftable < Pk > for Pegin < Pk > {
80- fn lift ( & self ) -> Result < semantic:: Policy < Pk > , Error > {
79+ impl < Pk : MiniscriptKey > Liftable < PublicKey > for Pegin < Pk > {
80+ fn lift ( & self ) -> Result < semantic:: Policy < PublicKey > , Error > {
8181 let btc_pol = BtcLiftable :: lift ( & self . fed_desc ) ?;
8282 Liftable :: lift ( & btc_pol)
8383 }
8484}
8585
86- impl < Pk : MiniscriptKey > BtcLiftable < Pk > for Pegin < Pk > {
87- fn lift ( & self ) -> Result < BtcPolicy < Pk > , BtcError > {
86+ impl < Pk : MiniscriptKey > BtcLiftable < PublicKey > for Pegin < Pk > {
87+ fn lift ( & self ) -> Result < BtcPolicy < PublicKey > , BtcError > {
8888 self . fed_desc . lift ( )
8989 }
9090}
@@ -101,7 +101,7 @@ impl_from_tree!(
101101 // TODO: Confirm with Andrew about the descriptor type for dynafed
102102 // Assuming sh(wsh) for now.
103103
104- let fed_desc = BtcDescriptor :: <Pk >:: from_tree( & ms_expr) ?;
104+ let fed_desc = BtcDescriptor :: <PublicKey >:: from_tree( & ms_expr) ?;
105105 let elem_desc = Descriptor :: <Pk , CovenantExt <CovExtArgs >>:: from_tree( & top. args[ 1 ] ) ?;
106106 Ok ( Pegin :: new( fed_desc, elem_desc) )
107107 } else {
0 commit comments