7
7
use BitWasp \Bitcoin \Crypto \EcAdapter \Key \PublicKeyInterface ;
8
8
use BitWasp \Bitcoin \Exceptions \InvalidPSBTException ;
9
9
use BitWasp \Bitcoin \Script \P2shScript ;
10
- use BitWasp \Bitcoin \Script \ScriptFactory ;
10
+ use BitWasp \Bitcoin \Script \Script ;
11
11
use BitWasp \Bitcoin \Script \ScriptInterface ;
12
12
use BitWasp \Bitcoin \Script \ScriptWitnessInterface ;
13
13
use BitWasp \Bitcoin \Script \WitnessScript ;
@@ -210,15 +210,15 @@ public static function fromParser(Parser $parser, VarString $vs): PSBTInput
210
210
} else if ($ key ->getSize () !== 1 ) {
211
211
throw new InvalidPSBTException ("Invalid key length " );
212
212
}
213
- $ redeemScript = new P2shScript (ScriptFactory:: fromBuffer ($ value ));
213
+ $ redeemScript = new P2shScript (new Script ($ value ));
214
214
break ;
215
215
case self ::WITNESS_SCRIPT :
216
216
if ($ witnessScript !== null ) {
217
217
throw new InvalidPSBTException ("Duplicate witnessScript " );
218
218
} else if ($ key ->getSize () !== 1 ) {
219
219
throw new InvalidPSBTException ("Invalid key length " );
220
220
}
221
- $ witnessScript = new WitnessScript (ScriptFactory:: fromBuffer ($ value ));
221
+ $ witnessScript = new WitnessScript (new Script ($ value ));
222
222
break ;
223
223
case self ::BIP32_DERIVATION :
224
224
$ pubKey = self ::parsePublicKeyKey ($ key );
@@ -234,7 +234,7 @@ public static function fromParser(Parser $parser, VarString $vs): PSBTInput
234
234
} else if ($ key ->getSize () !== 1 ) {
235
235
throw new InvalidPSBTException ("Invalid key length " );
236
236
}
237
- $ finalScriptSig = ScriptFactory:: fromBuffer ($ value );
237
+ $ finalScriptSig = new Script ($ value );
238
238
break ;
239
239
case self ::FINAL_WITNESS :
240
240
if ($ finalScriptWitness !== null ) {
0 commit comments