Transaction constructor
Transaction({})
Constructs a transaction with the given inputs
and outputs
.
TransactionTooLarge will be thrown if the resulting transction exceeds
maxSize (1MB).
Implementation
Transaction({
this.version = currentVersion,
required Iterable<Input> inputs,
required Iterable<Output> outputs,
this.locktime = 0,
})
: inputs = List.unmodifiable(inputs),
outputs = List.unmodifiable(outputs)
{
checkInt32(version);
checkUint32(locktime);
if (size > maxSize) throw TransactionTooLarge();
}