Migrate to Lumos v0.22
Refactor the Entry Package @ckb-lumos/lumos
for Convenience
Before v0.22, developers usually need to import modules from different packages, especially when they want to use the child modules in Lumos, such as CKBComponents
in @ckb-lumos/rpc/lib/types
, it causes that developers need to add many dependencies in package.json
and import many modules in their code. To solve this problem, we refactor the entry package @ckb-lumos/lumos
to make it more convenient to use.
We've also split these modules into entry packages to make lumos work smoothly with the modern IDEs, such as VSCode or WebStorm, which can automatically import the modules
@ckb-lumos/lumos
.toolkit
- Removed
Reader
, please migrate to@ckb-lumos/lumos/codec
instead. - Removed
validators
, please migrate to@ckb-lumos/lumos/codec
'spack/unpack
methods instead. - Removed
normalizers
, please migrate to@ckb-lumos/lumos/codec
'spack/unpack
methods instead. - Removed
transformers
, please migrate to@ckb-lumos/lumos/codec
'spack/unpack
methods instead.
@ckb-lumos/lumos
.utils
- Removed
isDeepEqual
, please use a third-party library likelodash.isequal
instead. - Removed
deepCamel
, please use a third-party library likecamelcase-keys
instead. - Removed
hashCode
, please use a third-party library likexxHash
instead. - Removed
toBigUInt64LECompatible
, please usehexify(Uint64.pack)
instead. - Removed
toBigUInt128LECompatible
, please usehexify(Uint128.pack)
instead. - Added
parseUnit
- Added
formatUnit
@ckb-lumos/lumos
.config
- Deprecated
predefined
, please useconfig.MAINNET
orconfig.TESTNET
instead.
@ckb-lumos/lumos
.'helpers`
The CKB2019 version short address format was deprecated a long time ago and we no longer export these methods.
- Removed
generateSecp256k1Blake160Address
, useencodeToAddress
instead - Removed
generateAddress
, useencodeToAddress
instead - Removed
scriptToAddress
, useencodeToAddress
instead - Removed
generateSecp256k1Blake160MultisigAddress
, useencodeToAddress
instead