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,534 @@
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": "uint256",
27
+ "name": "commitWindowOpen",
28
+ "type": "uint256"
29
+ },
30
+ {
31
+ "internalType": "uint256",
32
+ "name": "commitWindowClose",
33
+ "type": "uint256"
34
+ },
35
+ {
36
+ "internalType": "uint256",
37
+ "name": "timeNow",
38
+ "type": "uint256"
39
+ }
40
+ ],
41
+ "name": "CommitWindowClosed",
42
+ "type": "error"
43
+ },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "bytes32",
48
+ "name": "agreementId",
49
+ "type": "bytes32"
50
+ },
51
+ {
52
+ "internalType": "uint16",
53
+ "name": "epoch",
54
+ "type": "uint16"
55
+ },
56
+ {
57
+ "internalType": "uint72",
58
+ "name": "identityId",
59
+ "type": "uint72"
60
+ },
61
+ {
62
+ "internalType": "bytes",
63
+ "name": "nodeId",
64
+ "type": "bytes"
65
+ }
66
+ ],
67
+ "name": "NodeAlreadySubmittedCommit",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [
72
+ {
73
+ "internalType": "bytes32",
74
+ "name": "agreementId",
75
+ "type": "bytes32"
76
+ },
77
+ {
78
+ "internalType": "uint16",
79
+ "name": "epoch",
80
+ "type": "uint16"
81
+ },
82
+ {
83
+ "internalType": "uint72",
84
+ "name": "identityId",
85
+ "type": "uint72"
86
+ },
87
+ {
88
+ "internalType": "bytes",
89
+ "name": "nodeId",
90
+ "type": "bytes"
91
+ },
92
+ {
93
+ "internalType": "uint8",
94
+ "name": "rank",
95
+ "type": "uint8"
96
+ }
97
+ ],
98
+ "name": "NodeNotAwarded",
99
+ "type": "error"
100
+ },
101
+ {
102
+ "inputs": [
103
+ {
104
+ "internalType": "uint72",
105
+ "name": "identityId",
106
+ "type": "uint72"
107
+ },
108
+ {
109
+ "internalType": "bytes",
110
+ "name": "nodeId",
111
+ "type": "bytes"
112
+ },
113
+ {
114
+ "internalType": "uint96",
115
+ "name": "ask",
116
+ "type": "uint96"
117
+ },
118
+ {
119
+ "internalType": "uint96",
120
+ "name": "stake",
121
+ "type": "uint96"
122
+ }
123
+ ],
124
+ "name": "NodeNotInShardingTable",
125
+ "type": "error"
126
+ },
127
+ {
128
+ "inputs": [
129
+ {
130
+ "internalType": "address",
131
+ "name": "caller",
132
+ "type": "address"
133
+ }
134
+ ],
135
+ "name": "OnlyHubOwnerFunction",
136
+ "type": "error"
137
+ },
138
+ {
139
+ "inputs": [
140
+ {
141
+ "internalType": "bytes32",
142
+ "name": "agreementId",
143
+ "type": "bytes32"
144
+ }
145
+ ],
146
+ "name": "ServiceAgreementDoesntExist",
147
+ "type": "error"
148
+ },
149
+ {
150
+ "inputs": [
151
+ {
152
+ "internalType": "bytes32",
153
+ "name": "agreementId",
154
+ "type": "bytes32"
155
+ },
156
+ {
157
+ "internalType": "uint256",
158
+ "name": "startTime",
159
+ "type": "uint256"
160
+ },
161
+ {
162
+ "internalType": "uint16",
163
+ "name": "epochsNumber",
164
+ "type": "uint16"
165
+ },
166
+ {
167
+ "internalType": "uint128",
168
+ "name": "epochLength",
169
+ "type": "uint128"
170
+ }
171
+ ],
172
+ "name": "ServiceAgreementHasBeenExpired",
173
+ "type": "error"
174
+ },
175
+ {
176
+ "anonymous": false,
177
+ "inputs": [
178
+ {
179
+ "indexed": true,
180
+ "internalType": "address",
181
+ "name": "assetContract",
182
+ "type": "address"
183
+ },
184
+ {
185
+ "indexed": true,
186
+ "internalType": "uint256",
187
+ "name": "tokenId",
188
+ "type": "uint256"
189
+ },
190
+ {
191
+ "indexed": false,
192
+ "internalType": "bytes",
193
+ "name": "keyword",
194
+ "type": "bytes"
195
+ },
196
+ {
197
+ "indexed": false,
198
+ "internalType": "uint8",
199
+ "name": "hashFunctionId",
200
+ "type": "uint8"
201
+ },
202
+ {
203
+ "indexed": false,
204
+ "internalType": "uint16",
205
+ "name": "epoch",
206
+ "type": "uint16"
207
+ },
208
+ {
209
+ "indexed": true,
210
+ "internalType": "uint72",
211
+ "name": "identityId",
212
+ "type": "uint72"
213
+ },
214
+ {
215
+ "indexed": false,
216
+ "internalType": "uint40",
217
+ "name": "score",
218
+ "type": "uint40"
219
+ }
220
+ ],
221
+ "name": "CommitSubmitted",
222
+ "type": "event"
223
+ },
224
+ {
225
+ "inputs": [
226
+ {
227
+ "internalType": "bytes32",
228
+ "name": "agreementId",
229
+ "type": "bytes32"
230
+ },
231
+ {
232
+ "internalType": "uint16",
233
+ "name": "epoch",
234
+ "type": "uint16"
235
+ }
236
+ ],
237
+ "name": "getTopCommitSubmissions",
238
+ "outputs": [
239
+ {
240
+ "components": [
241
+ {
242
+ "internalType": "uint72",
243
+ "name": "identityId",
244
+ "type": "uint72"
245
+ },
246
+ {
247
+ "internalType": "uint72",
248
+ "name": "prevIdentityId",
249
+ "type": "uint72"
250
+ },
251
+ {
252
+ "internalType": "uint72",
253
+ "name": "nextIdentityId",
254
+ "type": "uint72"
255
+ },
256
+ {
257
+ "internalType": "uint40",
258
+ "name": "score",
259
+ "type": "uint40"
260
+ }
261
+ ],
262
+ "internalType": "struct ServiceAgreementStructsV1.CommitSubmission[]",
263
+ "name": "",
264
+ "type": "tuple[]"
265
+ }
266
+ ],
267
+ "stateMutability": "view",
268
+ "type": "function"
269
+ },
270
+ {
271
+ "inputs": [],
272
+ "name": "hashingProxy",
273
+ "outputs": [
274
+ {
275
+ "internalType": "contract HashingProxy",
276
+ "name": "",
277
+ "type": "address"
278
+ }
279
+ ],
280
+ "stateMutability": "view",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [],
285
+ "name": "hub",
286
+ "outputs": [
287
+ {
288
+ "internalType": "contract Hub",
289
+ "name": "",
290
+ "type": "address"
291
+ }
292
+ ],
293
+ "stateMutability": "view",
294
+ "type": "function"
295
+ },
296
+ {
297
+ "inputs": [],
298
+ "name": "identityStorage",
299
+ "outputs": [
300
+ {
301
+ "internalType": "contract IdentityStorage",
302
+ "name": "",
303
+ "type": "address"
304
+ }
305
+ ],
306
+ "stateMutability": "view",
307
+ "type": "function"
308
+ },
309
+ {
310
+ "inputs": [],
311
+ "name": "initialize",
312
+ "outputs": [],
313
+ "stateMutability": "nonpayable",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [
318
+ {
319
+ "internalType": "bytes32",
320
+ "name": "agreementId",
321
+ "type": "bytes32"
322
+ },
323
+ {
324
+ "internalType": "uint16",
325
+ "name": "epoch",
326
+ "type": "uint16"
327
+ }
328
+ ],
329
+ "name": "isCommitWindowOpen",
330
+ "outputs": [
331
+ {
332
+ "internalType": "bool",
333
+ "name": "",
334
+ "type": "bool"
335
+ }
336
+ ],
337
+ "stateMutability": "view",
338
+ "type": "function"
339
+ },
340
+ {
341
+ "inputs": [],
342
+ "name": "name",
343
+ "outputs": [
344
+ {
345
+ "internalType": "string",
346
+ "name": "",
347
+ "type": "string"
348
+ }
349
+ ],
350
+ "stateMutability": "pure",
351
+ "type": "function"
352
+ },
353
+ {
354
+ "inputs": [],
355
+ "name": "parametersStorage",
356
+ "outputs": [
357
+ {
358
+ "internalType": "contract ParametersStorage",
359
+ "name": "",
360
+ "type": "address"
361
+ }
362
+ ],
363
+ "stateMutability": "view",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [],
368
+ "name": "profileStorage",
369
+ "outputs": [
370
+ {
371
+ "internalType": "contract ProfileStorage",
372
+ "name": "",
373
+ "type": "address"
374
+ }
375
+ ],
376
+ "stateMutability": "view",
377
+ "type": "function"
378
+ },
379
+ {
380
+ "inputs": [
381
+ {
382
+ "internalType": "uint256",
383
+ "name": "",
384
+ "type": "uint256"
385
+ }
386
+ ],
387
+ "name": "reqs",
388
+ "outputs": [
389
+ {
390
+ "internalType": "bool",
391
+ "name": "",
392
+ "type": "bool"
393
+ }
394
+ ],
395
+ "stateMutability": "view",
396
+ "type": "function"
397
+ },
398
+ {
399
+ "inputs": [],
400
+ "name": "scoringProxy",
401
+ "outputs": [
402
+ {
403
+ "internalType": "contract ScoringProxy",
404
+ "name": "",
405
+ "type": "address"
406
+ }
407
+ ],
408
+ "stateMutability": "view",
409
+ "type": "function"
410
+ },
411
+ {
412
+ "inputs": [],
413
+ "name": "serviceAgreementStorageProxy",
414
+ "outputs": [
415
+ {
416
+ "internalType": "contract ServiceAgreementStorageProxy",
417
+ "name": "",
418
+ "type": "address"
419
+ }
420
+ ],
421
+ "stateMutability": "view",
422
+ "type": "function"
423
+ },
424
+ {
425
+ "inputs": [
426
+ {
427
+ "internalType": "uint256",
428
+ "name": "index",
429
+ "type": "uint256"
430
+ },
431
+ {
432
+ "internalType": "bool",
433
+ "name": "req",
434
+ "type": "bool"
435
+ }
436
+ ],
437
+ "name": "setReq",
438
+ "outputs": [],
439
+ "stateMutability": "nonpayable",
440
+ "type": "function"
441
+ },
442
+ {
443
+ "inputs": [],
444
+ "name": "shardingTableStorage",
445
+ "outputs": [
446
+ {
447
+ "internalType": "contract ShardingTableStorage",
448
+ "name": "",
449
+ "type": "address"
450
+ }
451
+ ],
452
+ "stateMutability": "view",
453
+ "type": "function"
454
+ },
455
+ {
456
+ "inputs": [],
457
+ "name": "stakingContract",
458
+ "outputs": [
459
+ {
460
+ "internalType": "contract Staking",
461
+ "name": "",
462
+ "type": "address"
463
+ }
464
+ ],
465
+ "stateMutability": "view",
466
+ "type": "function"
467
+ },
468
+ {
469
+ "inputs": [],
470
+ "name": "stakingStorage",
471
+ "outputs": [
472
+ {
473
+ "internalType": "contract StakingStorage",
474
+ "name": "",
475
+ "type": "address"
476
+ }
477
+ ],
478
+ "stateMutability": "view",
479
+ "type": "function"
480
+ },
481
+ {
482
+ "inputs": [
483
+ {
484
+ "components": [
485
+ {
486
+ "internalType": "address",
487
+ "name": "assetContract",
488
+ "type": "address"
489
+ },
490
+ {
491
+ "internalType": "uint256",
492
+ "name": "tokenId",
493
+ "type": "uint256"
494
+ },
495
+ {
496
+ "internalType": "bytes",
497
+ "name": "keyword",
498
+ "type": "bytes"
499
+ },
500
+ {
501
+ "internalType": "uint8",
502
+ "name": "hashFunctionId",
503
+ "type": "uint8"
504
+ },
505
+ {
506
+ "internalType": "uint16",
507
+ "name": "epoch",
508
+ "type": "uint16"
509
+ }
510
+ ],
511
+ "internalType": "struct ServiceAgreementStructsV1.CommitInputArgs",
512
+ "name": "args",
513
+ "type": "tuple"
514
+ }
515
+ ],
516
+ "name": "submitCommit",
517
+ "outputs": [],
518
+ "stateMutability": "nonpayable",
519
+ "type": "function"
520
+ },
521
+ {
522
+ "inputs": [],
523
+ "name": "version",
524
+ "outputs": [
525
+ {
526
+ "internalType": "string",
527
+ "name": "",
528
+ "type": "string"
529
+ }
530
+ ],
531
+ "stateMutability": "pure",
532
+ "type": "function"
533
+ }
534
+ ]