Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "ckb-cell/rgbpp-sdk" }],
"commit": false,
"fixed": [["@rgbpp-sdk/*"]],
"fixed": [["@rgbpp-sdk/*", "rgbpp"]],
"linked": [],
"access": "public",
"baseBranch": "main",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/flat-starfishes-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rgbpp": major
---

feat: Add rgbpp sub package
15 changes: 15 additions & 0 deletions packages/rgbpp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# rgbpp

RGB++ SDK

A root package to integrate of common functions from the RGB++ SDK sub-packages(btc/ckb/service).

## Installation

```
$ npm i rgbpp
# or
$ yarn add rgbpp
# or
$ pnpm add rgbpp
```
44 changes: 44 additions & 0 deletions packages/rgbpp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "rgbpp",
"version": "0.1.0",
"scripts": {
"build": "tsc -p tsconfig.build.json",
"lint": "tsc && eslint --ext .ts src/* && prettier --check 'src/*.ts'",
"lint:fix": "tsc && eslint --fix --ext .ts src/* && prettier --write 'src/*.ts'",
"clean": "pnpm run clean:cache & pnpm run clean:build",
"clean:build": "rimraf lib && pnpm run clean:buildinfo",
"clean:buildinfo": "rimraf tsconfig.*tsbuildinfo",
"clean:cache": "rimraf .turbo"
},
"main": "lib",
"exports": {
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./btc": {
"types": "./lib/btc.d.ts",
"default": "./lib/btc.js"
},
"./ckb": {
"types": "./lib/ckb.d.ts",
"default": "./lib/ckb.js"
},
"./service": {
"types": "./lib/service.d.ts",
"default": "./lib/service.js"
}
},
"files": [
"lib"
],
"types": "./lib/index.d.ts",
"dependencies": {
"@rgbpp-sdk/btc": "workspace:*",
"@rgbpp-sdk/ckb": "workspace:*",
"@rgbpp-sdk/service": "workspace:*"
},
"publishConfig": {
"access": "public"
}
}
1 change: 1 addition & 0 deletions packages/rgbpp/src/btc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@rgbpp-sdk/btc';
1 change: 1 addition & 0 deletions packages/rgbpp/src/ckb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@rgbpp-sdk/ckb';
54 changes: 54 additions & 0 deletions packages/rgbpp/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* ckb
*/
export {
genCreateClusterCkbVirtualTx,
genCreateSporeCkbVirtualTx,
genLeapSporeFromBtcToCkbVirtualTx,
genTransferSporeCkbVirtualTx,
genBtcTransferCkbVirtualTx,
genCkbJumpBtcVirtualTx,
genBtcBatchTransferCkbVirtualTx,
genLeapSporeFromCkbToBtcRawTx,
genRgbppLaunchCkbVirtualTx,
genBtcJumpCkbVirtualTx,
buildBtcTimeCellsSpentTx,
buildSporeBtcTimeCellsSpentTx,
signBtcTimeCellSpentTx,
} from '@rgbpp-sdk/ckb';
export type {
CreateClusterCkbVirtualTxParams,
CreateSporeCkbVirtualTxParams,
LeapSporeFromBtcToCkbVirtualTxParams,
TransferSporeCkbVirtualTxParams,
BtcTransferVirtualTxParams,
BtcJumpCkbVirtualTxParams,
BtcBatchTransferVirtualTxParams,
CkbJumpBtcVirtualTxParams,
SporeCreateVirtualTxResult,
BtcTransferVirtualTxResult,
BtcJumpCkbVirtualTxResult,
BtcBatchTransferVirtualTxResult,
SporeTransferVirtualTxResult,
SporeLeapVirtualTxResult,
SporeVirtualTxResult,
} from '@rgbpp-sdk/ckb';

/**
* service
*/
export { BtcAssetsApi, BtcAssetsApiError } from '@rgbpp-sdk/service';

/**
* btc
*/
export {
DataSource,
sendBtc,
sendUtxos,
sendRgbppUtxos,
createSendBtcBuilder,
createSendUtxosBuilder,
createSendRgbppUtxosBuilder,
} from '@rgbpp-sdk/btc';
export type { NetworkType, AddressType, SendBtcProps, SendUtxosProps, SendRgbppUtxosProps } from '@rgbpp-sdk/btc';
1 change: 1 addition & 0 deletions packages/rgbpp/src/service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@rgbpp-sdk/service';
9 changes: 9 additions & 0 deletions packages/rgbpp/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"rootDir": "src",
"outDir": "lib",
"noEmit": false
}
}
27 changes: 27 additions & 0 deletions packages/rgbpp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2015",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "ES2020",
"outDir": "./lib",
"composite": false,
"resolveJsonModule": true,
"strictNullChecks": true,
"noEmit": true,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"moduleResolution": "node",
"noUnusedLocals": false,
"noUnusedParameters": false,
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
}
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.