Sighash class

Implements the Signature Hash algorithm.

Depending on the Sighash flags specified in SighashType, this class will remove the parts of the transaction that should not be covered by the signature and calculates the hash value to be signed.

Basically what we do is :

  1. Strip all the parts of the Transaction that should not be covered by the signature
  2. Serialize the "stripped" Transaction
  3. Calculate the double-sha256 of the serialized Transaction

Constructors

Sighash.new()
Calculates the hash value according to the Sighash flags specified in sighashType

Properties

hashCode int
The hash code for this object.
no setterinherited
preImage Uint8List?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createSighashPreImage(Transaction txn, int sighashType, int inputNumber, SVScript subscript, BigInt? satoshis, {dynamic flags = _DEFAULT_SIGN_FLAGS}) Uint8List?
Only call this for BitcoinSV where ForkId is assumed to be enabled ! It is assumed that the passed in subscript has NOT been prepared by stripping up to the first OP_CODE_SEPARATOR
getHash() List<int>
hash(Transaction txn, int sighashType, int inputNumber, SVScript subscript, BigInt? satoshis, {dynamic flags = _DEFAULT_SIGN_FLAGS}) String
Calling this method presumes that the subscript has already been prepared by stripping off all code up to and including the first OP_CODESEPARATOR
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stripUptoFirstCodeSep(SVScript subscriptCopy) SVScript
toString() String
Returns the hexadecimal String of the signature hash
override

Operators

operator ==(Object other) bool
The equality operator.
inherited