@ckb-ccc/lumos-patches 0.0.12-alpha.6 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # @ckb-ccc/lumos-patches
2
+
3
+ ## 0.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @ckb-ccc/core@0.0.12
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="https://ckbccc-demo.vercel.app/">
2
+ <a href="https://app.ckbccc.com/">
3
3
  <img alt="Logo" src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/logo.svg" width="20%" />
4
4
  </a>
5
5
  </p>
@@ -15,7 +15,7 @@
15
15
  <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/ckb-ecofund/ccc" />
16
16
  <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/ckb-ecofund/ccc/master" />
17
17
  <img alt="GitHub deployments" src="https://img.shields.io/github/deployments/ckb-ecofund/ccc/production" />
18
- <a href="https://ckbccc-demo.vercel.app/"><img
18
+ <a href="https://app.ckbccc.com/"><img
19
19
  alt="Demo" src="https://img.shields.io/website?url=https%3A%2F%2Fckbccc-demo.vercel.app%2F&label=Demo"
20
20
  /></a>
21
21
  </p>
@@ -33,13 +33,13 @@
33
33
  ## Preview
34
34
 
35
35
  <p align="center">
36
- <a href="https://ckbccc-demo.vercel.app/">
36
+ <a href="https://app.ckbccc.com/">
37
37
  <img src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/preview.png" width="30%" />
38
38
  </a>
39
39
  </p>
40
40
 
