Initializer
init(transaction:spentOutputs:)
Creates precomputed data for script verification.
init(transaction: Transaction, spentOutputs: [TransactionOutput]? = nil) throws
Parameters
-
transaction
-
The spending transaction to pre-compute hashes for.
-
spentOutputs
-
The outputs being spent, one per transaction input in input order. Required when verifying under the taproot flag; optional (pass nil) for non-taproot verification.
Discussion
Throws
KernelError.precomputedDataCreationFailed when the spent-outputs count mismatches transaction.inputCount, when the transaction is malformed, or when the kernel rejects the combined input.