dkg 0.1.0b1__py3-none-any.whl

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.
Files changed (62) hide show
  1. dkg/__init__.py +3 -0
  2. dkg/asset.py +781 -0
  3. dkg/constants.py +39 -0
  4. dkg/data/interfaces/Assertion.json +131 -0
  5. dkg/data/interfaces/AssertionStorage.json +229 -0
  6. dkg/data/interfaces/CommitManagerV1.json +534 -0
  7. dkg/data/interfaces/CommitManagerV1U1.json +720 -0
  8. dkg/data/interfaces/ContentAsset.json +671 -0
  9. dkg/data/interfaces/ContentAssetStorage.json +706 -0
  10. dkg/data/interfaces/HashingProxy.json +227 -0
  11. dkg/data/interfaces/Hub.json +356 -0
  12. dkg/data/interfaces/Identity.json +193 -0
  13. dkg/data/interfaces/IdentityStorage.json +342 -0
  14. dkg/data/interfaces/ParametersStorage.json +468 -0
  15. dkg/data/interfaces/Profile.json +292 -0
  16. dkg/data/interfaces/ProfileStorage.json +596 -0
  17. dkg/data/interfaces/ProofManagerV1.json +525 -0
  18. dkg/data/interfaces/ProofManagerV1U1.json +546 -0
  19. dkg/data/interfaces/ScoringProxy.json +242 -0
  20. dkg/data/interfaces/ServiceAgreementStorageProxy.json +1299 -0
  21. dkg/data/interfaces/ServiceAgreementStorageV1.json +901 -0
  22. dkg/data/interfaces/ServiceAgreementStorageV1U1.json +1097 -0
  23. dkg/data/interfaces/ServiceAgreementV1.json +741 -0
  24. dkg/data/interfaces/ShardingTable.json +268 -0
  25. dkg/data/interfaces/ShardingTableStorage.json +317 -0
  26. dkg/data/interfaces/Staking.json +456 -0
  27. dkg/data/interfaces/StakingStorage.json +407 -0
  28. dkg/data/interfaces/Token.json +544 -0
  29. dkg/data/interfaces/UnfinalizedStateStorage.json +171 -0
  30. dkg/data/interfaces/WhitelistStorage.json +124 -0
  31. dkg/dataclasses.py +45 -0
  32. dkg/exceptions.py +161 -0
  33. dkg/graph.py +63 -0
  34. dkg/main.py +74 -0
  35. dkg/manager.py +64 -0
  36. dkg/method.py +131 -0
  37. dkg/module.py +63 -0
  38. dkg/node.py +54 -0
  39. dkg/providers/__init__.py +2 -0
  40. dkg/providers/blockchain.py +181 -0
  41. dkg/providers/node_http.py +62 -0
  42. dkg/types/__init__.py +8 -0
  43. dkg/types/blockchain.py +58 -0
  44. dkg/types/dkg_node.py +20 -0
  45. dkg/types/encoding.py +22 -0
  46. dkg/types/evm.py +25 -0
  47. dkg/types/generics.py +21 -0
  48. dkg/types/network.py +20 -0
  49. dkg/types/rdf.py +21 -0
  50. dkg/utils/__init__.py +0 -0
  51. dkg/utils/blockchain_request.py +159 -0
  52. dkg/utils/decorators.py +46 -0
  53. dkg/utils/merkle.py +173 -0
  54. dkg/utils/metadata.py +50 -0
  55. dkg/utils/node_request.py +197 -0
  56. dkg/utils/rdf.py +51 -0
  57. dkg/utils/string_transformations.py +22 -0
  58. dkg/utils/ual.py +41 -0
  59. dkg-0.1.0b1.dist-info/LICENSE +202 -0
  60. dkg-0.1.0b1.dist-info/METADATA +453 -0
  61. dkg-0.1.0b1.dist-info/RECORD +62 -0
  62. dkg-0.1.0b1.dist-info/WHEEL +4 -0
