| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
CCC - CKBers' Codebase is a one-stop solution for your CKB JS/TS ecosystem development.
Empower yourself with CCC to discover the unlimited potential of CKB.
Interoperate with wallets from different chain ecosystems.
Fully enabling CKB's Turing completeness and cryptographic freedom.
We design CCC to optimize various use cases, including:
Read our documents or API reference to learn more about CCC. If you are new to the CKB, we also recommend Nervos CKB Docs for basic knowledge.
Using an AI assistant? CCC's docs are LLM-friendly: start from docs.ckbccc.com/llms.txt for a curated index with task-oriented reading paths, or docs.ckbccc.com/llms-full.txt for the full documentation in a single file. Append .md to any docs page URL to get its raw Markdown.
CKB's Cell model rarely appears in the Ethereum-heavy data most LLMs are trained on, so an unguided assistant will confidently write wrong CCC code (wrong tx ordering, invented methods, number where CKB needs bigint, EVM-style assumptions). To fix this, CCC ships a set of machine-readable Agent Skills under skills/ — one hub skill (ckb-ccc-fundamentals) plus a spoke skill per task area (signer setup, transactions, UDT, Spore, playground, examples).
Install them into Cursor, Claude Code, GitHub Copilot, Windsurf, Codex, and 60+ other tools with one command, using the open-source skills CLI:
npx skills add ckb-devrel/ccc --allSee AI Resources for full setup instructions per tool, how to verify a skill actually loaded, and prompting tips.
The CCC Playground is an integrated testing environment in web browsers that supports data visualization and code-sharing. Click the link to run your code without the annoying preparation and watch how the code works, exploring CCC's capabilities.
For an explanation of the visual elements and interface components in the playground, please refer to the CCC Playground guide.
Besides short testing, CCC is also suitable for building scalable applications. To get started quickly, you can use our CLI tool create-ccc-app to bootstrap a new CCC-based application:
# Using npx
npx create-ccc-app@latest my-ccc-app# Using yarn
yarn create ccc-app my-ccc-app# Using pnpm
pnpm create ccc-app my-ccc-appFollow the prompts to select your preferred framework template and begin building your CCC application.
Whether you are a front-end or back-end developer, CCC provides helpful tools and capabilities:
All exports from CCC are available on the ccc object to help with code completion:
import { ccc } from "@ckb-ccc/<package-name>";If you are an advanced developer and wish to customize your code heavily, the <package-name>/advanced entry point exports cccA, which contains almost everything else. Be aware that these interfaces are not stable:
import { cccA } from "@ckb-ccc/<package-name>/advanced";The CCC App is a mini-toolset for CKB, showcasing some basic scenarios. You can still try the CCC App here even if you are not a developer.
To learn more examples, visit the documentation.
Let's start with a minimal example for transferring CKB:
const tx = ccc.Transaction.from({
outputs: [{ lock: toLock, capacity: ccc.fixedPointFrom(amount) }],
});Define the essential outputs of the transaction, and then...
await tx.completeInputsByCapacity(signer);
await tx.completeFeeBy(signer); // Transaction fee rate is calculated automatically
const txHash = await signer.sendTransaction(tx);That's it! The transaction is sent.
Click here to read the full example of transferring native CKB token.
Additional examples can be found in the documentation.
Run the demo of CCC in two steps:
# Navigate to the project directory and run the following commands to install all necessary packages and build the project:
pnpm install
pnpm build# Go to the demo directory and start the development server:
cd packages/demo
pnpm run devCCC uses JS's Package Entry Points feature to help tree shaking while exporting everything on the ccc object. Ensure in your tsconfig.json, moduleResolution is set to node16, nodenext, or bundler, and resolvePackageJsonExports is not disabled.
Read the TypeScript's Guide for more.
CCC UI only works on the client side. If you are using the React Server Component, add
"use client";at the beginning of files using ccc.Provider.
While we recommend using CCC for composing transactions, we also provide Lumos patches to:
See lumos-patches: npm install @ckb-ccc/lumos-patches
You can apply patches by:
import { generateDefaultScriptInfos } from "@ckb-ccc/lumos-patches";
// Before using Lumos. You don't need @ckb-lumos/joyid anymore.
registerCustomLockScriptInfos(generateDefaultScriptInfos());| Back | FazBrowse Home | New Git URL |