Open the Playground
Run CKB code in your browser at live.ckbccc.com
Cell visualization
The playground renders cells graphically so you can watch your transaction take shape as each step completes. Each cell is drawn as three concentric layers:- Outer ring — lock script (ownership). Cells with the same outer ring color share the same lock script.
- Inner ring — type script (asset type). Cells with the same inner ring color share the same type script.
- Center fill — occupancy. A filled center circle means all CKB capacity in that cell is used to store data.
Share code via URL
The playground loads a script from the?src= query parameter. Pass any raw URL to a .ts file and the playground fetches and runs it:
Example scripts
The following examples are available in the CCC repository. Click any card to open it in the playground.Transfer CKB
Build a transaction that transfers 100 CKB to an address, filling inputs and paying the fee automatically.
Transfer all CKB
Collect every cell owned by the signer and sweep the full balance to a single output.
Sign a message
Sign a message with a CKB signer and verify the signature using
ccc.Signer.verifyMessage.Transfer UDT
Transfer an xUDT token by building a transaction with
ccc.udt.Udt, filling UDT inputs, capacity inputs, and fees.Custom UI
Connect a JoyID signer directly without the built-in connector UI, using
ccc.JoyId.CkbSigner.Custom UI with controller
Use
ccc.SignersController to enumerate all available wallets and signers, then connect to one programmatically.