sign method

  1. @override
P2PKHInput sign({
  1. required Transaction tx,
  2. required int inputN,
  3. required ECPrivateKey key,
  4. SigHashType hashType = const SigHashType.all(),
})
override

Signs the input given the tx, input number (inputN) and a private key using the specifified hashType. Implemented by specific subclasses.

Implementation

@override
P2PKHInput sign({
  required Transaction tx,
  required int inputN,
  required ECPrivateKey key,
  hashType = const SigHashType.all(),
}) => addSignature(
  createInputSignature(
    tx: tx,
    inputN: inputN,
    key: checkKey(key),
    scriptCode: scriptCode,
    hashType: hashType,
  ),
);