77use BitWasp \Bitcoin \Crypto \EcAdapter \Key \PublicKeyInterface ;
88use BitWasp \Bitcoin \Exceptions \InvalidPSBTException ;
99use BitWasp \Bitcoin \Script \P2shScript ;
10- use BitWasp \Bitcoin \Script \ScriptFactory ;
10+ use BitWasp \Bitcoin \Script \Script ;
1111use BitWasp \Bitcoin \Script \ScriptInterface ;
1212use BitWasp \Bitcoin \Script \ScriptWitnessInterface ;
1313use BitWasp \Bitcoin \Script \WitnessScript ;
@@ -210,15 +210,15 @@ public static function fromParser(Parser $parser, VarString $vs): PSBTInput
210210 } else if ($ key ->getSize () !== 1 ) {
211211 throw new InvalidPSBTException ("Invalid key length " );
212212 }
213- $ redeemScript = new P2shScript (ScriptFactory:: fromBuffer ($ value ));
213+ $ redeemScript = new P2shScript (new Script ($ value ));
214214 break ;
215215 case self ::WITNESS_SCRIPT :
216216 if ($ witnessScript !== null ) {
217217 throw new InvalidPSBTException ("Duplicate witnessScript " );
218218 } else if ($ key ->getSize () !== 1 ) {
219219 throw new InvalidPSBTException ("Invalid key length " );
220220 }
221- $ witnessScript = new WitnessScript (ScriptFactory:: fromBuffer ($ value ));
221+ $ witnessScript = new WitnessScript (new Script ($ value ));
222222 break ;
223223 case self ::BIP32_DERIVATION :
224224 $ pubKey = self ::parsePublicKeyKey ($ key );
@@ -234,7 +234,7 @@ public static function fromParser(Parser $parser, VarString $vs): PSBTInput
234234 } else if ($ key ->getSize () !== 1 ) {
235235 throw new InvalidPSBTException ("Invalid key length " );
236236 }
237- $ finalScriptSig = ScriptFactory:: fromBuffer ($ value );
237+ $ finalScriptSig = new Script ($ value );
238238 break ;
239239 case self ::FINAL_WITNESS :
240240 if ($ finalScriptWitness !== null ) {
0 commit comments