Migrate From BigInt to BI
Lumos was initially designed to run in NodeJS 12+, but we found that some dApps actually run in browsers, and some
earlier browsers, such as Safari on iOS13, do not support the BigInt, so we migrate the bigint-related APIs
from BigInt to BI, a big integer wrapper.
Migration Rule
In order to keep compatibility, we have adapted the API according to the following rules
BigInt in Parameter
We provide a union API that allow user pass a BIish as the parameter, for example, both toBigUint128LE(1n)
and toBigUint128LE(BI.from(1)) will work
BigInt in Return
We provide a new API for returning BI that ends with Compatible, for example,
both readBigUint128LE -> readBigUint128LECompatible
Progress
- base
- config-manager
- helpers
- rpc
- ckb-indexer
- common-scripts
- hd
- hd-cache
- transaction-manager
Related API
base
parseSince->parseSinceCompatiblegenerateSincetoBigUInt64LEreadBigUInt64LE->readBigUint64LECompatibletoBigUInt128LEreadBigUInt128LE->readBigUInt128LECompatible
helpers
minimalCellCapacity->minimalCellCapacityCompatible
common-scripts
anyone_can_pay.checkLimitanyone_can_pay.injectCapacityanyone_can_pay.withdrawcommon.transfercommon.injectCapacitycommon.payFeecommon.payFeeByFeeRatecommon.collectInputCompatibledao.depositdao.calculateDaoEarliestSince->dao.calculateDaoEarliestSinceCompatibledao.extractDaoData->dao.extractDaoDataCompatibledao.calculateMaximumWithdraw->dao.calculateMaximumWithdrawCompatibledeploy.completeTxdeploy.injectCapacitydeploy.calculateTxFeedeploy.calculateFeelocktime_pool.transfer->locktime_pool.transferCompatiblelocktime_pool.injectCapacityWithoutChange->locktime_pool.injectCapacityWithoutChangeCompatiblelocktime_pool.payFeesecp256k1_blake160.transfer->secp256k1_blake160.transferCompatiblesecp256k1_blake160.payFeesecp256k1_blake160_multisig.transfer->secp256k1_blake160_multisig.transferCompatiblesecp256k1_blake160_multisig.payFeesudt.issueTokensudt.transfer