create-ccc-app or add CCC manually to an existing project.
Option 1: Bootstrap with create-ccc-app
create-ccc-app scaffolds a new CCC project with your chosen framework template, pre-configured with the right packages, TypeScript settings, and a working example.
Option 2: Manual setup
If you are adding CCC to an existing project, follow these steps.Install the package
Install the package that matches your environment. For a React app:
See Installation for the full list of packages and when to use each one.
Check your tsconfig.json
CCC uses Package Entry Points for tree-shaking. Make sure
moduleResolution in your tsconfig.json is set to node16, nodenext, or bundler:tsconfig.json
Wrap your app with Provider
ccc.Provider manages wallet state and renders the connector UI. Add it at the root of your React application:app.tsx
If you use React Server Components (e.g. Next.js App Router), add
"use client" at the top of any file that imports or renders ccc.Provider.Connect a wallet
Use the Calling
useCcc hook to open the wallet selector and read the connected signer:wallet-button.tsx
open() displays the built-in wallet selector. CCC automatically detects available wallets in the user’s browser.Send CKB
Use the
useSigner hook to get the active signer, then compose and broadcast a transaction:send-ckb.tsx
ccc.fixedPointFrom("100") converts a human-readable CKB amount to the on-chain unit (Shannon, where 1 CKB = 10⁸ Shannon). completeInputsByCapacity and completeFeeBy automatically select inputs and calculate fees — you only need to describe what you want in the outputs.Next steps
Installation
Learn about all available packages and advanced import options.
Connect wallets
Customize the wallet connector and filter supported wallets.
Send CKB
Dive deeper into transaction composition and fee handling.
Playground
Experiment with CCC live in your browser — no install needed.