addInput method
Add input to Transaction Return index number of input
Implementation
addInput(Uint8List hash, int index, {int? sequence, Uint8List? scriptSig}) {
if (hash.length != 32) {
throw ArgumentError('The length of argument must be 32', 'hash');
}
sequence ??= Transaction.defaultSequence;
scriptSig ??= emptyScript;
// Add the input
ins.add(Input(
hash: hash,
index: index,
script: scriptSig,
sequence: sequence!,
witness: emptyWitness,
));
// and return the input's index
return ins.length - 1;
}