@ckbfs/api 2.0.6 → 2.0.7
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/dist/utils/constants.js +9 -0
- package/examples/nervape.ts +1 -0
- package/package.json +1 -1
- package/src/utils/constants.ts +16 -0
package/dist/utils/constants.js
CHANGED
|
@@ -20,6 +20,7 @@ exports.ProtocolVersion = {
|
|
|
20
20
|
exports.CKBFS_CODE_HASH = {
|
|
21
21
|
[NetworkType.Mainnet]: {
|
|
22
22
|
[exports.ProtocolVersion.V2]: "0x31e6376287d223b8c0410d562fb422f04d1d617b2947596a14c3d2efb7218d3a",
|
|
23
|
+
[exports.ProtocolVersion.V3]: "0xb5d13ffe0547c78021c01fe24dce2e959a1ed8edbca3cb93dd2e9f57fb56d695",
|
|
23
24
|
},
|
|
24
25
|
[NetworkType.Testnet]: {
|
|
25
26
|
[exports.ProtocolVersion.V1]: "0xe8905ad29a02cf8befa9c258f4f941773839a618d75a64afc22059de9413f712",
|
|
@@ -30,6 +31,7 @@ exports.CKBFS_CODE_HASH = {
|
|
|
30
31
|
exports.CKBFS_TYPE_ID = {
|
|
31
32
|
[NetworkType.Mainnet]: {
|
|
32
33
|
[exports.ProtocolVersion.V2]: "0xfd2058c9a0c0183354cf637e25d2707ffa9bb6fa2ba9b29f4ebc6be3e54ad7eb",
|
|
34
|
+
[exports.ProtocolVersion.V3]: "0xcc5411e8b70e551d7a3dd806256533cff6bc12118b48dd7b2d5d2292c3651add",
|
|
33
35
|
},
|
|
34
36
|
[NetworkType.Testnet]: {
|
|
35
37
|
[exports.ProtocolVersion.V1]: "0x88ef4d436af35684a27edda0d44dd8771318330285f90f02d13606e095aea86f",
|
|
@@ -41,6 +43,7 @@ exports.CKBFS_TYPE_ID = {
|
|
|
41
43
|
exports.ADLER32_CODE_HASH = {
|
|
42
44
|
[NetworkType.Mainnet]: {
|
|
43
45
|
[exports.ProtocolVersion.V2]: "0x2138683f76944437c0c643664120d620bdb5858dd6c9d1d156805e279c2c536f",
|
|
46
|
+
[exports.ProtocolVersion.V3]: "0xbd944c8c5aa127270b591d50ab899c9a2a3e4429300db4ea3d7523aa592c1db1",
|
|
44
47
|
},
|
|
45
48
|
[NetworkType.Testnet]: {
|
|
46
49
|
[exports.ProtocolVersion.V1]: "0x8af42cd329cf1bcffb4c73b48252e99cb32346fdbc1cdaa5ae1d000232d47e84",
|
|
@@ -51,6 +54,7 @@ exports.ADLER32_CODE_HASH = {
|
|
|
51
54
|
exports.ADLER32_TYPE_ID = {
|
|
52
55
|
[NetworkType.Mainnet]: {
|
|
53
56
|
[exports.ProtocolVersion.V2]: "0x641c01d590833a3f5471bd441651d9f2a8a200141949cdfeef2d68d8094c5876",
|
|
57
|
+
[exports.ProtocolVersion.V3]: "0x01b150adbbcba724a3917aefec6453ce4dbf70072d31ad42d0f3429ea32c692b",
|
|
54
58
|
},
|
|
55
59
|
[NetworkType.Testnet]: {
|
|
56
60
|
[exports.ProtocolVersion.V1]: "0xccf29a0d8e860044a3d2f6a6e709f6572f77e4fe245fadd212fc342337048d60",
|
|
@@ -62,6 +66,7 @@ exports.ADLER32_TYPE_ID = {
|
|
|
62
66
|
exports.DEP_GROUP_TX_HASH = {
|
|
63
67
|
[NetworkType.Mainnet]: {
|
|
64
68
|
[exports.ProtocolVersion.V2]: "0xfab07962ed7178ed88d450774e2a6ecd50bae856bdb9b692980be8c5147d1bfa",
|
|
69
|
+
[exports.ProtocolVersion.V3]: "0x03deba7f8206c81981d6f6a2d61b67dde75b4df91cbcfaf2e2fb041ba50c4719",
|
|
65
70
|
},
|
|
66
71
|
[NetworkType.Testnet]: {
|
|
67
72
|
[exports.ProtocolVersion.V1]: "0xc8fd44aba36f0c4b37536b6c7ea3b88df65fa97e02f77cd33b9bf20bf241a09b",
|
|
@@ -76,6 +81,10 @@ exports.DEPLOY_TX_HASH = {
|
|
|
76
81
|
ckbfs: "0xc9b6698f44c3b80e7e1c48823b2714e432b93f0206ffaf9df885d23267ed2ebc",
|
|
77
82
|
adler32: "0xc9b6698f44c3b80e7e1c48823b2714e432b93f0206ffaf9df885d23267ed2ebc",
|
|
78
83
|
},
|
|
84
|
+
[exports.ProtocolVersion.V3]: {
|
|
85
|
+
ckbfs: "0xd25f2c32f56c28c630d4f91955f1b3c9cd53e26fa0745d540d934e8e3d3c2853",
|
|
86
|
+
adler32: "0xd25f2c32f56c28c630d4f91955f1b3c9cd53e26fa0745d540d934e8e3d3c2853",
|
|
87
|
+
},
|
|
79
88
|
},
|
|
80
89
|
[NetworkType.Testnet]: {
|
|
81
90
|
[exports.ProtocolVersion.V1]: {
|
package/examples/nervape.ts
CHANGED
|
@@ -167,6 +167,7 @@ export async function giveName(name: string, ckbfsId: string) {
|
|
|
167
167
|
|
|
168
168
|
const signer = ckbfs['signer']
|
|
169
169
|
const address = await signer.getRecommendedAddress()
|
|
170
|
+
console.log("address=", address)
|
|
170
171
|
const addressHash = await getAddressScriptHash(address)
|
|
171
172
|
console.log("addressHash=", addressHash)
|
|
172
173
|
let tx = await ckbfs.createAppendContentTransaction(content, ckbfsCell, {
|
package/package.json
CHANGED
package/src/utils/constants.ts
CHANGED
|
@@ -23,6 +23,8 @@ export const CKBFS_CODE_HASH: Record<NetworkType, Record<string, string>> = {
|
|
|
23
23
|
[NetworkType.Mainnet]: {
|
|
24
24
|
[ProtocolVersion.V2]:
|
|
25
25
|
"0x31e6376287d223b8c0410d562fb422f04d1d617b2947596a14c3d2efb7218d3a",
|
|
26
|
+
[ProtocolVersion.V3]:
|
|
27
|
+
"0xb5d13ffe0547c78021c01fe24dce2e959a1ed8edbca3cb93dd2e9f57fb56d695",
|
|
26
28
|
},
|
|
27
29
|
[NetworkType.Testnet]: {
|
|
28
30
|
[ProtocolVersion.V1]:
|
|
@@ -38,6 +40,8 @@ export const CKBFS_TYPE_ID: Record<NetworkType, Record<string, string>> = {
|
|
|
38
40
|
[NetworkType.Mainnet]: {
|
|
39
41
|
[ProtocolVersion.V2]:
|
|
40
42
|
"0xfd2058c9a0c0183354cf637e25d2707ffa9bb6fa2ba9b29f4ebc6be3e54ad7eb",
|
|
43
|
+
[ProtocolVersion.V3]:
|
|
44
|
+
"0xcc5411e8b70e551d7a3dd806256533cff6bc12118b48dd7b2d5d2292c3651add",
|
|
41
45
|
},
|
|
42
46
|
[NetworkType.Testnet]: {
|
|
43
47
|
[ProtocolVersion.V1]:
|
|
@@ -54,6 +58,8 @@ export const ADLER32_CODE_HASH: Record<NetworkType, Record<string, string>> = {
|
|
|
54
58
|
[NetworkType.Mainnet]: {
|
|
55
59
|
[ProtocolVersion.V2]:
|
|
56
60
|
"0x2138683f76944437c0c643664120d620bdb5858dd6c9d1d156805e279c2c536f",
|
|
61
|
+
[ProtocolVersion.V3]:
|
|
62
|
+
"0xbd944c8c5aa127270b591d50ab899c9a2a3e4429300db4ea3d7523aa592c1db1",
|
|
57
63
|
},
|
|
58
64
|
[NetworkType.Testnet]: {
|
|
59
65
|
[ProtocolVersion.V1]:
|
|
@@ -69,6 +75,8 @@ export const ADLER32_TYPE_ID: Record<NetworkType, Record<string, string>> = {
|
|
|
69
75
|
[NetworkType.Mainnet]: {
|
|
70
76
|
[ProtocolVersion.V2]:
|
|
71
77
|
"0x641c01d590833a3f5471bd441651d9f2a8a200141949cdfeef2d68d8094c5876",
|
|
78
|
+
[ProtocolVersion.V3]:
|
|
79
|
+
"0x01b150adbbcba724a3917aefec6453ce4dbf70072d31ad42d0f3429ea32c692b",
|
|
72
80
|
},
|
|
73
81
|
[NetworkType.Testnet]: {
|
|
74
82
|
[ProtocolVersion.V1]:
|
|
@@ -85,6 +93,8 @@ export const DEP_GROUP_TX_HASH: Record<NetworkType, Record<string, string>> = {
|
|
|
85
93
|
[NetworkType.Mainnet]: {
|
|
86
94
|
[ProtocolVersion.V2]:
|
|
87
95
|
"0xfab07962ed7178ed88d450774e2a6ecd50bae856bdb9b692980be8c5147d1bfa",
|
|
96
|
+
[ProtocolVersion.V3]:
|
|
97
|
+
"0x03deba7f8206c81981d6f6a2d61b67dde75b4df91cbcfaf2e2fb041ba50c4719",
|
|
88
98
|
},
|
|
89
99
|
[NetworkType.Testnet]: {
|
|
90
100
|
[ProtocolVersion.V1]:
|
|
@@ -108,6 +118,12 @@ export const DEPLOY_TX_HASH: Record<
|
|
|
108
118
|
adler32:
|
|
109
119
|
"0xc9b6698f44c3b80e7e1c48823b2714e432b93f0206ffaf9df885d23267ed2ebc",
|
|
110
120
|
},
|
|
121
|
+
[ProtocolVersion.V3]: {
|
|
122
|
+
ckbfs:
|
|
123
|
+
"0xd25f2c32f56c28c630d4f91955f1b3c9cd53e26fa0745d540d934e8e3d3c2853",
|
|
124
|
+
adler32:
|
|
125
|
+
"0xd25f2c32f56c28c630d4f91955f1b3c9cd53e26fa0745d540d934e8e3d3c2853",
|
|
126
|
+
},
|
|
111
127
|
},
|
|
112
128
|
[NetworkType.Testnet]: {
|
|
113
129
|
[ProtocolVersion.V1]: {
|