@fangorn-network/sdk 0.1.0 → 0.1.2
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 +1 -1
- package/lib/cli/cli.js +126 -325
- package/lib/cli/index.d.ts +2 -3
- package/lib/cli/index.js +10 -15
- package/lib/cli/sell.d.ts +28 -0
- package/lib/cli/sell.js +95 -0
- package/lib/cli/stage.d.ts +19 -0
- package/lib/cli/stage.js +94 -0
- package/lib/config.d.ts +71 -81
- package/lib/config.js +22 -38
- package/lib/contracts/data-registry/abi.d.ts +195 -19
- package/lib/contracts/data-registry/abi.js +409 -206
- package/lib/contracts/data-registry/index.d.ts +126 -2
- package/lib/contracts/data-registry/index.js +174 -1
- package/lib/contracts/index.d.ts +4 -7
- package/lib/contracts/index.js +4 -7
- package/lib/contracts/logs.d.ts +1 -1
- package/lib/contracts/logs.js +1 -1
- package/lib/contracts/{membership-registry → settlement-registry}/abi.d.ts +301 -636
- package/lib/contracts/settlement-registry/abi.js +962 -0
- package/lib/contracts/settlement-registry/index.d.ts +143 -0
- package/lib/contracts/settlement-registry/index.js +213 -0
- package/lib/crypto/aes.d.ts +2 -2
- package/lib/crypto/aes.js +4 -4
- package/lib/crypto/encryption.d.ts +8 -109
- package/lib/crypto/encryption.js +16 -114
- package/lib/crypto/paid.d.ts +104 -0
- package/lib/crypto/paid.js +147 -0
- package/lib/engine/car.d.ts +5 -1
- package/lib/engine/car.js +2 -2
- package/lib/engine/index.d.ts +33 -14
- package/lib/engine/index.js +98 -41
- package/lib/engine/records.d.ts +19 -8
- package/lib/engine/records.js +81 -7
- package/lib/engine/test-helpers.d.ts +2 -3
- package/lib/engine/test-helpers.js +7 -5
- package/lib/erc8004.js +6 -6
- package/lib/fangorn.d.ts +65 -86
- package/lib/fangorn.js +115 -153
- package/lib/feed.d.ts +7 -8
- package/lib/feed.js +7 -8
- package/lib/index.d.ts +10 -13
- package/lib/index.js +10 -13
- package/lib/providers/storage/signed-url.d.ts +2 -10
- package/lib/providers/storage/signed-url.js +5 -15
- package/lib/providers/storage/types.d.ts +1 -1
- package/lib/providers/storage/utils.js +5 -3
- package/lib/test/key-server.d.ts +12 -0
- package/lib/test/key-server.js +30 -0
- package/lib/test/mem-registry.d.ts +14 -19
- package/lib/test/mem-registry.js +44 -37
- package/lib/test/sdk-suite.d.ts +1 -4
- package/lib/test/sdk-suite.js +16 -87
- package/lib/test/testbed.d.ts +12 -22
- package/lib/test/testbed.js +29 -56
- package/lib/types/index.d.ts +6 -11
- package/package.json +1 -1
- package/lib/contracts/app-registry/abi.d.ts +0 -1265
- package/lib/contracts/app-registry/abi.js +0 -1454
- package/lib/contracts/app-registry/index.d.ts +0 -161
- package/lib/contracts/app-registry/index.js +0 -274
- package/lib/contracts/membership-registry/abi.js +0 -1333
- package/lib/contracts/membership-registry/index.d.ts +0 -79
- package/lib/contracts/membership-registry/index.js +0 -104
- package/lib/contracts/types.d.ts +0 -10
- package/lib/contracts/types.js +0 -12
- package/lib/harness/examples/hackmd/build-markdown-graph.d.ts +0 -1
- package/lib/harness/examples/hackmd/build-markdown-graph.js +0 -17
- package/lib/harness/index.d.ts +0 -58
- package/lib/harness/index.js +0 -73
- package/lib/registry.d.ts +0 -118
- package/lib/registry.js +0 -184
|
@@ -7,6 +7,26 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
7
7
|
readonly type: "constructor";
|
|
8
8
|
readonly inputs: readonly [];
|
|
9
9
|
readonly stateMutability: "nonpayable";
|
|
10
|
+
}, {
|
|
11
|
+
readonly type: "function";
|
|
12
|
+
readonly name: "EPOCH_SECONDS";
|
|
13
|
+
readonly inputs: readonly [];
|
|
14
|
+
readonly outputs: readonly [{
|
|
15
|
+
readonly name: "";
|
|
16
|
+
readonly type: "uint64";
|
|
17
|
+
readonly internalType: "uint64";
|
|
18
|
+
}];
|
|
19
|
+
readonly stateMutability: "view";
|
|
20
|
+
}, {
|
|
21
|
+
readonly type: "function";
|
|
22
|
+
readonly name: "UPDATE_TYPEHASH";
|
|
23
|
+
readonly inputs: readonly [];
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "";
|
|
26
|
+
readonly type: "bytes32";
|
|
27
|
+
readonly internalType: "bytes32";
|
|
28
|
+
}];
|
|
29
|
+
readonly stateMutability: "view";
|
|
10
30
|
}, {
|
|
11
31
|
readonly type: "function";
|
|
12
32
|
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
@@ -17,6 +37,16 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
17
37
|
readonly internalType: "string";
|
|
18
38
|
}];
|
|
19
39
|
readonly stateMutability: "view";
|
|
40
|
+
}, {
|
|
41
|
+
readonly type: "function";
|
|
42
|
+
readonly name: "WINDOW";
|
|
43
|
+
readonly inputs: readonly [];
|
|
44
|
+
readonly outputs: readonly [{
|
|
45
|
+
readonly name: "";
|
|
46
|
+
readonly type: "uint64";
|
|
47
|
+
readonly internalType: "uint64";
|
|
48
|
+
}];
|
|
49
|
+
readonly stateMutability: "view";
|
|
20
50
|
}, {
|
|
21
51
|
readonly type: "function";
|
|
22
52
|
readonly name: "admin";
|
|
@@ -29,12 +59,52 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
29
59
|
readonly stateMutability: "view";
|
|
30
60
|
}, {
|
|
31
61
|
readonly type: "function";
|
|
32
|
-
readonly name: "
|
|
62
|
+
readonly name: "commitHead";
|
|
63
|
+
readonly inputs: readonly [{
|
|
64
|
+
readonly name: "repo";
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
readonly internalType: "string";
|
|
67
|
+
}, {
|
|
68
|
+
readonly name: "epoch";
|
|
69
|
+
readonly type: "uint64";
|
|
70
|
+
readonly internalType: "uint64";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "parent";
|
|
73
|
+
readonly type: "bytes32";
|
|
74
|
+
readonly internalType: "bytes32";
|
|
75
|
+
}, {
|
|
76
|
+
readonly name: "root";
|
|
77
|
+
readonly type: "bytes32";
|
|
78
|
+
readonly internalType: "bytes32";
|
|
79
|
+
}, {
|
|
80
|
+
readonly name: "car";
|
|
81
|
+
readonly type: "bytes";
|
|
82
|
+
readonly internalType: "bytes";
|
|
83
|
+
}];
|
|
84
|
+
readonly outputs: readonly [{
|
|
85
|
+
readonly name: "";
|
|
86
|
+
readonly type: "bytes32";
|
|
87
|
+
readonly internalType: "bytes32";
|
|
88
|
+
}];
|
|
89
|
+
readonly stateMutability: "pure";
|
|
90
|
+
}, {
|
|
91
|
+
readonly type: "function";
|
|
92
|
+
readonly name: "currentEpoch";
|
|
33
93
|
readonly inputs: readonly [];
|
|
34
94
|
readonly outputs: readonly [{
|
|
35
95
|
readonly name: "";
|
|
36
|
-
readonly type: "
|
|
37
|
-
readonly internalType: "
|
|
96
|
+
readonly type: "uint64";
|
|
97
|
+
readonly internalType: "uint64";
|
|
98
|
+
}];
|
|
99
|
+
readonly stateMutability: "view";
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "function";
|
|
102
|
+
readonly name: "domainSeparator";
|
|
103
|
+
readonly inputs: readonly [];
|
|
104
|
+
readonly outputs: readonly [{
|
|
105
|
+
readonly name: "";
|
|
106
|
+
readonly type: "bytes32";
|
|
107
|
+
readonly internalType: "bytes32";
|
|
38
108
|
}];
|
|
39
109
|
readonly stateMutability: "view";
|
|
40
110
|
}, {
|
|
@@ -66,13 +136,43 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
66
136
|
readonly name: "admin_";
|
|
67
137
|
readonly type: "address";
|
|
68
138
|
readonly internalType: "address";
|
|
69
|
-
}, {
|
|
70
|
-
readonly name: "appRegistry_";
|
|
71
|
-
readonly type: "address";
|
|
72
|
-
readonly internalType: "address";
|
|
73
139
|
}];
|
|
74
140
|
readonly outputs: readonly [];
|
|
75
141
|
readonly stateMutability: "nonpayable";
|
|
142
|
+
}, {
|
|
143
|
+
readonly type: "function";
|
|
144
|
+
readonly name: "logLength";
|
|
145
|
+
readonly inputs: readonly [];
|
|
146
|
+
readonly outputs: readonly [{
|
|
147
|
+
readonly name: "";
|
|
148
|
+
readonly type: "uint64";
|
|
149
|
+
readonly internalType: "uint64";
|
|
150
|
+
}];
|
|
151
|
+
readonly stateMutability: "view";
|
|
152
|
+
}, {
|
|
153
|
+
readonly type: "function";
|
|
154
|
+
readonly name: "logRoot";
|
|
155
|
+
readonly inputs: readonly [];
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly name: "";
|
|
158
|
+
readonly type: "bytes32";
|
|
159
|
+
readonly internalType: "bytes32";
|
|
160
|
+
}];
|
|
161
|
+
readonly stateMutability: "view";
|
|
162
|
+
}, {
|
|
163
|
+
readonly type: "function";
|
|
164
|
+
readonly name: "peaks";
|
|
165
|
+
readonly inputs: readonly [{
|
|
166
|
+
readonly name: "";
|
|
167
|
+
readonly type: "uint256";
|
|
168
|
+
readonly internalType: "uint256";
|
|
169
|
+
}];
|
|
170
|
+
readonly outputs: readonly [{
|
|
171
|
+
readonly name: "";
|
|
172
|
+
readonly type: "bytes32";
|
|
173
|
+
readonly internalType: "bytes32";
|
|
174
|
+
}];
|
|
175
|
+
readonly stateMutability: "view";
|
|
76
176
|
}, {
|
|
77
177
|
readonly type: "function";
|
|
78
178
|
readonly name: "proxiableUUID";
|
|
@@ -85,19 +185,41 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
85
185
|
readonly stateMutability: "view";
|
|
86
186
|
}, {
|
|
87
187
|
readonly type: "function";
|
|
88
|
-
readonly name: "
|
|
188
|
+
readonly name: "repoCount";
|
|
89
189
|
readonly inputs: readonly [{
|
|
90
|
-
readonly name: "
|
|
190
|
+
readonly name: "publisher";
|
|
91
191
|
readonly type: "address";
|
|
92
192
|
readonly internalType: "address";
|
|
93
193
|
}];
|
|
94
|
-
readonly outputs: readonly [
|
|
95
|
-
|
|
194
|
+
readonly outputs: readonly [{
|
|
195
|
+
readonly name: "";
|
|
196
|
+
readonly type: "uint256";
|
|
197
|
+
readonly internalType: "uint256";
|
|
198
|
+
}];
|
|
199
|
+
readonly stateMutability: "view";
|
|
96
200
|
}, {
|
|
97
201
|
readonly type: "function";
|
|
98
|
-
readonly name: "
|
|
202
|
+
readonly name: "repoIds";
|
|
99
203
|
readonly inputs: readonly [{
|
|
100
|
-
readonly name: "
|
|
204
|
+
readonly name: "";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
readonly internalType: "address";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "";
|
|
209
|
+
readonly type: "uint256";
|
|
210
|
+
readonly internalType: "uint256";
|
|
211
|
+
}];
|
|
212
|
+
readonly outputs: readonly [{
|
|
213
|
+
readonly name: "";
|
|
214
|
+
readonly type: "bytes32";
|
|
215
|
+
readonly internalType: "bytes32";
|
|
216
|
+
}];
|
|
217
|
+
readonly stateMutability: "view";
|
|
218
|
+
}, {
|
|
219
|
+
readonly type: "function";
|
|
220
|
+
readonly name: "setAdmin";
|
|
221
|
+
readonly inputs: readonly [{
|
|
222
|
+
readonly name: "new_admin";
|
|
101
223
|
readonly type: "address";
|
|
102
224
|
readonly internalType: "address";
|
|
103
225
|
}];
|
|
@@ -110,16 +232,66 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
110
232
|
readonly name: "repo";
|
|
111
233
|
readonly type: "string";
|
|
112
234
|
readonly internalType: "string";
|
|
235
|
+
}, {
|
|
236
|
+
readonly name: "epoch";
|
|
237
|
+
readonly type: "uint64";
|
|
238
|
+
readonly internalType: "uint64";
|
|
113
239
|
}, {
|
|
114
240
|
readonly name: "parent";
|
|
115
241
|
readonly type: "bytes32";
|
|
116
242
|
readonly internalType: "bytes32";
|
|
117
243
|
}, {
|
|
118
|
-
readonly name: "
|
|
244
|
+
readonly name: "root";
|
|
245
|
+
readonly type: "bytes32";
|
|
246
|
+
readonly internalType: "bytes32";
|
|
247
|
+
}, {
|
|
248
|
+
readonly name: "car";
|
|
249
|
+
readonly type: "bytes";
|
|
250
|
+
readonly internalType: "bytes";
|
|
251
|
+
}];
|
|
252
|
+
readonly outputs: readonly [{
|
|
253
|
+
readonly name: "";
|
|
254
|
+
readonly type: "bytes32";
|
|
255
|
+
readonly internalType: "bytes32";
|
|
256
|
+
}];
|
|
257
|
+
readonly stateMutability: "nonpayable";
|
|
258
|
+
}, {
|
|
259
|
+
readonly type: "function";
|
|
260
|
+
readonly name: "updateBySig";
|
|
261
|
+
readonly inputs: readonly [{
|
|
262
|
+
readonly name: "publisher";
|
|
263
|
+
readonly type: "address";
|
|
264
|
+
readonly internalType: "address";
|
|
265
|
+
}, {
|
|
266
|
+
readonly name: "repo";
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
readonly internalType: "string";
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "epoch";
|
|
271
|
+
readonly type: "uint64";
|
|
272
|
+
readonly internalType: "uint64";
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "parent";
|
|
275
|
+
readonly type: "bytes32";
|
|
276
|
+
readonly internalType: "bytes32";
|
|
277
|
+
}, {
|
|
278
|
+
readonly name: "root";
|
|
279
|
+
readonly type: "bytes32";
|
|
280
|
+
readonly internalType: "bytes32";
|
|
281
|
+
}, {
|
|
282
|
+
readonly name: "car";
|
|
283
|
+
readonly type: "bytes";
|
|
284
|
+
readonly internalType: "bytes";
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "signature";
|
|
287
|
+
readonly type: "bytes";
|
|
288
|
+
readonly internalType: "bytes";
|
|
289
|
+
}];
|
|
290
|
+
readonly outputs: readonly [{
|
|
291
|
+
readonly name: "";
|
|
119
292
|
readonly type: "bytes32";
|
|
120
293
|
readonly internalType: "bytes32";
|
|
121
294
|
}];
|
|
122
|
-
readonly outputs: readonly [];
|
|
123
295
|
readonly stateMutability: "nonpayable";
|
|
124
296
|
}, {
|
|
125
297
|
readonly type: "function";
|
|
@@ -213,6 +385,10 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
213
385
|
readonly type: "address";
|
|
214
386
|
readonly internalType: "address";
|
|
215
387
|
}];
|
|
388
|
+
}, {
|
|
389
|
+
readonly type: "error";
|
|
390
|
+
readonly name: "BadSignature";
|
|
391
|
+
readonly inputs: readonly [];
|
|
216
392
|
}, {
|
|
217
393
|
readonly type: "error";
|
|
218
394
|
readonly name: "ERC1967InvalidImplementation";
|
|
@@ -225,6 +401,10 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
225
401
|
readonly type: "error";
|
|
226
402
|
readonly name: "ERC1967NonPayable";
|
|
227
403
|
readonly inputs: readonly [];
|
|
404
|
+
}, {
|
|
405
|
+
readonly type: "error";
|
|
406
|
+
readonly name: "EpochOutOfWindow";
|
|
407
|
+
readonly inputs: readonly [];
|
|
228
408
|
}, {
|
|
229
409
|
readonly type: "error";
|
|
230
410
|
readonly name: "FailedCall";
|
|
@@ -257,10 +437,6 @@ declare const DATA_REGISTRY_ABI: readonly [{
|
|
|
257
437
|
readonly type: "error";
|
|
258
438
|
readonly name: "Unauthorized";
|
|
259
439
|
readonly inputs: readonly [];
|
|
260
|
-
}, {
|
|
261
|
-
readonly type: "error";
|
|
262
|
-
readonly name: "ZeroHead";
|
|
263
|
-
readonly inputs: readonly [];
|
|
264
440
|
}];
|
|
265
441
|
//#endregion
|
|
266
442
|
export { DATA_REGISTRY_ABI };
|