Using java.lang.Double potentially is subject to rounding errors, which is why the use of it is risky and unusual for monetary calculations.
As the rest api on cryptoapis.io accepts satoshi/wei by default, I'd suggest using satoshi/wei as the default unit for this sdk as well (e.g. changing com.cryptoapis.blockchains.bitcoin_based.models.Transaction.CreateTransaction.Inputs#setValue to accept a long value in satoshi instead of a double value)
Using
java.lang.Double
potentially is subject to rounding errors, which is why the use of it is risky and unusual for monetary calculations.As the rest api on cryptoapis.io accepts satoshi/wei by default, I'd suggest using satoshi/wei as the default unit for this sdk as well (e.g. changing
com.cryptoapis.blockchains.bitcoin_based.models.Transaction.CreateTransaction.Inputs#setValue
to accept along
value in satoshi instead of adouble
value)What do you think?