Packages

Protocol Support Layer

Protocol-level SDKs built on top of core — Spore, UDT, SSRI, and Lumos compatibility patches.

Edit on GitHub

The Protocol Support Layer adds higher-level abstractions over @ckb-ccc/core for the CKB ecosystem's most-used protocols. Each SDK composes transactions through the same declarative pattern as core, so you can mix them freely with your own custom logic.

@ckb-ccc/spore, @ckb-ccc/udt, and @ckb-ccc/ssri are already bundled in @ckb-ccc/shell and @ckb-ccc/ccc. You only need to install them individually if you depend on @ckb-ccc/core directly.

Architecture

Package Overview

PackagePurposeBuilt onUse when
@ckb-ccc/sporeCreate, transfer, and melt on-chain Digital Objects (DOBs) and ClusterscoreBuilding NFT-like assets or on-chain media
@ckb-ccc/udtIssue, mint, and transfer User Defined Tokens (xUDT / sUDT)core + ssriIssuing or moving fungible tokens
@ckb-ccc/ssriCall named methods on SSRI-compliant CKB scriptscoreCalling custom CKB scripts with SSRI methods
@ckb-ccc/lumos-patchesAdd JoyID / Nostr / Portal lock support to legacy Lumos appsLumos SDKMigrating a Lumos app gradually

Quick Start

All protocol SDKs follow the core declarative pattern — describe the desired outputs, then let CCC complete inputs, fees, and change:

import { ccc } from "@ckb-ccc/shell";

// Example: transfer xUDT
const udt = new ccc.udt.Udt(udtCodeOutPoint, udtType);
const { res: tx } = await udt.transfer(signer, [
  { to: receiverLock, amount: 1000n },
]);

await tx.completeInputsByUdt(signer, udtType);
await tx.completeFeeBy(signer);
const txHash = await signer.sendTransaction(tx);

The same pattern applies to Spore creation, SSRI method calls, and any custom transaction you compose alongside them.

On this page