LegacySignatureHasher constructor

LegacySignatureHasher({
  1. required Transaction tx,
  2. required int inputN,
  3. required Script scriptCode,
  4. required SigHashType hashType,
})

Produces the hash of an input signature for a non-witness input at inputN. The scriptCode of the redeem script is necessary. hashType controls what data is included in the signature.

Implementation

LegacySignatureHasher({
  required this.tx,
  required this.inputN,
  required this.scriptCode,
  required this.hashType,
}) {
  SignatureHasher.checkInputN(tx, inputN);
  SignatureHasher.checkSchnorrDisallowed(hashType);
}