@ckbfs/api 1.5.0 → 2.0.0
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/README.md +31 -6
- package/RFC.v3.md +210 -0
- package/dist/index.d.ts +72 -7
- package/dist/index.js +440 -75
- package/dist/utils/checksum.d.ts +16 -0
- package/dist/utils/checksum.js +74 -8
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/constants.js +12 -2
- package/dist/utils/file.d.ts +44 -0
- package/dist/utils/file.js +303 -30
- package/dist/utils/molecule.d.ts +13 -1
- package/dist/utils/molecule.js +32 -5
- package/dist/utils/transaction-backup.d.ts +117 -0
- package/dist/utils/transaction-backup.js +624 -0
- package/dist/utils/transaction.d.ts +7 -105
- package/dist/utils/transaction.js +45 -565
- package/dist/utils/transactions/index.d.ts +8 -0
- package/dist/utils/transactions/index.js +31 -0
- package/dist/utils/transactions/shared.d.ts +57 -0
- package/dist/utils/transactions/shared.js +17 -0
- package/dist/utils/transactions/v1v2.d.ts +80 -0
- package/dist/utils/transactions/v1v2.js +592 -0
- package/dist/utils/transactions/v3.d.ts +124 -0
- package/dist/utils/transactions/v3.js +369 -0
- package/dist/utils/witness.d.ts +45 -0
- package/dist/utils/witness.js +145 -3
- package/examples/append-v3.ts +310 -0
- package/examples/chunked-publish.ts +307 -0
- package/examples/publish-v3.ts +152 -0
- package/examples/publish.ts +4 -4
- package/examples/retrieve-v3.ts +222 -0
- package/package.json +6 -2
- package/small-example.txt +1 -0
- package/src/index.ts +568 -87
- package/src/utils/checksum.ts +90 -9
- package/src/utils/constants.ts +19 -2
- package/src/utils/file.ts +386 -35
- package/src/utils/molecule.ts +43 -6
- package/src/utils/transaction-backup.ts +849 -0
- package/src/utils/transaction.ts +39 -848
- package/src/utils/transactions/index.ts +16 -0
- package/src/utils/transactions/shared.ts +64 -0
- package/src/utils/transactions/v1v2.ts +791 -0
- package/src/utils/transactions/v3.ts +564 -0
- package/src/utils/witness.ts +193 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckbfs/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "SDK for CKBFS protocol on CKB",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Code Monad<code@lab-11.org>",
|
|
@@ -14,9 +14,13 @@
|
|
|
14
14
|
"test": "jest",
|
|
15
15
|
"example": "ts-node examples/index.ts",
|
|
16
16
|
"example:publish": "ts-node examples/publish.ts",
|
|
17
|
+
"example:chunked-publish": "ts-node examples/chunked-publish.ts",
|
|
17
18
|
"example:append": "ts-node examples/append.ts",
|
|
18
19
|
"example:retrieve": "ts-node examples/retrieve.ts",
|
|
19
|
-
"example:witness-decode-demo": "ts-node examples/witness-decode-demo.ts"
|
|
20
|
+
"example:witness-decode-demo": "ts-node examples/witness-decode-demo.ts",
|
|
21
|
+
"example:publish-v3": "ts-node examples/publish-v3.ts",
|
|
22
|
+
"example:append-v3": "ts-node examples/append-v3.ts",
|
|
23
|
+
"example:retrieve-v3": "ts-node examples/retrieve-v3.ts"
|
|
20
24
|
},
|
|
21
25
|
"keywords": [
|
|
22
26
|
"ckb",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is a small test file that should be published directly.
|