@@ -139,7 +139,7 @@ pub trait DescriptorTrait<Pk: MiniscriptKey> {
139139 /// would be [NullCtx] and [descriptor.DescriptorPublicKeyCtx] if MiniscriptKey is [descriptor.DescriptorPublicKey]
140140 ///
141141 /// In general, this is defined by generic for the trait [ToPublicKey]
142- fn witness_script < ToPkCtx : Copy > ( & self , to_pk_ctx : ToPkCtx ) -> Script
142+ fn explicit_script < ToPkCtx : Copy > ( & self , to_pk_ctx : ToPkCtx ) -> Script
143143 where
144144 Pk : ToPublicKey < ToPkCtx > ;
145145
@@ -466,16 +466,16 @@ where
466466 /// would be [NullCtx](crate::NullCtx) and [DescriptorPublicKeyCtx] if MiniscriptKey is [DescriptorPublicKey]
467467 ///
468468 /// In general, this is defined by generic for the trait [ToPublicKey]
469- fn witness_script < ToPkCtx : Copy > ( & self , to_pk_ctx : ToPkCtx ) -> Script
469+ fn explicit_script < ToPkCtx : Copy > ( & self , to_pk_ctx : ToPkCtx ) -> Script
470470 where
471471 Pk : ToPublicKey < ToPkCtx > ,
472472 {
473473 match * self {
474- Descriptor :: Bare ( ref bare) => bare. witness_script ( to_pk_ctx) ,
475- Descriptor :: Pkh ( ref pkh) => pkh. witness_script ( to_pk_ctx) ,
476- Descriptor :: Wpkh ( ref wpkh) => wpkh. witness_script ( to_pk_ctx) ,
477- Descriptor :: Wsh ( ref wsh) => wsh. witness_script ( to_pk_ctx) ,
478- Descriptor :: Sh ( ref sh) => sh. witness_script ( to_pk_ctx) ,
474+ Descriptor :: Bare ( ref bare) => bare. explicit_script ( to_pk_ctx) ,
475+ Descriptor :: Pkh ( ref pkh) => pkh. explicit_script ( to_pk_ctx) ,
476+ Descriptor :: Wpkh ( ref wpkh) => wpkh. explicit_script ( to_pk_ctx) ,
477+ Descriptor :: Wsh ( ref wsh) => wsh. explicit_script ( to_pk_ctx) ,
478+ Descriptor :: Sh ( ref sh) => sh. explicit_script ( to_pk_ctx) ,
479479 }
480480 }
481481
@@ -1134,7 +1134,7 @@ mod tests {
11341134 #[ test]
11351135 fn after_is_cltv ( ) {
11361136 let descriptor = Descriptor :: < bitcoin:: PublicKey > :: from_str ( "wsh(after(1000))" ) . unwrap ( ) ;
1137- let script = descriptor. witness_script ( NullCtx ) ;
1137+ let script = descriptor. explicit_script ( NullCtx ) ;
11381138
11391139 let actual_instructions: Vec < _ > = script. instructions ( ) . collect ( ) ;
11401140 let check = actual_instructions. last ( ) . unwrap ( ) ;
@@ -1145,7 +1145,7 @@ mod tests {
11451145 #[ test]
11461146 fn older_is_csv ( ) {
11471147 let descriptor = Descriptor :: < bitcoin:: PublicKey > :: from_str ( "wsh(older(1000))" ) . unwrap ( ) ;
1148- let script = descriptor. witness_script ( NullCtx ) ;
1148+ let script = descriptor. explicit_script ( NullCtx ) ;
11491149
11501150 let actual_instructions: Vec < _ > = script. instructions ( ) . collect ( ) ;
11511151 let check = actual_instructions. last ( ) . unwrap ( ) ;
0 commit comments