sign method
LegacyWitnessInput
sign({
- required Transaction tx,
- required int inputN,
- required ECPrivateKey key,
- required BigInt value,
- SigHashType hashType = const SigHashType.all(),
override
Signs the input given the tx, input number (inputN), private
key and input value using the specifified hashType. Should throw
CannotSignInput if the key cannot sign the input.
Implemented by specific subclasses.
Implementation
@override
LegacyWitnessInput sign({
required Transaction tx,
required int inputN,
required ECPrivateKey key,
required BigInt value,
hashType = const SigHashType.all(),
}) => addSignature(
createInputSignature(
tx: tx,
inputN: inputN,
key: checkKey(key),
scriptCode: scriptCode,
value: value,
hashType: hashType,
),
);