altangent / lightnode-invoice

Lightning Network invoice protocol library
MIT License
12 stars 4 forks source link

Deal with amounts as strings instead of numbers #3

Open wbobeirne opened 5 years ago

wbobeirne commented 5 years ago

JS floats are imprecise and are limited to 32 bits. Numbers should probably be dealt with in satoshis as strings rather than bitcoins as numbers, and internally it should probably be managed using a library like bn.js.