@ckb-ccc/spore 1.5.7 → 1.5.8
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
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @ckb-ccc/spore
|
|
2
2
|
|
|
3
|
+
## 1.5.8
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#282](https://github.com/ckb-devrel/ccc/pull/282) [`d4fb021`](https://github.com/ckb-devrel/ccc/commit/d4fb021472a83b7871fd44824e9bb786cc412252) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore(deps): bump dependency version
|
|
9
|
+
|
|
10
|
+
- Updated dependencies [[`d4fb021`](https://github.com/ckb-devrel/ccc/commit/d4fb021472a83b7871fd44824e9bb786cc412252)]:
|
|
11
|
+
- @ckb-ccc/core@1.11.3
|
|
12
|
+
|
|
3
13
|
## 1.5.7
|
|
4
14
|
### Patch Changes
|
|
5
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/dob/api/encode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/dob/api/encode.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,GAAG,EACH,IAAI,EACJ,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAO/C;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA0BlE;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAyClE"}
|
package/dist/dob/api/encode.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/core";
|
|
1
2
|
import { checkDecoder, checkPatternDob0, checkPatternDob1, } from "../helper/index.js";
|
|
2
3
|
export function encodeDna(dna) {
|
|
3
|
-
const
|
|
4
|
-
|
|
4
|
+
const data = ccc.bytesFrom(JSON.stringify(dna), "utf8");
|
|
5
|
+
const arrayBuffer = new ArrayBuffer(data.byteLength);
|
|
6
|
+
const view = new Uint8Array(arrayBuffer);
|
|
7
|
+
view.set(data);
|
|
8
|
+
return arrayBuffer;
|
|
5
9
|
}
|
|
6
10
|
export function encodeClusterDescriptionForDob0(dob0) {
|
|
7
11
|
checkDecoder(dob0.dob.decoder);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/dob/api/encode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/dob/api/encode.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,GAAG,EACH,IAAI,EACJ,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAO/C;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA0BlE;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAyClE"}
|
|
@@ -3,10 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.encodeDna = encodeDna;
|
|
4
4
|
exports.encodeClusterDescriptionForDob0 = encodeClusterDescriptionForDob0;
|
|
5
5
|
exports.encodeClusterDescriptionForDob1 = encodeClusterDescriptionForDob1;
|
|
6
|
+
const core_1 = require("@ckb-ccc/core");
|
|
6
7
|
const index_js_1 = require("../helper/index.js");
|
|
7
8
|
function encodeDna(dna) {
|
|
8
|
-
const
|
|
9
|
-
|
|
9
|
+
const data = core_1.ccc.bytesFrom(JSON.stringify(dna), "utf8");
|
|
10
|
+
const arrayBuffer = new ArrayBuffer(data.byteLength);
|
|
11
|
+
const view = new Uint8Array(arrayBuffer);
|
|
12
|
+
view.set(data);
|
|
13
|
+
return arrayBuffer;
|
|
10
14
|
}
|
|
11
15
|
function encodeClusterDescriptionForDob0(dob0) {
|
|
12
16
|
(0, index_js_1.checkDecoder)(dob0.dob.decoder);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckb-ccc/spore",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.8",
|
|
4
4
|
"description": "CCC - CKBer's Codebase. Common Chains Connector's support for Spore protocol",
|
|
5
5
|
"author": "ashuralyk <ashuralyk@live.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,26 +36,26 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@eslint/js": "^9.
|
|
40
|
-
"@types/node": "^22.
|
|
39
|
+
"@eslint/js": "^9.34.0",
|
|
40
|
+
"@types/node": "^22.18.0",
|
|
41
41
|
"copyfiles": "^2.4.1",
|
|
42
|
-
"dotenv": "^16.
|
|
43
|
-
"eslint": "^9.
|
|
44
|
-
"eslint-config-prettier": "^10.1.
|
|
45
|
-
"eslint-plugin-prettier": "^5.4
|
|
46
|
-
"prettier": "^3.
|
|
47
|
-
"prettier-plugin-organize-imports": "^4.
|
|
48
|
-
"rimraf": "^5.0.
|
|
49
|
-
"typescript": "^5.
|
|
50
|
-
"typescript-eslint": "^7.
|
|
51
|
-
"vitest": "^3.2.
|
|
42
|
+
"dotenv": "^16.6.1",
|
|
43
|
+
"eslint": "^9.34.0",
|
|
44
|
+
"eslint-config-prettier": "^10.1.8",
|
|
45
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
46
|
+
"prettier": "^3.6.2",
|
|
47
|
+
"prettier-plugin-organize-imports": "^4.2.0",
|
|
48
|
+
"rimraf": "^5.0.10",
|
|
49
|
+
"typescript": "^5.9.2",
|
|
50
|
+
"typescript-eslint": "^7.18.0",
|
|
51
|
+
"vitest": "^3.2.4"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"axios": "^1.
|
|
58
|
-
"@ckb-ccc/core": "1.11.
|
|
57
|
+
"axios": "^1.11.0",
|
|
58
|
+
"@ckb-ccc/core": "1.11.3"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "rimraf ./dist && rimraf ./dist.commonjs && tsc && tsc --project tsconfig.commonjs.json && copyfiles -u 2 misc/basedirs/**/* .",
|
package/src/dob/api/encode.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/core";
|
|
1
2
|
import {
|
|
2
3
|
checkDecoder,
|
|
3
4
|
checkPatternDob0,
|
|
@@ -8,8 +9,12 @@ import {
|
|
|
8
9
|
} from "../helper/index.js";
|
|
9
10
|
|
|
10
11
|
export function encodeDna(dna: DNA): ArrayBuffer {
|
|
11
|
-
const
|
|
12
|
-
|
|
12
|
+
const data = ccc.bytesFrom(JSON.stringify(dna), "utf8");
|
|
13
|
+
const arrayBuffer = new ArrayBuffer(data.byteLength);
|
|
14
|
+
const view = new Uint8Array(arrayBuffer);
|
|
15
|
+
|
|
16
|
+
view.set(data);
|
|
17
|
+
return arrayBuffer;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
export function encodeClusterDescriptionForDob0(dob0: Dob0): string {
|