fee
Calculates transaction fee.
'Fee' being the amount that will be paid for mining a transaction with the current inputs and outputs i.e., the difference in value of the total inputs and the total outputs.
Errors
MissingUtxowhen UTXO information for any input is not present or is invalid.NegativeFeeif calculated value is negative.FeeOverflowif an integer overflow occurs.