This roadmap delivers the v1 milestone: removing the abandoned SmartTransaction abstraction, adopting CCC-native utilities and UDT patterns, and verifying the entire 5-package library suite compiles and functions against plain ccc.Transaction. Phase 1 uses a feature-slice approach — each removal is chased across all packages so the build stays green at every step, which front-loads method signature migration. Later phases handle UDT pattern finalization (after Phase 3 investigation), deprecated API replacement, SDK completion, and full verification.
Phase Numbering:
- Integer phases (1, 2, 3): Planned milestone work
- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED)
Decimal phases appear between their surrounding integers in numeric order.
- Phase 1: SmartTransaction Removal (feature-slice) - Delete SmartTransaction class and infrastructure across all packages; contribute 64-output DAO limit check to CCC core; migrate all method signatures to ccc.TransactionLike
- Phase 2: CCC Utility Adoption - Replace local utility functions that duplicate CCC equivalents across all packages; preserve iCKB-unique utilities
- Phase 3: CCC Udt Integration Investigation - Assess feasibility of subclassing CCC's Udt class for iCKB's multi-representation value; design header access pattern; document decision
- Phase 4: Deprecated CCC API Replacement - Replace deprecated CCC API calls (
udtBalanceFrom, etc.) with@ckb-ccc/udtequivalents in dao and order packages; finalize UDT handler replacement pattern based on Phase 3 findings - Phase 5: @ickb/core UDT Refactor - Implement IckbUdt class or refactor IckbUdtManager based on Phase 3 findings; preserve iCKB conservation law; replace deprecated CCC API calls in core
- Phase 6: SDK Completion Pipeline - Wire IckbSdk facade to CCC-native fee completion; verify estimate() and maturity() work end-to-end
- Phase 7: Full Stack Verification - Verify all 5 library packages compile clean with no SmartTransaction remnants and no type errors
Goal: SmartTransaction class, CapacityManager class are deleted; all manager method signatures across all 5 library packages accept ccc.TransactionLike instead of SmartTransaction; 64-output DAO limit check is contributed to CCC core; getHeader()/HeaderKey are removed and inlined. Each removal is chased across all packages — build stays green at every step.
Depends on: Nothing (first phase)
Requirements: SMTX-01, SMTX-02, SMTX-04, SMTX-06
Success Criteria (what must be TRUE):
SmartTransactionclass andCapacityManagerclass no longer exist in@ickb/utilssource or exportsUdtHandlerinterface andUdtManagerclass remain in@ickb/utilswith method signatures updated fromSmartTransactiontoccc.TransactionLike(full replacement deferred to Phase 3+)getHeader()function andHeaderKeytype are removed from@ickb/utils; all call sites across dao/core/sdk inline CCC client calls (client.getTransactionWithHeader(),client.getHeaderByNumber());SmartTransaction.addHeaders()call sites in DaoManager/LogicManager push totx.headerDepsdirectly- A 64-output NervosDAO limit check exists in CCC core (via
forks/ccc/):completeFee()safety net, standalone async utility, andErrorNervosDaoOutputLimiterror class; all 6+ scattered checks across dao/core packages are replaced with calls to this CCC utility - ALL manager method signatures across ALL 5 library packages accept
ccc.TransactionLikeinstead ofSmartTransaction, following CCC's convention (TransactionLike input, Transaction output withTransaction.from()conversion at entry point) pnpm check:fullpasses after each feature-slice removal step — no intermediate broken states Plans: 3 plans
Plans:
- 01-01-PLAN.md — Build CCC DAO utility (ErrorNervosDaoOutputLimit + assertDaoOutputLimit) and replace all 7 scattered DAO checks
- 01-02-PLAN.md — Remove getHeader()/HeaderKey, inline CCC client calls at all call sites, replace addHeaders with headerDeps push
- 01-03-PLAN.md — Delete SmartTransaction + CapacityManager, update all method signatures to TransactionLike, clean SDK
Goal: Local utility functions that duplicate CCC core functionality are replaced with CCC equivalents across all packages; iCKB-unique utilities are explicitly preserved Depends on: Phase 1 Requirements: DEDUP-01, DEDUP-02, DEDUP-03, DEDUP-04, DEDUP-05 Success Criteria (what must be TRUE):
- All call sites using local
max()/min()now useMath.max()/Math.min()(number-typed contexts) and the local implementations are deleted - All call sites using local
gcd()now useccc.gcd()and the local implementation is deleted - Local
isHex()in@ickb/utilsis replaced withccc.isHex() - Local
hexFrom()call sites are refactored to explicit calls:ccc.numToHex()for bigint andccc.hexFrom(entity.toBytes())for entities (CCC'shexFrom()only handlesHexLike, notbigint | Entity) - iCKB-unique utilities (
binarySearch,asyncBinarySearch,shuffle,unique,collect,BufferedGenerator,MinHeap) remain in@ickb/utilsunchanged Plans: 1 plan
Plans:
- 02-01-PLAN.md — Replace local max/min/gcd/hexFrom/isHex with CCC equivalents, delete local implementations, preserve iCKB-unique utilities
Goal: Clear, documented decision on whether IckbUdt should extend CCC's udt.Udt class for iCKB's multi-representation value (xUDT + receipts + deposits), with the header access pattern designed. This decision determines the replacement for UdtHandler/UdtManager (which remain in @ickb/utils with updated signatures after Phase 1).
Depends on: Nothing (can proceed in parallel with Phases 1-2; design investigation, not code changes)
Requirements: UDT-01, UDT-02, UDT-03
Success Criteria (what must be TRUE):
- A written feasibility assessment exists answering: can
IckbUdt extends udt.UdtoverrideinfoFrom()(orgetInputsInfo()/getOutputsInfo()) to account for receipt cells and deposit cells alongside xUDT cells, without breaking CCC's internal method chains - The header access pattern for receipt value calculation is designed and documented -- specifying whether
client.getCellWithHeader(),client.getTransactionWithHeader(), or direct CCC client calls are used within the Udt override (note:getHeader()was removed in Phase 1) - A decision document exists with one of three outcomes: (a) subclass CCC Udt, (b) keep custom interface, (c) hybrid approach -- with rationale for the chosen path Plans: 2 plans
Plans:
- 03-01-PLAN.md — Trace CCC Udt internals end-to-end, verify infoFrom override feasibility, resolve open questions
- 03-02-PLAN.md — Write formal decision document (feasibility assessment, header access pattern, decision with rationale)
Goal: Deprecated CCC API calls are replaced with @ckb-ccc/udt equivalents in @ickb/dao and @ickb/order; UDT handler usage is finalized based on Phase 3 findings (method signatures and addUdtHandlers() removal already done in Phase 1)
Depends on: Phase 1 (signatures migrated), Phase 3 (UDT decision — determines replacement pattern for UdtHandler usage)
Requirements: SMTX-05, SMTX-10
Success Criteria (what must be TRUE):
- No calls to deprecated CCC APIs (
udtBalanceFrom,getInputsUdtBalance,getOutputsUdtBalance,completeInputsByUdt) exist in@ickb/daoor@ickb/order - UDT-related operations in
@ickb/daoand@ickb/orderuse the pattern chosen in Phase 3 (directUdtinstance methods, refactored UdtManager, or hybrid) - Both
@ickb/daoand@ickb/ordercompile successfully Plans: TBD
Plans:
- 04-01: TBD
- 04-02: TBD
Goal: IckbUdt class is implemented or IckbUdtManager is refactored based on Phase 3 findings; the iCKB conservation law is preserved through the refactor; deprecated CCC API calls are replaced in @ickb/core; UdtHandler/UdtManager are removed from @ickb/utils (manager method signatures already migrated to ccc.TransactionLike in Phase 1)
Depends on: Phase 3 (UDT decision), Phase 4 (dao+order UDT pattern finalized)
Requirements: SMTX-05, SMTX-07, SMTX-10, UDT-04, UDT-05
Success Criteria (what must be TRUE):
- The iCKB conservation law (
Input UDT + Input Receipts = Output UDT + Input Deposits) is enforced correctly in the refactored code -- multi-representation UDT balance logic survives intact - If Phase 3 concluded subclassing is viable:
IckbUdt extends udt.Udtexists in@ickb/corewith overriddeninfoFrom()that accounts for xUDT cells, receipt cells, and deposit cells - If Phase 3 concluded subclassing is not viable:
IckbUdtManageris refactored to work with plainccc.Transactionwhile maintaining a compatible interface for balance calculation UdtHandlerinterface andUdtManagerclass are removed from@ickb/utils(their responsibilities absorbed by the Phase 3 outcome implementation)- No calls to deprecated CCC APIs exist in
@ickb/core @ickb/corecompiles successfully with no SmartTransaction imports Plans: TBD
Plans:
- 05-01: TBD
- 05-02: TBD
- 05-03: TBD
Goal: IckbSdk facade uses CCC-native fee completion pipeline; estimate() and maturity() continue working after SmartTransaction removal Depends on: Phase 5 (core refactored) Requirements: SMTX-03, SMTX-08 Success Criteria (what must be TRUE):
IckbSdktransaction building usesccc.Transaction.completeFeeBy()orcompleteFeeChangeToLock()for fee completion, with DAO-aware capacity calculation (no SmartTransaction.completeFee override)IckbSdk.estimate()returns correct iCKB exchange rate estimates when called against the refactored libraryIckbSdk.maturity()returns correct deposit maturity information when called against the refactored library- The explicit completion pipeline ordering is correct: UDT completion before CKB capacity completion before fee completion Plans: TBD
Plans:
- 06-01: TBD
- 06-02: TBD
Goal: All 5 library packages compile clean with strict TypeScript settings, no SmartTransaction remnants, and no deprecated CCC API calls anywhere in the codebase Depends on: Phase 6 (SDK done -- all packages now updated) Requirements: SMTX-09 Success Criteria (what must be TRUE):
pnpm check:fullpasses -- all 5 library packages (@ickb/utils,@ickb/dao,@ickb/order,@ickb/core,@ickb/sdk) compile with zero type errors under strict TypeScript settings (noUncheckedIndexedAccess,verbatimModuleSyntax,noImplicitOverride)- No imports of
SmartTransactionexist anywhere in the codebase (library packages or apps) - No calls to deprecated CCC APIs (
udtBalanceFrom,getInputsUdtBalance,getOutputsUdtBalance,completeInputsByUdt) exist anywhere in the 5 library packages Plans: TBD
Plans:
- 07-01: TBD
Execution Order: Phases execute in numeric order: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 (Note: Phase 3 could start in parallel with Phases 1-2; Phase 4 now depends on Phase 3 in addition to Phase 1)
| Phase | Plans Complete | Status | Completed |
|---|---|---|---|
| 1. SmartTransaction Removal (feature-slice) | 3/3 | Complete | 2026-02-22 |
| 2. CCC Utility Adoption | 1/1 | Complete | 2026-02-23 |
| 3. CCC Udt Integration Investigation | 2/2 | Complete | 2026-02-24 |
| 4. Deprecated CCC API Replacement | 0/2 | Not started | - |
| 5. @ickb/core UDT Refactor | 0/3 | Not started | - |
| 6. SDK Completion Pipeline | 0/2 | Not started | - |
| 7. Full Stack Verification | 0/1 | Not started | - |