WitnessSignatureHasher constructor
WitnessSignatureHasher({
- required Transaction tx,
- required int inputN,
- required Script scriptCode,
- required BigInt value,
- required SigHashType hashType,
Produces the hash of an input signature for a non-taproot witness input
at inputN
. The scriptCode
of the redeem script is necessary and the
value
of the previous output is required.
hashType
controls what data is included in the signature.
Implementation
WitnessSignatureHasher({
required this.tx,
required this.inputN,
required this.scriptCode,
required this.value,
required this.hashType,
}) : hashes = TransactionSignatureHashes(tx) {
SignatureHasher.checkInputN(tx, inputN);
SignatureHasher.checkSchnorrDisallowed(hashType);
}