Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ckb-devrel/ccc/llms.txt
Use this file to discover all available pages before exploring further.
@ckb-ccc/core is the base layer of CCC. It contains all CKB data types, encoders, hashers, and the abstract Signer / Client interfaces used by every higher-level package.
Most projects do not need to install
@ckb-ccc/core directly. Use
@ckb-ccc/shell for Node.js or @ckb-ccc/connector-react for React — both
re-export everything from core.Installation
Imports
Exported modules
@ckb-ccc/core re-exports the following sub-modules under the ccc namespace:
| Module | Contents |
|---|---|
address | Address, AddressLike, address parsing and formatting |
bytes | bytesFrom, bytesTo, byte array utilities |
ckb | Transaction, Script, Cell, CellInput, CellOutput, OutPoint, WitnessArgs |
client | Client (abstract), ClientPublicMainnet, ClientPublicTestnet |
fixedPoint | fixedPointFrom, fixedPointToString — CKB capacity in shannons |
hasher | hashCkb, Hasher — CKB Blake2b hashing |
hex | hexFrom, HexLike, hex encoding helpers |
jsonRpc | RequestorJsonRpc — low-level JSON-RPC client |
keystore | KeyStore — encrypted key storage |
molecule | Molecule codec primitives |
num | numFrom, numFromBytes, numToBytes, numLeToBytes — numeric conversions |
signer | Signer (abstract), SignerInfo, SignerType, SignerSignType |
utils | Miscellaneous helpers |
Key classes
Transaction
The primary type for building CKB transactions:| Method | Description |
|---|---|
Transaction.from(like) | Create from a plain object |
tx.addInput(cell) | Add a cell input |
tx.addOutput(output, data?) | Add a cell output |
tx.completeInputsByCapacity(signer) | Auto-select inputs to cover capacity |
tx.completeFeeBy(signer, feeRate?) | Add a change output and compute fee |
tx.addCellDepInfos(client, deps) | Resolve and add cell dependencies |
signer.sendTransaction(tx) | Sign and broadcast |
Script
Address
Signer (abstract)
TheSigner abstract class is implemented by every wallet integration. Key members: