Beispiel #1
0
 public static Gen <PSBTInput> PSBTInputNonFinal() =>
 from nonWitnessUtxo in SegwitTransactionGenerators.TX()
 from witnessUtxo in LegacyTransactionGenerators.Output()
 from redeem in ScriptGenerator.RandomScriptSig()
 from witnessS in ScriptGenerator.RandomScriptSig()
 from hdKeyPaths in HDKeyPaths()
 from partialSigs in PartialSigs()
 from unknown in UnknownKVMap()
 select ComposePSBTInput(new PSBTInput()
 {
     NonWitnessUtxo = nonWitnessUtxo,
     WitnessUtxo    = witnessUtxo,
     RedeemScript   = redeem,
     WitnessScript  = witnessS,
 }, hdKeyPaths, partialSigs, unknown);
Beispiel #2
0
 private static Gen <Transaction> TXFromOutput(TxOut txout, Network network, int vout) =>
 from outNum in Gen.Choose(0, 4)
 from tx in SegwitTransactionGenerators.TX(network)
     where tx.Outputs.Count > vout
 select ReplaceTxOut(tx, txout, vout);