41
- This project is still under active development, and we are looking forward to your feedback. [Try its demo now here](https://ckbccc-demo.vercel.app/). It showcases how to use CCC for some basic scenarios in CKB.
41
+ This project is still under active development, and we are looking forward to your feedback. [Try its demo now here](https://app.ckbccc.com/). It showcases how to use CCC for some basic scenarios in CKB.
42
42
 
43
43
  <h3 align="center">
44
- Read more about CCC on its <a href="https://github.com/ckb-ecofund/ccc">GitHub Repo</a>.
44
+ Read more about CCC on <a href="https://docs.ckbccc.com">our website</a> or <a href="https://github.com/ckb-ecofund/ccc">GitHub Repo</a>.
45
45
  </h3>
package/dist/default.d.ts CHANGED
@@ -2,14 +2,16 @@ import { ccc } from "@ckb-ccc/core";
2
2
  import { LockScriptInfo } from "@ckb-lumos/common-scripts";
3
3
  /**
4
4
  * Generates custom lock script information.
5
- * @param {string} codeHash - The code hash of the custom script.
6
- * @param {CellDep[]} cellDeps - The cell dependencies for the custom script.
7
- * @returns {LockScriptInfo} The lock script information.
5
+ * @public
6
+ *
7
+ * @param codeHash - The code hash of the custom script.
8
+ * @param cellDeps - The cell dependencies for the custom script.
9
+ * @returns The lock script information.
8
10
  */
9
11
  export declare function generateScriptInfo(codeHash: string, cellDeps: ccc.CellDepInfoLike[], dummyLockLength: number): LockScriptInfo;
10
12
  /**
11
13
  * Generates default script information for CCC.
12
- * @returns {LockScriptInfo[]} An array of lock script information.
14
+ * @returns An array of lock script information.
13
15
  */
14
16
  export declare function generateDefaultScriptInfos(): LockScriptInfo[];
15
17
  //# sourceMappingURL=default.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../src/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAWpC,OAAO,EAEL,cAAc,EAEf,MAAM,2BAA2B,CAAC;AAqGnC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,CAAC,eAAe,EAAE,EAC/B,eAAe,EAAE,MAAM,GACtB,cAAc,CAmGhB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,cAAc,EAAE,CAwB7D"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../src/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAWpC,OAAO,EAEL,cAAc,EAEf,MAAM,2BAA2B,CAAC;AAoGnC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,CAAC,eAAe,EAAE,EAC/B,eAAe,EAAE,MAAM,GACtB,cAAc,CAmGhB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,cAAc,EAAE,CAwB7D"}
package/dist/default.js CHANGED
@@ -21,22 +21,21 @@ function addCellDep(txSkeleton, newCellDep) {
21
21
  }
22
22
  /**
23
23
  * Generates a class for collecting custom script cells.
24
- * @param {string} codeHash - The code hash of the custom script.
25
- * @returns {typeof JoyIDCellCollector} The CustomCellCollector class.
24
+ * @param codeHash - The code hash of the custom script.
25
+ * @returns The CustomCellCollector class.
26
26
  */
27
27
  function generateCollectorClass(codeHash) {
28
28
  /**
29
29
  * Class representing a collector for custom script cells.
30
- * @class
31
30
  */
32
31
  return class CustomCellCollector {
33
32
  /**
34
33
  * Creates an instance of CustomCollector.
35
- * @param {FromInfo} fromInfo - The information about the address to collect cells from.
36
- * @param {CellProvider} cellProvider - The provider to collect cells from.
37
- * @param {Object} options - The options for the collector.
38
- * @param {QueryOptions} [options.queryOptions={}] - The query options for collecting cells.
39
- * @param {Config} [options.config=getConfig()] - The Lumos configuration.
34
+ * @param fromInfo - The information about the address to collect cells from.
35
+ * @param cellProvider - The provider to collect cells from.
36
+ * @param options - The options for the collector.
37
+ * @param] - The query options for collecting cells.
38
+ * @param [options.config=getConfig()] - The Lumos configuration.
40
39
  * @throws {Error} If cellProvider is not provided or fromInfo is not a string.
41
40
  */
42
41
  constructor(fromInfo, cellProvider, { queryOptions = {}, config = getConfig(), }) {
@@ -75,9 +74,11 @@ function generateCollectorClass(codeHash) {
75
74
  }
76
75
  /**
77
76
  * Generates custom lock script information.
78
- * @param {string} codeHash - The code hash of the custom script.
79
- * @param {CellDep[]} cellDeps - The cell dependencies for the custom script.
80
- * @returns {LockScriptInfo} The lock script information.
77
+ * @public
78
+ *
79
+ * @param codeHash - The code hash of the custom script.
80
+ * @param cellDeps - The cell dependencies for the custom script.
81
+ * @returns The lock script information.
81
82
  */
82
83
  export function generateScriptInfo(codeHash, cellDeps, dummyLockLength) {
83
84
  return {
@@ -150,7 +151,7 @@ export function generateScriptInfo(codeHash, cellDeps, dummyLockLength) {
150
151
  }
151
152
  /**
152
153
  * Generates default script information for CCC.
153
- * @returns {LockScriptInfo[]} An array of lock script information.
154
+ * @returns An array of lock script information.
154
155
  */
155
156
  export function generateDefaultScriptInfos() {
156
157
  const mainnet = cccA.MAINNET_SCRIPTS;
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Asserts that a condition is true, throwing an error if it is not.
3
- * @param {unknown} condition - The condition to assert.
4
- * @param {string} [message="Assert failed"] - The error message to throw if the condition is false.
3
+ * @public
4
+ *
5
+ * @param condition - The condition to assert.
6
+ * @param [message="Assert failed"] - The error message to throw if the condition is false.
5
7
  * @throws {Error} If the condition is false.
6
8
  */
7
9
  export declare function asserts(condition: unknown, message?: string): asserts condition;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,OAAO,CACrB,SAAS,EAAE,OAAO,EAClB,OAAO,SAAkB,GACxB,OAAO,CAAC,SAAS,CAInB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,SAAS,EAAE,OAAO,EAClB,OAAO,SAAkB,GACxB,OAAO,CAAC,SAAS,CAInB"}
package/dist/utils.js CHANGED
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Asserts that a condition is true, throwing an error if it is not.
3
- * @param {unknown} condition - The condition to assert.
4
- * @param {string} [message="Assert failed"] - The error message to throw if the condition is false.
3
+ * @public
4
+ *
5
+ * @param condition - The condition to assert.
6
+ * @param [message="Assert failed"] - The error message to throw if the condition is false.
5
7
  * @throws {Error} If the condition is false.
6
8
  */
7
9
  export function asserts(condition, message = "Assert failed") {
@@ -2,14 +2,16 @@ import { ccc } from "@ckb-ccc/core";
2
2
  import { LockScriptInfo } from "@ckb-lumos/common-scripts";
3
3
  /**
4
4
  * Generates custom lock script information.
5
- * @param {string} codeHash - The code hash of the custom script.
6
- * @param {CellDep[]} cellDeps - The cell dependencies for the custom script.
7
- * @returns {LockScriptInfo} The lock script information.
5
+ * @public
6
+ *
7
+ * @param codeHash - The code hash of the custom script.
8
+ * @param cellDeps - The cell dependencies for the custom script.
9
+ * @returns The lock script information.
8
10
  */
9
11
  export declare function generateScriptInfo(codeHash: string, cellDeps: ccc.CellDepInfoLike[], dummyLockLength: number): LockScriptInfo;
10
12
  /**
11
13
  * Generates default script information for CCC.
12
- * @returns {LockScriptInfo[]} An array of lock script information.
14
+ * @returns An array of lock script information.
13
15
  */
14
16
  export declare function generateDefaultScriptInfos(): LockScriptInfo[];
15
17
  //# sourceMappingURL=default.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../src/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAWpC,OAAO,EAEL,cAAc,EAEf,MAAM,2BAA2B,CAAC;AAqGnC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,CAAC,eAAe,EAAE,EAC/B,eAAe,EAAE,MAAM,GACtB,cAAc,CAmGhB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,cAAc,EAAE,CAwB7D"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../src/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAWpC,OAAO,EAEL,cAAc,EAEf,MAAM,2BAA2B,CAAC;AAoGnC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,CAAC,eAAe,EAAE,EAC/B,eAAe,EAAE,MAAM,GACtB,cAAc,CAmGhB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,cAAc,EAAE,CAwB7D"}
@@ -24,22 +24,21 @@ function addCellDep(txSkeleton, newCellDep) {
24
24
  }
25
25
  /**
26
26
  * Generates a class for collecting custom script cells.
27
- * @param {string} codeHash - The code hash of the custom script.
28
- * @returns {typeof JoyIDCellCollector} The CustomCellCollector class.
27
+ * @param codeHash - The code hash of the custom script.
28
+ * @returns The CustomCellCollector class.
29
29
  */
30
30
  function generateCollectorClass(codeHash) {
31
31
  /**
32
32
  * Class representing a collector for custom script cells.
33
- * @class
34
33
  */
35
34
  return class CustomCellCollector {
36
35
  /**
37
36
  * Creates an instance of CustomCollector.
38
- * @param {FromInfo} fromInfo - The information about the address to collect cells from.
39
- * @param {CellProvider} cellProvider - The provider to collect cells from.
40
- * @param {Object} options - The options for the collector.
41
- * @param {QueryOptions} [options.queryOptions={}] - The query options for collecting cells.
42
- * @param {Config} [options.config=getConfig()] - The Lumos configuration.
37
+ * @param fromInfo - The information about the address to collect cells from.
38
+ * @param cellProvider - The provider to collect cells from.
39
+ * @param options - The options for the collector.
40
+ * @param] - The query options for collecting cells.
41
+ * @param [options.config=getConfig()] - The Lumos configuration.
43
42
  * @throws {Error} If cellProvider is not provided or fromInfo is not a string.
44
43
  */
45
44
  constructor(fromInfo, cellProvider, { queryOptions = {}, config = (0, config_manager_1.getConfig)(), }) {
@@ -78,9 +77,11 @@ function generateCollectorClass(codeHash) {
78
77
  }
79
78
  /**
80
79
  * Generates custom lock script information.
81
- * @param {string} codeHash - The code hash of the custom script.
82
- * @param {CellDep[]} cellDeps - The cell dependencies for the custom script.
83
- * @returns {LockScriptInfo} The lock script information.
80
+ * @public
81
+ *
82
+ * @param codeHash - The code hash of the custom script.
83
+ * @param cellDeps - The cell dependencies for the custom script.
84
+ * @returns The lock script information.
84
85
  */
85
86
  function generateScriptInfo(codeHash, cellDeps, dummyLockLength) {
86
87
  return {
@@ -154,7 +155,7 @@ function generateScriptInfo(codeHash, cellDeps, dummyLockLength) {
154
155
  exports.generateScriptInfo = generateScriptInfo;
155
156
  /**
156
157
  * Generates default script information for CCC.
157
- * @returns {LockScriptInfo[]} An array of lock script information.
158
+ * @returns An array of lock script information.
158
159
  */
159
160
  function generateDefaultScriptInfos() {
160
161
  const mainnet = advanced_1.cccA.MAINNET_SCRIPTS;
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Asserts that a condition is true, throwing an error if it is not.
3
- * @param {unknown} condition - The condition to assert.
4
- * @param {string} [message="Assert failed"] - The error message to throw if the condition is false.
3
+ * @public
4
+ *
5
+ * @param condition - The condition to assert.
6
+ * @param [message="Assert failed"] - The error message to throw if the condition is false.
5
7
  * @throws {Error} If the condition is false.
6
8
  */
7
9
  export declare function asserts(condition: unknown, message?: string): asserts condition;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,OAAO,CACrB,SAAS,EAAE,OAAO,EAClB,OAAO,SAAkB,GACxB,OAAO,CAAC,SAAS,CAInB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,SAAS,EAAE,OAAO,EAClB,OAAO,SAAkB,GACxB,OAAO,CAAC,SAAS,CAInB"}
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.asserts = void 0;
4
4
  /**
5
5
  * Asserts that a condition is true, throwing an error if it is not.
6
- * @param {unknown} condition - The condition to assert.
7
- * @param {string} [message="Assert failed"] - The error message to throw if the condition is false.
6
+ * @public
7
+ *
8
+ * @param condition - The condition to assert.
9
+ * @param [message="Assert failed"] - The error message to throw if the condition is false.
8
10
  * @throws {Error} If the condition is false.
9
11
  */
10
12
  function asserts(condition, message = "Assert failed") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckb-ccc/lumos-patches",
3
- "version": "0.0.12-alpha.6",
3
+ "version": "0.0.12",
4
4
  "description": "Patches for using Lumos with CCC",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
@@ -18,11 +18,6 @@
18
18
  "default": "./dist.commonjs/index.js"
19
19
  }
20
20
  },
21
- "scripts": {
22
- "build": "rimraf ./dist && rimraf ./dist.commonjs && tsc && tsc --project tsconfig.commonjs.json && copyfiles -u 2 misc/basedirs/**/* .",
23
- "lint": "eslint",
24
- "format": "prettier --write . && eslint --fix"
25
- },
26
21
  "devDependencies": {
27
22
  "@eslint/js": "^9.1.1",
28
23
  "copyfiles": "^2.4.1",
@@ -39,13 +34,17 @@
39
34
  "access": "public"
40
35
  },
41
36
  "dependencies": {
42
- "@ckb-ccc/core": "0.0.12-alpha.1",
43
37
  "@ckb-lumos/base": "^0.24.0-next.1",
44
38
  "@ckb-lumos/codec": "^0.24.0-next.1",
45
39
  "@ckb-lumos/common-scripts": "^0.24.0-next.1",
46
40
  "@ckb-lumos/config-manager": "^0.24.0-next.1",
47
41
  "@ckb-lumos/helpers": "^0.24.0-next.1",
48
- "@joyid/ckb": "^1.0.1"
42
+ "@joyid/ckb": "^1.0.1",
43
+ "@ckb-ccc/core": "0.0.12"
49
44
  },
50
- "gitHead": "3679eba15c5ec5397c514444594a09b777c3ffe1"
51
- }
45
+ "scripts": {
46
+ "build": "rimraf ./dist && rimraf ./dist.commonjs && tsc && tsc --project tsconfig.commonjs.json && copyfiles -u 2 misc/basedirs/**/* .",
47
+ "lint": "eslint",
48
+ "format": "prettier --write . && eslint --fix"
49
+ }
50
+ }
package/src/default.ts CHANGED
@@ -45,13 +45,12 @@ function addCellDep(
45
45
 
46
46
  /**
47
47
  * Generates a class for collecting custom script cells.
48
- * @param {string} codeHash - The code hash of the custom script.
49
- * @returns {typeof JoyIDCellCollector} The CustomCellCollector class.
48
+ * @param codeHash - The code hash of the custom script.
49
+ * @returns The CustomCellCollector class.
50
50
  */
51
51
  function generateCollectorClass(codeHash: string) {
52
52
  /**
53
53
  * Class representing a collector for custom script cells.
54
- * @class
55
54
  */
56
55
  return class CustomCellCollector {
57
56
  readonly fromScript: Script;
@@ -59,11 +58,11 @@ function generateCollectorClass(codeHash: string) {
59
58
 
60
59
  /**
61
60
  * Creates an instance of CustomCollector.
62
- * @param {FromInfo} fromInfo - The information about the address to collect cells from.
63
- * @param {CellProvider} cellProvider - The provider to collect cells from.
64
- * @param {Object} options - The options for the collector.
65
- * @param {QueryOptions} [options.queryOptions={}] - The query options for collecting cells.
66
- * @param {Config} [options.config=getConfig()] - The Lumos configuration.
61
+ * @param fromInfo - The information about the address to collect cells from.
62
+ * @param cellProvider - The provider to collect cells from.
63
+ * @param options - The options for the collector.
64
+ * @param] - The query options for collecting cells.
65
+ * @param [options.config=getConfig()] - The Lumos configuration.
67
66
  * @throws {Error} If cellProvider is not provided or fromInfo is not a string.
68
67
  */
69
68
  constructor(
@@ -116,9 +115,11 @@ function generateCollectorClass(codeHash: string) {
116
115
 
117
116
  /**
118
117
  * Generates custom lock script information.
119
- * @param {string} codeHash - The code hash of the custom script.
120
- * @param {CellDep[]} cellDeps - The cell dependencies for the custom script.
121
- * @returns {LockScriptInfo} The lock script information.
118
+ * @public
119
+ *
120
+ * @param codeHash - The code hash of the custom script.
121
+ * @param cellDeps - The cell dependencies for the custom script.
122
+ * @returns The lock script information.
122
123
  */
123
124
  export function generateScriptInfo(
124
125
  codeHash: string,
@@ -227,7 +228,7 @@ export function generateScriptInfo(
227
228
 
228
229
  /**
229
230
  * Generates default script information for CCC.
230
- * @returns {LockScriptInfo[]} An array of lock script information.
231
+ * @returns An array of lock script information.
231
232
  */
232
233
  export function generateDefaultScriptInfos(): LockScriptInfo[] {
233
234
  const mainnet = cccA.MAINNET_SCRIPTS;
package/src/utils.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Asserts that a condition is true, throwing an error if it is not.
3
- * @param {unknown} condition - The condition to assert.
4
- * @param {string} [message="Assert failed"] - The error message to throw if the condition is false.
3
+ * @public
4
+ *
5
+ * @param condition - The condition to assert.
6
+ * @param [message="Assert failed"] - The error message to throw if the condition is false.
5
7
  * @throws {Error} If the condition is false.
6
8
  */
7
9
  export function asserts(
package/typedoc.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://typedoc.org/schema.json",
3
+ "entryPoints": ["./src/index.ts"],
4
+ "extends": ["../../typedoc.base.json"],
5
+ "name": "@ckb-ccc lumos-patches"
6
+ }