Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
17d946f
feat(core): add RGB++ script support to known scripts
fghdotio Dec 30, 2025
0ed6246
feat: add udt code of @ckb-ccc/rgbpp package
fghdotio Dec 30, 2025
823ba65
fix(rgbpp): remove duplicate @ckb-lumos deps from devDependencies and…
fghdotio Dec 30, 2025
d01b72c
refactor: replace custom encoding utilities with `@ckb-ccc/core` and …
fghdotio Feb 11, 2026
608fb82
refactor: centralize dust limit and fee rate constants, refine RGBPP …
fghdotio Feb 11, 2026
1a946ec
Refactor: Sort `rgbppLiveCells` for consistent processing, remove `re…
fghdotio Feb 11, 2026
d30f382
refactor: Refactor RGB++ commitment calculation to use partial transa…
fghdotio Feb 11, 2026
a72777d
refactor: delegate RGBPP script info fetching to script manager, rena…
fghdotio Feb 11, 2026
7eb168f
refactor: enhance OP_RETURN output validation, sequentialize cell inp…
fghdotio Feb 11, 2026
fef5145
feat: rgbpp btc
fghdotio Mar 4, 2026
fd1f358
refactor(rgbpp): reorganize udt and bitcoin module
fghdotio Mar 10, 2026
fe1b480
refactor(rgbpp): align package structure with ccc standards
fghdotio Mar 10, 2026
501f104
refactor: migrate SHA256 implementation from js-sha256 to @noble/hash…
fghdotio Mar 10, 2026
fe6de57
feat: add bitcoinjs-lib dependency to `xverse` package.
fghdotio Mar 10, 2026
4ca8ba5
feat: enhance error handling and validation in Bitcoin wallet operati…
fghdotio Mar 11, 2026
74e2afa
refactor: Extract Bitcoin transaction building, fee estimation, and A…
fghdotio Mar 11, 2026
f8cfc32
feat: RGBPP unlock signer with SPV proof and BTC transaction data pro…
fghdotio Mar 11, 2026
fffccf0
refactor: split BTC client interface into granular providers
fghdotio Mar 11, 2026
5928ae1
feat: add script providers and btc time lock utils
fghdotio Mar 11, 2026
eeaeedd
feat: Add RGB++ Spore and UDT examples
fghdotio Mar 11, 2026
c9153cc
chore: update pnpm dependencies
fghdotio Mar 11, 2026
8be8675
fix(bitcoin): improve transaction fee estimation and type exports
fghdotio Mar 24, 2026
ae2c2e6
refactor(rgbpp): reorganize modules by domain cohesion
fghdotio Apr 15, 2026
d893b5b
refactor(rgbpp): remove redundant NetworkType enum
fghdotio Apr 15, 2026
2932412
refactor(rgbpp): standardize error handling
fghdotio Apr 15, 2026
a3e9480
feat(rgbpp): upgrade to bitcoinjs-lib v7 and ecpair v3, fix legacy pa…
fghdotio Apr 18, 2026
a9361be
refactor(rgbpp): Implement type-safe .unref() for SPV proof cache cle…
fghdotio Apr 18, 2026
0d946b3
feat(rgbpp): implement concurrency control and retry logic for BTC tr…
fghdotio Apr 18, 2026
9fa2d98
feat(rgbpp): implement configurable logger and replace hardcoded cons…
fghdotio Apr 18, 2026
135bacb
refactor(rgbpp): split prepareUtxoSeal into composable buildSealPsbt …
fghdotio Apr 29, 2026
572f82e
fix(rgbpp): complete barrel exports and move @ckb-ccc/spore to depend…
fghdotio May 12, 2026
de4bc16
feat(rgbpp): add spore transfer and leap examples
fghdotio May 12, 2026
49dd230
chore(rgbpp): move @ckb-ccc/spore to dependencies
fghdotio May 12, 2026
cd5b075
chore(rgbpp): regenerate lockfile
fghdotio Jun 23, 2026
00b4120
fix(rgbpp): remove unnecessary type assertions and fix formatting
fghdotio Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions packages/core/src/client/clientPublicMainnet.advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,72 @@ export const MAINNET_SCRIPTS: Record<KnownScript, ScriptInfoLike | undefined> =
},
],
},
[KnownScript.RgbppLock]: {
codeHash:
"0xbc6c568a1a0d0a09f6844dc9d74ddb4343c32143ff25f727c59edf4fb72d6936",
hashType: "type",
cellDeps: [
{
cellDep: {
outPoint: {
txHash:
"0xcb4d9f9726e66306bfda6359d39d3bea8b4e5345d0f95f26a3e51626ebe82a63",
index: 0,
},
depType: "code",
},
type: {
codeHash:
"0x00000000000000000000000000000000000000000000000000545950455f4944",
hashType: "type",
args: "0x68ad3d9e0bb9ea841a5d1fcd600137bd3f45401e759e353121f26cd0d981452f",
},
},
// Rgbpp lock config cell dep
{
cellDep: {
outPoint: {
txHash:
"0xcb4d9f9726e66306bfda6359d39d3bea8b4e5345d0f95f26a3e51626ebe82a63",
index: 1,
},
depType: "code",
},
},
],
},
[KnownScript.BtcTimeLock]: {
codeHash:
"0x70d64497a075bd651e98ac030455ea200637ee325a12ad08aff03f1a117e5a62",
hashType: "type",
cellDeps: [
{
cellDep: {
outPoint: {
txHash:
"0x3d1c26b966504b09253ad84173bf3baa7b8135c5ff520c32cf70b631c1d08b9b",
index: 0,
},
depType: "code",
},
type: {
codeHash:
"0x00000000000000000000000000000000000000000000000000545950455f4944",
hashType: "type",
args: "0x44b8253ae18e913a2845b0d548eaf6b3ba1099ed26835888932a754194028a8a",
},
},
// btc time lock config cell dep
{
cellDep: {
outPoint: {
txHash:
"0x3d1c26b966504b09253ad84173bf3baa7b8135c5ff520c32cf70b631c1d08b9b",
index: 1,
},
depType: "code",
},
},
],
},
});
68 changes: 68 additions & 0 deletions packages/core/src/client/clientPublicTestnet.advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,4 +492,72 @@ export const TESTNET_SCRIPTS: Record<KnownScript, ScriptInfoLike> =
},
],
},
[KnownScript.RgbppLock]: {
codeHash:
"0x61ca7a4796a4eb19ca4f0d065cb9b10ddcf002f10f7cbb810c706cb6bb5c3248",
hashType: "type",
cellDeps: [
{
cellDep: {
outPoint: {
txHash:
"0x0d1567da0979f78b297d5311442669fbd1bd853c8be324c5ab6da41e7a1ed6e5",
index: 0,
},
depType: "code",
},
type: {
codeHash:
"0x00000000000000000000000000000000000000000000000000545950455f4944",
hashType: "type",
args: "0xa3bc8441df149def76cfe15fec7b1e51d949548bc27fb7a75e9d4b3ef1c12c7f",
},
},
// Rgbpp lock config cell dep for Bitcoin Testnet3
{
cellDep: {
outPoint: {
txHash:
"0x0d1567da0979f78b297d5311442669fbd1bd853c8be324c5ab6da41e7a1ed6e5",
index: 1,
},
depType: "code",
},
},
],
},
[KnownScript.BtcTimeLock]: {
codeHash:
"0x00cdf8fab0f8ac638758ebf5ea5e4052b1d71e8a77b9f43139718621f6849326",
hashType: "type",
cellDeps: [
{
cellDep: {
outPoint: {
txHash:
"0x8fb747ff0416a43e135c583b028f98c7b81d3770551b196eb7ba1062dd9acc94",
index: 0,
},
depType: "code",
},
type: {
codeHash:
"0x00000000000000000000000000000000000000000000000000545950455f4944",
hashType: "type",
args: "0xc9828585e6dd2afacb9e6e8ca7deb0975121aabee5c7983178a45509ffaec984",
},
},
// btc time lock config cell dep for Bitcoin Testnet3
{
cellDep: {
outPoint: {
txHash:
"0x8fb747ff0416a43e135c583b028f98c7b81d3770551b196eb7ba1062dd9acc94",
index: 1,
},
depType: "code",
},
},
],
},
});
4 changes: 4 additions & 0 deletions packages/core/src/client/knownScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ export enum KnownScript {
TypeBurnLock = "TypeBurnLock",
EasyToDiscoverType = "EasyToDiscoverType",
TimeLock = "TimeLock",

// RGB++ related scripts
RgbppLock = "RgbppLock",
BtcTimeLock = "BtcTimeLock",
}
2 changes: 1 addition & 1 deletion packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@shikijs/monaco": "^3.12.0",
"axios": "^1.11.0",
"bech32": "^2.0.0",
"bitcoinjs-lib": "^7.0.0",
"bitcoinjs-lib": "^7.0.1",
"isomorphic-ws": "^5.0.0",
"lucide-react": "^0.542.0",
"monaco-editor": "^0.52.2",
Expand Down
33 changes: 33 additions & 0 deletions packages/rgbpp/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Dependencies
node_modules
.pnp
.pnp.js

# Testing
coverage
__snapshots__

# Production
build
dist
lib

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Debug logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# IDE
.idea
.vscode

# Cache
.cache
.eslintcache
62 changes: 62 additions & 0 deletions packages/rgbpp/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// @ts-check

import eslint from "@eslint/js";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import tseslint from "typescript-eslint";

import { dirname } from "path";
import { fileURLToPath } from "url";

export default [
...tseslint.config({
files: ["**/*.ts"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
],
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/only-throw-error": [
"error",
{
allowThrowingAny: true,
allowThrowingUnknown: true,
allowRethrowing: true,
},
],
"@typescript-eslint/prefer-promise-reject-errors": [
"error",
{
allowThrowingAny: true,
allowThrowingUnknown: true,
},
],
"no-empty": "off",
"prefer-const": [
"error",
{ ignoreReadBeforeAssign: true, destructuring: "all" },
],
},
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
},
},
}),
eslintPluginPrettierRecommended,
];
57 changes: 57 additions & 0 deletions packages/rgbpp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "@ckb-ccc/rgbpp",
"version": "1.0.0",
"description": "RGB++ for CKB",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"type": "module",
"main": "dist.commonjs/index.js",
"module": "dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist.commonjs/index.js",
"default": "./dist.commonjs/index.js"
}
},
"scripts": {
"test": "jest",
"build": "rimraf ./dist && rimraf ./dist.commonjs && tsc && tsc --project tsconfig.commonjs.json",
"lint": "eslint ./src",
"format": "prettier --write . && eslint --fix ./src"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@ckb-ccc/udt": "workspace:*",
"@eslint/js": "^9.34.0",
"@exact-realty/multipart-parser": "^1.0.13",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.14",
"@types/node": "^22.10.6",
"copyfiles": "^2.4.1",
"dotenv": "^16.4.7",
"eslint": "^9.34.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"jest": "^29.7.0",
"prettier": "^3.6.2",
"prettier-plugin-organize-imports": "^4.2.0",
"rimraf": "^6.0.1",
"ts-jest": "^29.2.5",
"tsx": "^4.20.6",
"typescript": "^5.7.3",
"typescript-eslint": "^8.41.0"
},
"dependencies": {
"@bitcoinerlab/secp256k1": "1.1.1",
"@noble/hashes": "^1.4.0",
"@ckb-ccc/core": "workspace:*",
"@ckb-ccc/spore": "workspace:*",
"bip32": "4.0.0",
"bitcoinjs-lib": "7.0.1",
"ecpair": "3.0.1",
"lodash": "^4.17.21"
}
}
11 changes: 11 additions & 0 deletions packages/rgbpp/prettier.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* @see https://prettier.io/docs/configuration
* @type {import("prettier").Config}
*/
const config = {
singleQuote: false,
trailingComma: "all",
plugins: [require.resolve("prettier-plugin-organize-imports")],
};

module.exports = config;
7 changes: 7 additions & 0 deletions packages/rgbpp/src/barrel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export * from "./bitcoin/index.js";
export * from "./data-source/index.js";
export * from "./error.js";
export * from "./script/index.js";
export * from "./signer/index.js";
export * from "./udt/index.js";
export * from "./utils/index.js";
Loading