@@ -0,0 +1,525 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "hubAddress",
7
+ "type": "address"
8
+ }
9
+ ],
10
+ "stateMutability": "nonpayable",
11
+ "type": "constructor"
12
+ },
13
+ {
14
+ "inputs": [
15
+ {
16
+ "internalType": "bytes32",
17
+ "name": "agreementId",
18
+ "type": "bytes32"
19
+ },
20
+ {
21
+ "internalType": "uint16",
22
+ "name": "epoch",
23
+ "type": "uint16"
24
+ },
25
+ {
26
+ "internalType": "uint72",
27
+ "name": "identityId",
28
+ "type": "uint72"
29
+ },
30
+ {
31
+ "internalType": "bytes",
32
+ "name": "nodeId",
33
+ "type": "bytes"
34
+ }
35
+ ],
36
+ "name": "NodeAlreadyRewarded",
37
+ "type": "error"
38
+ },
39
+ {
40
+ "inputs": [
41
+ {
42
+ "internalType": "bytes32",
43
+ "name": "agreementId",
44
+ "type": "bytes32"
45
+ },
46
+ {
47
+ "internalType": "uint16",
48
+ "name": "epoch",
49
+ "type": "uint16"
50
+ },
51
+ {
52
+ "internalType": "uint72",
53
+ "name": "identityId",
54
+ "type": "uint72"
55
+ },
56
+ {
57
+ "internalType": "bytes",
58
+ "name": "nodeId",
59
+ "type": "bytes"
60
+ },
61
+ {
62
+ "internalType": "uint8",
63
+ "name": "rank",
64
+ "type": "uint8"
65
+ }
66
+ ],
67
+ "name": "NodeNotAwarded",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [
72
+ {
73
+ "internalType": "address",
74
+ "name": "caller",
75
+ "type": "address"
76
+ }
77
+ ],
78
+ "name": "OnlyHubOwnerFunction",
79
+ "type": "error"
80
+ },
81
+ {
82
+ "inputs": [
83
+ {
84
+ "internalType": "bytes32",
85
+ "name": "agreementId",
86
+ "type": "bytes32"
87
+ },
88
+ {
89
+ "internalType": "uint16",
90
+ "name": "epoch",
91
+ "type": "uint16"
92
+ },
93
+ {
94
+ "internalType": "uint256",
95
+ "name": "proofWindowOpen",
96
+ "type": "uint256"
97
+ },
98
+ {
99
+ "internalType": "uint256",
100
+ "name": "proofWindowClose",
101
+ "type": "uint256"
102
+ },
103
+ {
104
+ "internalType": "uint256",
105
+ "name": "timeNow",
106
+ "type": "uint256"
107
+ }
108
+ ],
109
+ "name": "ProofWindowClosed",
110
+ "type": "error"
111
+ },
112
+ {
113
+ "inputs": [
114
+ {
115
+ "internalType": "bytes32",
116
+ "name": "agreementId",
117
+ "type": "bytes32"
118
+ }
119
+ ],
120
+ "name": "ServiceAgreementDoesntExist",
121
+ "type": "error"
122
+ },
123
+ {
124
+ "inputs": [
125
+ {
126
+ "internalType": "bytes32",
127
+ "name": "agreementId",
128
+ "type": "bytes32"
129
+ },
130
+ {
131
+ "internalType": "uint256",
132
+ "name": "startTime",
133
+ "type": "uint256"
134
+ },
135
+ {
136
+ "internalType": "uint16",
137
+ "name": "epochsNumber",
138
+ "type": "uint16"
139
+ },
140
+ {
141
+ "internalType": "uint128",
142
+ "name": "epochLength",
143
+ "type": "uint128"
144
+ }
145
+ ],
146
+ "name": "ServiceAgreementHasBeenExpired",
147
+ "type": "error"
148
+ },
149
+ {
150
+ "inputs": [
151
+ {
152
+ "internalType": "bytes32",
153
+ "name": "agreementId",
154
+ "type": "bytes32"
155
+ },
156
+ {
157
+ "internalType": "uint16",
158
+ "name": "epoch",
159
+ "type": "uint16"
160
+ },
161
+ {
162
+ "internalType": "uint72",
163
+ "name": "identityId",
164
+ "type": "uint72"
165
+ },
166
+ {
167
+ "internalType": "bytes",
168
+ "name": "nodeId",
169
+ "type": "bytes"
170
+ },
171
+ {
172
+ "internalType": "bytes32[]",
173
+ "name": "merkleProof",
174
+ "type": "bytes32[]"
175
+ },
176
+ {
177
+ "internalType": "bytes32",
178
+ "name": "merkleRoot",
179
+ "type": "bytes32"
180
+ },
181
+ {
182
+ "internalType": "bytes32",
183
+ "name": "chunkHash",
184
+ "type": "bytes32"
185
+ },
186
+ {
187
+ "internalType": "uint256",
188
+ "name": "challenge",
189
+ "type": "uint256"
190
+ }
191
+ ],
192
+ "name": "WrongMerkleProof",
193
+ "type": "error"
194
+ },
195
+ {
196
+ "anonymous": false,
197
+ "inputs": [
198
+ {
199
+ "indexed": true,
200
+ "internalType": "address",
201
+ "name": "assetContract",
202
+ "type": "address"
203
+ },
204
+ {
205
+ "indexed": true,
206
+ "internalType": "uint256",
207
+ "name": "tokenId",
208
+ "type": "uint256"
209
+ },
210
+ {
211
+ "indexed": false,
212
+ "internalType": "bytes",
213
+ "name": "keyword",
214
+ "type": "bytes"
215
+ },
216
+ {
217
+ "indexed": false,
218
+ "internalType": "uint8",
219
+ "name": "hashFunctionId",
220
+ "type": "uint8"
221
+ },
222
+ {
223
+ "indexed": false,
224
+ "internalType": "uint16",
225
+ "name": "epoch",
226
+ "type": "uint16"
227
+ },
228
+ {
229
+ "indexed": true,
230
+ "internalType": "uint72",
231
+ "name": "identityId",
232
+ "type": "uint72"
233
+ }
234
+ ],
235
+ "name": "ProofSubmitted",
236
+ "type": "event"
237
+ },
238
+ {
239
+ "inputs": [],
240
+ "name": "assertionStorage",
241
+ "outputs": [
242
+ {
243
+ "internalType": "contract AssertionStorage",
244
+ "name": "",
245
+ "type": "address"
246
+ }
247
+ ],
248
+ "stateMutability": "view",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [
253
+ {
254
+ "internalType": "address",
255
+ "name": "sender",
256
+ "type": "address"
257
+ },
258
+ {
259
+ "internalType": "address",
260
+ "name": "assetContract",
261
+ "type": "address"
262
+ },
263
+ {
264
+ "internalType": "uint256",
265
+ "name": "tokenId",
266
+ "type": "uint256"
267
+ },
268
+ {
269
+ "internalType": "uint16",
270
+ "name": "epoch",
271
+ "type": "uint16"
272
+ }
273
+ ],
274
+ "name": "getChallenge",
275
+ "outputs": [
276
+ {
277
+ "internalType": "bytes32",
278
+ "name": "",
279
+ "type": "bytes32"
280
+ },
281
+ {
282
+ "internalType": "uint256",
283
+ "name": "",
284
+ "type": "uint256"
285
+ }
286
+ ],
287
+ "stateMutability": "view",
288
+ "type": "function"
289
+ },
290
+ {
291
+ "inputs": [],
292
+ "name": "hashingProxy",
293
+ "outputs": [
294
+ {
295
+ "internalType": "contract HashingProxy",
296
+ "name": "",
297
+ "type": "address"
298
+ }
299
+ ],
300
+ "stateMutability": "view",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [],
305
+ "name": "hub",
306
+ "outputs": [
307
+ {
308
+ "internalType": "contract Hub",
309
+ "name": "",
310
+ "type": "address"
311
+ }
312
+ ],
313
+ "stateMutability": "view",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [],
318
+ "name": "identityStorage",
319
+ "outputs": [
320
+ {
321
+ "internalType": "contract IdentityStorage",
322
+ "name": "",
323
+ "type": "address"
324
+ }
325
+ ],
326
+ "stateMutability": "view",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "inputs": [],
331
+ "name": "initialize",
332
+ "outputs": [],
333
+ "stateMutability": "nonpayable",
334
+ "type": "function"
335
+ },
336
+ {
337
+ "inputs": [
338
+ {
339
+ "internalType": "bytes32",
340
+ "name": "agreementId",
341
+ "type": "bytes32"
342
+ },
343
+ {
344
+ "internalType": "uint16",
345
+ "name": "epoch",
346
+ "type": "uint16"
347
+ }
348
+ ],
349
+ "name": "isProofWindowOpen",
350
+ "outputs": [
351
+ {
352
+ "internalType": "bool",
353
+ "name": "",
354
+ "type": "bool"
355
+ }
356
+ ],
357
+ "stateMutability": "view",
358
+ "type": "function"
359
+ },
360
+ {
361
+ "inputs": [],
362
+ "name": "name",
363
+ "outputs": [
364
+ {
365
+ "internalType": "string",
366
+ "name": "",
367
+ "type": "string"
368
+ }
369
+ ],
370
+ "stateMutability": "pure",
371
+ "type": "function"
372
+ },
373
+ {
374
+ "inputs": [],
375
+ "name": "parametersStorage",
376
+ "outputs": [
377
+ {
378
+ "internalType": "contract ParametersStorage",
379
+ "name": "",
380
+ "type": "address"
381
+ }
382
+ ],
383
+ "stateMutability": "view",
384
+ "type": "function"
385
+ },
386
+ {
387
+ "inputs": [],
388
+ "name": "profileStorage",
389
+ "outputs": [
390
+ {
391
+ "internalType": "contract ProfileStorage",
392
+ "name": "",
393
+ "type": "address"
394
+ }
395
+ ],
396
+ "stateMutability": "view",
397
+ "type": "function"
398
+ },
399
+ {
400
+ "inputs": [
401
+ {
402
+ "internalType": "uint256",
403
+ "name": "",
404
+ "type": "uint256"
405
+ }
406
+ ],
407
+ "name": "reqs",
408
+ "outputs": [
409
+ {
410
+ "internalType": "bool",
411
+ "name": "",
412
+ "type": "bool"
413
+ }
414
+ ],
415
+ "stateMutability": "view",
416
+ "type": "function"
417
+ },
418
+ {
419
+ "inputs": [
420
+ {
421
+ "components": [
422
+ {
423
+ "internalType": "address",
424
+ "name": "assetContract",
425
+ "type": "address"
426
+ },
427
+ {
428
+ "internalType": "uint256",
429
+ "name": "tokenId",
430
+ "type": "uint256"
431
+ },
432
+ {
433
+ "internalType": "bytes",
434
+ "name": "keyword",
435
+ "type": "bytes"
436
+ },
437
+ {
438
+ "internalType": "uint8",
439
+ "name": "hashFunctionId",
440
+ "type": "uint8"
441
+ },
442
+ {
443
+ "internalType": "uint16",
444
+ "name": "epoch",
445
+ "type": "uint16"
446
+ },
447
+ {
448
+ "internalType": "bytes32[]",
449
+ "name": "proof",
450
+ "type": "bytes32[]"
451
+ },
452
+ {
453
+ "internalType": "bytes32",
454
+ "name": "chunkHash",
455
+ "type": "bytes32"
456
+ }
457
+ ],
458
+ "internalType": "struct ServiceAgreementStructsV1.ProofInputArgs",
459
+ "name": "args",
460
+ "type": "tuple"
461
+ }
462
+ ],
463
+ "name": "sendProof",
464
+ "outputs": [],
465
+ "stateMutability": "nonpayable",
466
+ "type": "function"
467
+ },
468
+ {
469
+ "inputs": [],
470
+ "name": "serviceAgreementStorageProxy",
471
+ "outputs": [
472
+ {
473
+ "internalType": "contract ServiceAgreementStorageProxy",
474
+ "name": "",
475
+ "type": "address"
476
+ }
477
+ ],
478
+ "stateMutability": "view",
479
+ "type": "function"
480
+ },
481
+ {
482
+ "inputs": [
483
+ {
484
+ "internalType": "uint256",
485
+ "name": "index",
486
+ "type": "uint256"
487
+ },
488
+ {
489
+ "internalType": "bool",
490
+ "name": "req",
491
+ "type": "bool"
492
+ }
493
+ ],
494
+ "name": "setReq",
495
+ "outputs": [],
496
+ "stateMutability": "nonpayable",
497
+ "type": "function"
498
+ },
499
+ {
500
+ "inputs": [],
501
+ "name": "stakingContract",
502
+ "outputs": [
503
+ {
504
+ "internalType": "contract Staking",
505
+ "name": "",
506
+ "type": "address"
507
+ }
508
+ ],
509
+ "stateMutability": "view",
510
+ "type": "function"
511
+ },
512
+ {
513
+ "inputs": [],
514
+ "name": "version",
515
+ "outputs": [
516
+ {
517
+ "internalType": "string",
518
+ "name": "",
519
+ "type": "string"
520
+ }
521
+ ],
522
+ "stateMutability": "pure",
523
+ "type": "function"
524
+ }
525
+ ]