From CKB transactions to wallet connections: three design lessons from CCC

Sending 100 CKB sounds simple: choose a recipient, enter the amount, and sign. For a DApp developer, that means deciding which cells to spend, creating the recipient’s output and any change, calculating a fee, and getting the transaction signed through the user’s wallet. Those pieces depend on one another. Adding inputs changes the transaction’s size, and the size changes the fee. Different wallets can also require different signing steps.

CKBers’ Codebase (CCC) is a TypeScript SDK that helps applications handle these details. Our work, When EVM Defaults Break: Three SDK Patterns for UTXO-Family Wallets, draws three design lessons from the work already done in CCC. It is a collaboration between CKBA’s DevRel and Ecosystem support teams, co-authored by @Hanssen (CCC core developer and first author) and @zz_tovarishch.

The starting point: a CKB transaction needs more than a recipient and an amount. In the familiar EVM flow using an externally owned account, an application can construct a transaction without selecting individual spendable outputs. CKB uses cells: UTXO-like units that hold state and are guarded by scripts. Each output cell also needs enough capacity to cover the space it occupies. The application therefore has to account for both the value being transferred and the capacity required by the resulting cells.

The diagram summarizes the paper’s comparison with a conventional EVM account-based flow. A, B, and C are three modules within CCC, not three steps that execute in order.

1. Describe the outputs, then let CCC complete the transaction.

The Transaction Composer starts with what the application wants to create. CCC’s completion helpers handle input capacity, change, and fees, so the application does not have to write its own capacity-balancing loop for this transfer.

Here is the paper’s 100 CKB example. It assumes ccc is imported, receiver is the recipient’s lock script, and signer is already available:

The first two awaited calls complete the inputs and fee handling. The third signs and sends. The application describes the intended output, while CCC handles the dependent construction work. To try it yourself, the CCC Playground runs CCC code in the browser, and the CCC docs cover setup and the full API.

This shifts work into the SDK: the paper traces how CCC’s fee handling grew into seven related methods between July 2024 and August 2025, including different ways to route change.

These helpers are optional. Developers who need control over a particular transaction can still assemble its fields themselves. That balance is the paper’s central lesson: automate routine work while keeping the manual path available.

2. Give the application one signing interface across different kinds of wallets.

On CKB, a cell’s lock script defines how spending is authorized. Wallet integration can therefore involve more than different brands using the same signature scheme. The paper covers eight CCC wallet adapters spanning three signing primitives: secp256k1 ECDSA, WebAuthn passkeys, and Schnorr signatures through Nostr.

CCC puts their differences in message construction, witness encoding, and key management behind a shared Signer interface. Witnesses carry the data used to satisfy the transaction’s scripts, including signatures. An application can use the shared interface while each adapter handles its own signing conventions. The JoyID adapter, for example, handles CKB, Bitcoin, EVM, and Nostr signing paths.

There is a tradeoff: a common interface exposes a shared baseline of capabilities. Features specific to a signing scheme still need optional extensions. This is the paper’s most distinctive pattern. It is also relevant as account abstraction (ERC-4337) brings more signing options to EVM applications.

3. Reuse the wallet connection interface.

Before signing, a DApp has to find the wallet, request permission, handle account changes, and show a connection dialog. Repeating this work in each application also means maintaining it as wallet APIs change.

CCC provides a Web Component, @ckb-ccc/connector, and a React wrapper, @ckb-ccc/connector-react. The DApp declares which wallets to enable and uses the shared connection interface. This moves the recurring work of supporting those wallet APIs into the SDK. It also gives CCC’s maintainers an ongoing responsibility to keep the integrations working.

The paper identifies these patterns by looking back at CCC’s public releases and exported APIs from July 2024 to June 2026, tracing designs that recur across wallets or transaction types. At the June 10, 2026 cutoff, CCC had 18 published @ckb-ccc/* packages on npm, including the eight wallet adapters, and 13 human contributors. This is a retrospective case study. It does not measure whether developers integrate wallets faster or introduce fewer defects.

The wider question is how SDKs can support applications when transactions need explicit input and resource balancing, and wallets use different signing primitives. Other extended-UTXO ecosystems, such as Cardano, already have examples of declarative transaction composition and reusable connectors. Documenting CCC’s design makes CKB’s application-development experience available for that broader discussion.

The paper has been accepted as a poster at IEEE ICDLT 2026, the IEEE International Conference on Distributed Ledger Technologies, in Alcobaça, Portugal, on December 3-4. The conference brings together academia and industry, with organizers from Nova School of Business and Economics, NOVA Information Management School, and the IEEE Portugal Section. It is part of Blockchain.PT, a project funded through Portugal’s Recovery and Resilience Plan and the EU’s NextGenerationEU program. Hanssen plans to present it in person.

Thank you to Hanssen and everyone who has contributed to CCC. These design lessons come from the SDK that contributors have built and maintained, and we hope the paper gives more developers a way to understand and build on that work.

If you have used CCC, where do its helpers save you work, and where do you still need to take manual control? Feedback from wallet and DApp developers would help us understand which parts of the design need more attention. Please read the paper, explore the code, and cite the work if it is useful to your research. If you are attending ICDLT, come discuss it with Hanssen at the poster.

9 Likes