Lumos is still under active development and considered to be a work in progress.
As of now, lumos contains the following components:
- indexer: a CKB cell indexer that fulfills
Index-Query-Assemblepattern. For now, this package only contains RocksDB backed indexer. A separate package contains SQL backed indexer using the same interface. Later, we might merge the 2 packages into one for consistency.
- base: a base package containing common types and utilities that are used by most packages. If there is a CKB specific task you need to perform, you might want to look here first. Chances are they are already provided.
- helpers: a helper package containing more utilities. The difference between
base, is that
basecontains pure stateless functions, while
helpersworks in a more intrinsic way: it requires
config-managermentioned below to be setup.
- common-scripts: integrations for known scripts on CKB. While we try our best to provide integrations for popular CKB scripts, people might be working on innovations everyday. As a result, we are also designing a set of APIs, so developers can freely integrate their own scripts into lumos for everyone to use. One integrated,
common-scriptsshould be able to leverage those new scripts as well.
- config-manager: a manager for dealing with differences between different chains, such as mainnet, testnet, or numerous dev chains. We abstract each chain into individual config file. Once loaded, config manager will be able to handle the chain specific logic, so you don't have to deal with this in your own code.
- transaction-manager: a transaction manager for CKB. One problem with UTXO based blockchains, is that a certain amount of gap period exists between a transaction is accepted by a blockchain, and when it is actually committed on chain. During this gap, new cells created by the pending transaction will not be available. Transaction manager package takes care of this. It wraps an indexer instance, and makes sure cells created in pending transactions, are also exposed and available for assembling new transactions. This means you are no longer bounded to one transaction at a time, you can freely send series of transactions as you wish.
- hd: an HD wallet manager for CKB. It support mnemonic and keystore, compatible with
ckb-cli, you can load keystore from
ckb-clidirectly and import mnemonic generated by
- hd-cache: an HD cache manager for CKB. It build a memory cache for derived addresses and live cells of these addresses.
- rpc: RPC module for CKB RPC. Provide type definations for CKB RPC interface.
sudo apt-get update sudo apt install nodejs npm install --global yarn sudo apt install build-essential
yarn run build
yarn run test
Test Coverage (c8)
yarn run test-coverage
Format & Lint
yarn run lint
yarn run clean