object TransactionGenerators
- Alphabetic
- By Inheritance
- TransactionGenerators
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def baseTransaction: Gen[BaseTransaction]
- def baseTransactionTo(spk: ScriptPubKey): Gen[BaseTransaction]
Generates a legacy transaction with at least one output paying to the given SPK
- def buildCreditingTransaction(version: Int32, output: TransactionOutput, outpoint: TransactionOutPoint): (Transaction, UInt32)
- def buildCreditingTransaction(version: Int32, scriptPubKey: ScriptPubKey, amount: CurrencyUnit): (Transaction, UInt32)
- def buildCreditingTransaction(version: Int32, output: TransactionOutput): (Transaction, UInt32)
- def buildCreditingTransaction(version: Int32, scriptPubKey: ScriptPubKey): (Transaction, UInt32)
Builds a crediting transaction with a transaction version parameter.
Builds a crediting transaction with a transaction version parameter. Example: useful for creating transactions with scripts containing OP_CHECKSEQUENCEVERIFY.
- def buildCreditingTransaction(scriptPubKey: ScriptPubKey, amount: CurrencyUnit): (Transaction, UInt32)
- def buildCreditingTransaction(scriptPubKey: ScriptPubKey): (Transaction, UInt32)
Mimics this test utility found in bitcoin core https://github.com/bitcoin/bitcoin/blob/605c17844ea32b6d237db6d83871164dc7d59dab/src/test/script_tests.cpp#L57
Mimics this test utility found in bitcoin core https://github.com/bitcoin/bitcoin/blob/605c17844ea32b6d237db6d83871164dc7d59dab/src/test/script_tests.cpp#L57
- returns
the transaction and the output index of the scriptPubKey
- def buildSpendingTransaction(version: Int32, creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32, witness: TransactionWitness): (WitnessTransaction, UInt32)
- def buildSpendingTransaction(creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32, witness: TransactionWitness): (WitnessTransaction, UInt32)
- def buildSpendingTransaction(version: Int32, creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32, locktime: UInt32, sequence: UInt32, witness: TransactionWitness, outputs: Vector[TransactionOutput]): (WitnessTransaction, UInt32)
- def buildSpendingTransaction(version: Int32, creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32, locktime: UInt32, sequence: UInt32, witness: TransactionWitness): (WitnessTransaction, UInt32)
- def buildSpendingTransaction(creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32, locktime: UInt32, sequence: UInt32, witness: TransactionWitness): (WitnessTransaction, UInt32)
Builds a spending WitnessTransaction with the given parameters
- def buildSpendingTransaction(creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32): (Transaction, UInt32)
Builds a spending transaction according to bitcoin core with max sequence and a locktime of zero.
Builds a spending transaction according to bitcoin core with max sequence and a locktime of zero.
- returns
the built spending transaction and the input index for the script signature
- def buildSpendingTransaction(version: Int32, creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32, locktime: UInt32, sequence: UInt32, outputs: Vector[TransactionOutput]): (Transaction, UInt32)
- def buildSpendingTransaction(version: Int32, creditingTx: Transaction, scriptSignature: ScriptSignature, outputIndex: UInt32, locktime: UInt32, sequence: UInt32): (Transaction, UInt32)
Builds a spending transaction according to bitcoin core
Builds a spending transaction according to bitcoin core
- returns
the built spending transaction and the input index for the script signature
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def csvTransaction(csvScriptNum: ScriptNumber, sequence: UInt32): Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
- val dummyOutputs: Vector[TransactionOutput]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def input: Gen[TransactionInput]
Generates a random TransactionInput
- def inputs: Gen[List[TransactionInput]]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmptyOutputTransaction: Gen[Transaction]
Generates a transaction with at least one output
- def nonEmptySmallTransactions: Gen[Vector[Transaction]]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def outPoint: Gen[TransactionOutPoint]
Responsible for generating TransactionOutPoint
- def output: Gen[TransactionOutput]
Generates a random TransactionOutput
- def outputReference: Gen[OutputReference]
- def outputTo(spk: ScriptPubKey): Gen[TransactionOutput]
Generates a random TX output paying to the given SPK
- def outputs: Gen[List[TransactionOutput]]
- def randomCLTVTransaction: Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
Generates a validly constructed CLTV transaction, which has a 50/50 chance of being spendable or unspendable.
- def realisiticWitnessTransaction: Gen[WitnessTransaction]
- def realisiticWitnessTransactionWitnessOut: Gen[WitnessTransaction]
- def realisticBaseTransaction: Gen[BaseTransaction]
- def realisticBaseTransactionWitnessOut: Gen[BaseTransaction]
- def realisticOutput: Gen[TransactionOutput]
Outputs that only have a positive amount of satoshis, techinically the bitcoin protocol allows you to have negative value outputs
- def realisticOutputReference: Gen[OutputReference]
- def realisticOutputs: Gen[Vector[TransactionOutput]]
- def realisticTransaction: Gen[Transaction]
- def realisticTransactionWitnessOut: Gen[Transaction]
- def realisticWitnessOutput: Gen[TransactionOutput]
- def realisticWitnessOutputs: Gen[Vector[TransactionOutput]]
- def signedMultiSigTransaction: Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
Creates a sequence of ECPrivateKey, then creates a MultiSignatureScriptPubKey from those private keys.
Creates a sequence of ECPrivateKey, then creates a MultiSignatureScriptPubKey from those private keys. Finally creates a Transaction that spends the MultiSignatureScriptPubKey correctly
- def signedP2PKHTransaction: Gen[(BaseTxSigComponent, ECPrivateKey)]
Creates a ECPrivateKey, then creates a P2PKHScriptPubKey from that private key Finally creates Transaction that spends the P2PKHScriptPubKey correctly
- def signedP2PKTransaction: Gen[(BaseTxSigComponent, ECPrivateKey)]
Creates a ECPrivateKey, then creates a P2PKScriptPubKey from that private key Finally creates a Transaction that spends the P2PKScriptPubKey correctly
- def signedP2SHP2WPKHTransaction: Gen[(WitnessTxSigComponent, Seq[ECPrivateKey])]
Creates a signed P2SH(P2WPKH) transaction
- def signedP2SHP2WSHTransaction: Gen[(WitnessTxSigComponent, Seq[ECPrivateKey])]
Creates a signed P2SH(P2WSH) transaction
- def signedP2SHTransaction: Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
Creates a transaction which contains a P2SHScriptSignature that correctly spends a P2SHScriptPubKey
- def signedP2WPKHTransaction: Gen[(WitnessTxSigComponent, Seq[ECPrivateKey])]
Generates a WitnessTransaction that has all of it's inputs signed correctly
- def signedP2WSHMultiSigTransaction: Gen[(WitnessTxSigComponentRaw, Seq[ECPrivateKey])]
- def signedP2WSHP2PKHTransaction: Gen[(WitnessTxSigComponentRaw, Seq[ECPrivateKey])]
Generates a WitnessTransaction that has an input spends a raw P2WSH WitnessScriptPubKey
- def signedP2WSHP2PKTransaction: Gen[(WitnessTxSigComponentRaw, Seq[ECPrivateKey])]
Generates a WitnessTransaction that has an input spends a raw P2WSH WitnessScriptPubKey
- def signedP2WSHTransaction: Gen[(WitnessTxSigComponentRaw, Seq[ECPrivateKey])]
- def smallInputs: Gen[Vector[TransactionInput]]
Generates a small list of TransactionInput
- def smallInputsNonEmpty: Gen[Vector[TransactionInput]]
Generates a small non empty list of TransactionInput
- def smallOutputs(totalAmount: CurrencyUnit): Gen[Seq[TransactionOutput]]
Creates a small sequence of outputs whose total sum is <= totalAmount
- def smallOutputs: Gen[Vector[TransactionOutput]]
Generates a small list of TransactionOutput
- def smallOutputsTo(spk: ScriptPubKey): Gen[Vector[TransactionOutput]]
Generates a small list of TX outputs paying to the given SPK
- def smallP2SHOutputs(totalAmount: CurrencyUnit): Gen[Seq[(TransactionOutput, ScriptPubKey)]]
Creates a small sequence of outputs whose total sum is <= totalAmount
Creates a small sequence of outputs whose total sum is <= totalAmount
- returns
Sequence of outputs and corresponding Redeem Scripts
- def smallP2WSHOutputs(totalAmount: CurrencyUnit): Gen[Seq[(TransactionOutput, ScriptPubKey)]]
- def smallTransactions: Gen[Vector[Transaction]]
Generates a small list of Transaction
- def spendableCLTVTransaction: Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
Creates a ECPrivateKey, then creates a CLTVScriptPubKey from that private key.
Creates a ECPrivateKey, then creates a CLTVScriptPubKey from that private key. Finally creates a Transaction that can successfully spend the CLTVScriptPubKey
- def spendableCLTVValues: Gen[(ScriptNumber, UInt32)]
generates a ScriptNumber and UInt32 locktime for a transaction such that the tx will be spendable
- def spendableCSVTransaction: Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
Creates a ECPrivateKey, then creates a CSVScriptPubKey from that private key.
Creates a ECPrivateKey, then creates a CSVScriptPubKey from that private key. Finally creates a Transaction that can successfully spend the CSVScriptPubKey
- def spendableCSVValues: Gen[(ScriptNumber, UInt32)]
Generates a pair of CSV values: a transaction input sequence, and a CSV script sequence value, such that the txInput sequence mask is always greater than the script sequence mask (i.e.
Generates a pair of CSV values: a transaction input sequence, and a CSV script sequence value, such that the txInput sequence mask is always greater than the script sequence mask (i.e. generates values for a validly constructed and spendable CSV transaction)
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transaction: Gen[Transaction]
- def transactionTo(spk: ScriptPubKey): Gen[Transaction]
Generates a transaction where at least one output pays to the given SPK
- def transactions: Gen[Vector[Transaction]]
Generates an arbitrary Transaction This transaction's TransactionInputs will not evaluate to true inside of the ScriptInterpreter
- def unspendableCLTVTransaction: Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
Creates a ECPrivateKey, then creates a CLTVScriptPubKey from that private key Finally creates a Transaction that CANNNOT spend the CLTVScriptPubKey because the LockTime requirement is not satisfied (i.e.
Creates a ECPrivateKey, then creates a CLTVScriptPubKey from that private key Finally creates a Transaction that CANNNOT spend the CLTVScriptPubKey because the LockTime requirement is not satisfied (i.e. the transaction's lockTime has not surpassed the CLTV value in the CLTVScriptPubKey)
- def unspendableCLTVValues: Gen[(ScriptNumber, UInt32)]
Generates a ScriptNumber and UInt32 locktime for a transaction such that the tx will be unspendable
- def unspendableCSVTransaction: Gen[(BaseTxSigComponent, Seq[ECPrivateKey])]
Creates a CSV transaction that's timelock has not been met
- def unspendableCSVValues: Gen[(ScriptNumber, UInt32)]
Generates a pair of CSV values: a transaction input sequence, and a CSV script sequence value, such that the txInput sequence mask is always less than the script sequence mask (i.e.
Generates a pair of CSV values: a transaction input sequence, and a CSV script sequence value, such that the txInput sequence mask is always less than the script sequence mask (i.e. generates values for a validly constructed and NOT spendable CSV transaction).
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def witnessTransaction: Gen[WitnessTransaction]
Generates a random WitnessTransaction
- def witnessTransactionTo(spk: ScriptPubKey): Gen[WitnessTransaction]
Generates a SegWit TX where at least one output pays to the given SPK