Dart uses signed 64 bit integers on the native target and floating point numbers for the Javascript target with insufficient precision. Output values should be unsigned 64-bit integers. To solve this, the Output value field shall be changed to a BigInt. Serialisation methods will be modified accordingly.
[x] Remove readUInt64LE and writeUInt64LE that are unused.
[x] Remove duplicated serialisation methods in lib/src/transaction.dart
[x] Move serialisation methods to separate file: lib/src/utils/serialisation.dart
[x] Change writeUInt64 to use BigInt
[x] Change Output class value field to use BigInt
[x] Fix compilation errors resulting from the modified datatype such as the isShatoshi function (Yes, that's right: "shatoshi". Probably best to fix that typo too).
Dart uses signed 64 bit integers on the native target and floating point numbers for the Javascript target with insufficient precision. Output values should be unsigned 64-bit integers. To solve this, the
Output
value field shall be changed to a BigInt. Serialisation methods will be modified accordingly.readUInt64LE
andwriteUInt64LE
that are unused.lib/src/transaction.dart
lib/src/utils/serialisation.dart
writeUInt64
to use BigIntOutput
classvalue
field to use BigIntisShatoshi
function (Yes, that's right: "shatoshi". Probably best to fix that typo too).