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,720 @@
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": "stateIndex",
28
+ "type": "uint256"
29
+ },
30
+ {
31
+ "internalType": "uint256",
32
+ "name": "commitWindowOpen",
33
+ "type": "uint256"
34
+ },
35
+ {
36
+ "internalType": "uint256",
37
+ "name": "commitWindowClose",
38
+ "type": "uint256"
39
+ },
40
+ {
41
+ "internalType": "uint256",
42
+ "name": "timeNow",
43
+ "type": "uint256"
44
+ }
45
+ ],
46
+ "name": "CommitWindowClosed",
47
+ "type": "error"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "address",
53
+ "name": "assetStorage",
54
+ "type": "address"
55
+ },
56
+ {
57
+ "internalType": "uint256",
58
+ "name": "tokenId",
59
+ "type": "uint256"
60
+ }
61
+ ],
62
+ "name": "NoPendingUpdate",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [
67
+ {
68
+ "internalType": "bytes32",
69
+ "name": "agreementId",
70
+ "type": "bytes32"
71
+ },
72
+ {
73
+ "internalType": "uint16",
74
+ "name": "epoch",
75
+ "type": "uint16"
76
+ },
77
+ {
78
+ "internalType": "uint256",
79
+ "name": "stateIndex",
80
+ "type": "uint256"
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
+ "name": "NodeAlreadySubmittedCommit",
94
+ "type": "error"
95
+ },
96
+ {
97
+ "inputs": [
98
+ {
99
+ "internalType": "bytes32",
100
+ "name": "agreementId",
101
+ "type": "bytes32"
102
+ },
103
+ {
104
+ "internalType": "uint16",
105
+ "name": "epoch",
106
+ "type": "uint16"
107
+ },
108
+ {
109
+ "internalType": "uint256",
110
+ "name": "stateIndex",
111
+ "type": "uint256"
112
+ },
113
+ {
114
+ "internalType": "uint72",
115
+ "name": "identityId",
116
+ "type": "uint72"
117
+ },
118
+ {
119
+ "internalType": "bytes",
120
+ "name": "nodeId",
121
+ "type": "bytes"
122
+ },
123
+ {
124
+ "internalType": "uint8",
125
+ "name": "rank",
126
+ "type": "uint8"
127
+ }
128
+ ],
129
+ "name": "NodeNotAwarded",
130
+ "type": "error"
131
+ },
132
+ {
133
+ "inputs": [
134
+ {
135
+ "internalType": "uint72",
136
+ "name": "identityId",
137
+ "type": "uint72"
138
+ },
139
+ {
140
+ "internalType": "bytes",
141
+ "name": "nodeId",
142
+ "type": "bytes"
143
+ },
144
+ {
145
+ "internalType": "uint96",
146
+ "name": "ask",
147
+ "type": "uint96"
148
+ },
149
+ {
150
+ "internalType": "uint96",
151
+ "name": "stake",
152
+ "type": "uint96"
153
+ }
154
+ ],
155
+ "name": "NodeNotInShardingTable",
156
+ "type": "error"
157
+ },
158
+ {
159
+ "inputs": [
160
+ {
161
+ "internalType": "address",
162
+ "name": "caller",
163
+ "type": "address"
164
+ }
165
+ ],
166
+ "name": "OnlyHubOwnerFunction",
167
+ "type": "error"
168
+ },
169
+ {
170
+ "inputs": [
171
+ {
172
+ "internalType": "bytes32",
173
+ "name": "agreementId",
174
+ "type": "bytes32"
175
+ }
176
+ ],
177
+ "name": "ServiceAgreementDoesntExist",
178
+ "type": "error"
179
+ },
180
+ {
181
+ "inputs": [
182
+ {
183
+ "internalType": "bytes32",
184
+ "name": "agreementId",
185
+ "type": "bytes32"
186
+ },
187
+ {
188
+ "internalType": "uint256",
189
+ "name": "startTime",
190
+ "type": "uint256"
191
+ },
192
+ {
193
+ "internalType": "uint16",
194
+ "name": "epochsNumber",
195
+ "type": "uint16"
196
+ },
197
+ {
198
+ "internalType": "uint128",
199
+ "name": "epochLength",
200
+ "type": "uint128"
201
+ }
202
+ ],
203
+ "name": "ServiceAgreementHasBeenExpired",
204
+ "type": "error"
205
+ },
206
+ {
207
+ "anonymous": false,
208
+ "inputs": [
209
+ {
210
+ "indexed": true,
211
+ "internalType": "address",
212
+ "name": "assetContract",
213
+ "type": "address"
214
+ },
215
+ {
216
+ "indexed": true,
217
+ "internalType": "uint256",
218
+ "name": "tokenId",
219
+ "type": "uint256"
220
+ },
221
+ {
222
+ "indexed": false,
223
+ "internalType": "bytes",
224
+ "name": "keyword",
225
+ "type": "bytes"
226
+ },
227
+ {
228
+ "indexed": false,
229
+ "internalType": "uint8",
230
+ "name": "hashFunctionId",
231
+ "type": "uint8"
232
+ },
233
+ {
234
+ "indexed": false,
235
+ "internalType": "uint16",
236
+ "name": "epoch",
237
+ "type": "uint16"
238
+ },
239
+ {
240
+ "indexed": false,
241
+ "internalType": "uint256",
242
+ "name": "stateIndex",
243
+ "type": "uint256"
244
+ },
245
+ {
246
+ "indexed": true,
247
+ "internalType": "uint72",
248
+ "name": "identityId",
249
+ "type": "uint72"
250
+ },
251
+ {
252
+ "indexed": false,
253
+ "internalType": "uint40",
254
+ "name": "score",
255
+ "type": "uint40"
256
+ }
257
+ ],
258
+ "name": "CommitSubmitted",
259
+ "type": "event"
260
+ },
261
+ {
262
+ "anonymous": false,
263
+ "inputs": [
264
+ {
265
+ "indexed": true,
266
+ "internalType": "address",
267
+ "name": "assetContract",
268
+ "type": "address"
269
+ },
270
+ {
271
+ "indexed": true,
272
+ "internalType": "uint256",
273
+ "name": "tokenId",
274
+ "type": "uint256"
275
+ },
276
+ {
277
+ "indexed": false,
278
+ "internalType": "bytes",
279
+ "name": "keyword",
280
+ "type": "bytes"
281
+ },
282
+ {
283
+ "indexed": false,
284
+ "internalType": "uint8",
285
+ "name": "hashFunctionId",
286
+ "type": "uint8"
287
+ },
288
+ {
289
+ "indexed": false,
290
+ "internalType": "uint16",
291
+ "name": "epoch",
292
+ "type": "uint16"
293
+ },
294
+ {
295
+ "indexed": false,
296
+ "internalType": "uint256",
297
+ "name": "stateIndex",
298
+ "type": "uint256"
299
+ },
300
+ {
301
+ "indexed": false,
302
+ "internalType": "bytes32",
303
+ "name": "state",
304
+ "type": "bytes32"
305
+ }
306
+ ],
307
+ "name": "StateFinalized",
308
+ "type": "event"
309
+ },
310
+ {
311
+ "inputs": [],
312
+ "name": "contentAssetStorage",
313
+ "outputs": [
314
+ {
315
+ "internalType": "contract ContentAssetStorage",
316
+ "name": "",
317
+ "type": "address"
318
+ }
319
+ ],
320
+ "stateMutability": "view",
321
+ "type": "function"
322
+ },
323
+ {
324
+ "inputs": [
325
+ {
326
+ "internalType": "bytes32",
327
+ "name": "agreementId",
328
+ "type": "bytes32"
329
+ },
330
+ {
331
+ "internalType": "uint16",
332
+ "name": "epoch",
333
+ "type": "uint16"
334
+ },
335
+ {
336
+ "internalType": "uint256",
337
+ "name": "stateIndex",
338
+ "type": "uint256"
339
+ }
340
+ ],
341
+ "name": "getTopCommitSubmissions",
342
+ "outputs": [
343
+ {
344
+ "components": [
345
+ {
346
+ "internalType": "uint72",
347
+ "name": "identityId",
348
+ "type": "uint72"
349
+ },
350
+ {
351
+ "internalType": "uint72",
352
+ "name": "prevIdentityId",
353
+ "type": "uint72"
354
+ },
355
+ {
356
+ "internalType": "uint72",
357
+ "name": "nextIdentityId",
358
+ "type": "uint72"
359
+ },
360
+ {
361
+ "internalType": "uint40",
362
+ "name": "score",
363
+ "type": "uint40"
364
+ }
365
+ ],
366
+ "internalType": "struct ServiceAgreementStructsV1.CommitSubmission[]",
367
+ "name": "",
368
+ "type": "tuple[]"
369
+ }
370
+ ],
371
+ "stateMutability": "view",
372
+ "type": "function"
373
+ },
374
+ {
375
+ "inputs": [],
376
+ "name": "hashingProxy",
377
+ "outputs": [
378
+ {
379
+ "internalType": "contract HashingProxy",
380
+ "name": "",
381
+ "type": "address"
382
+ }
383
+ ],
384
+ "stateMutability": "view",
385
+ "type": "function"
386
+ },
387
+ {
388
+ "inputs": [],
389
+ "name": "hub",
390
+ "outputs": [
391
+ {
392
+ "internalType": "contract Hub",
393
+ "name": "",
394
+ "type": "address"
395
+ }
396
+ ],
397
+ "stateMutability": "view",
398
+ "type": "function"
399
+ },
400
+ {
401
+ "inputs": [],
402
+ "name": "identityStorage",
403
+ "outputs": [
404
+ {
405
+ "internalType": "contract IdentityStorage",
406
+ "name": "",
407
+ "type": "address"
408
+ }
409
+ ],
410
+ "stateMutability": "view",
411
+ "type": "function"
412
+ },
413
+ {
414
+ "inputs": [],
415
+ "name": "initialize",
416
+ "outputs": [],
417
+ "stateMutability": "nonpayable",
418
+ "type": "function"
419
+ },
420
+ {
421
+ "inputs": [
422
+ {
423
+ "internalType": "bytes32",
424
+ "name": "agreementId",
425
+ "type": "bytes32"
426
+ },
427
+ {
428
+ "internalType": "uint16",
429
+ "name": "epoch",
430
+ "type": "uint16"
431
+ }
432
+ ],
433
+ "name": "isCommitWindowOpen",
434
+ "outputs": [
435
+ {
436
+ "internalType": "bool",
437
+ "name": "",
438
+ "type": "bool"
439
+ }
440
+ ],
441
+ "stateMutability": "view",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "inputs": [
446
+ {
447
+ "internalType": "bytes32",
448
+ "name": "agreementId",
449
+ "type": "bytes32"
450
+ },
451
+ {
452
+ "internalType": "uint16",
453
+ "name": "epoch",
454
+ "type": "uint16"
455
+ },
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "stateIndex",
459
+ "type": "uint256"
460
+ }
461
+ ],
462
+ "name": "isUpdateCommitWindowOpen",
463
+ "outputs": [
464
+ {
465
+ "internalType": "bool",
466
+ "name": "",
467
+ "type": "bool"
468
+ }
469
+ ],
470
+ "stateMutability": "view",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [],
475
+ "name": "name",
476
+ "outputs": [
477
+ {
478
+ "internalType": "string",
479
+ "name": "",
480
+ "type": "string"
481
+ }
482
+ ],
483
+ "stateMutability": "pure",
484
+ "type": "function"
485
+ },
486
+ {
487
+ "inputs": [],
488
+ "name": "parametersStorage",
489
+ "outputs": [
490
+ {
491
+ "internalType": "contract ParametersStorage",
492
+ "name": "",
493
+ "type": "address"
494
+ }
495
+ ],
496
+ "stateMutability": "view",
497
+ "type": "function"
498
+ },
499
+ {
500
+ "inputs": [],
501
+ "name": "profileStorage",
502
+ "outputs": [
503
+ {
504
+ "internalType": "contract ProfileStorage",
505
+ "name": "",
506
+ "type": "address"
507
+ }
508
+ ],
509
+ "stateMutability": "view",
510
+ "type": "function"
511
+ },
512
+ {
513
+ "inputs": [
514
+ {
515
+ "internalType": "uint256",
516
+ "name": "",
517
+ "type": "uint256"
518
+ }
519
+ ],
520
+ "name": "reqs",
521
+ "outputs": [
522
+ {
523
+ "internalType": "bool",
524
+ "name": "",
525
+ "type": "bool"
526
+ }
527
+ ],
528
+ "stateMutability": "view",
529
+ "type": "function"
530
+ },
531
+ {
532
+ "inputs": [],
533
+ "name": "scoringProxy",
534
+ "outputs": [
535
+ {
536
+ "internalType": "contract ScoringProxy",
537
+ "name": "",
538
+ "type": "address"
539
+ }
540
+ ],
541
+ "stateMutability": "view",
542
+ "type": "function"
543
+ },
544
+ {
545
+ "inputs": [],
546
+ "name": "serviceAgreementStorageProxy",
547
+ "outputs": [
548
+ {
549
+ "internalType": "contract ServiceAgreementStorageProxy",
550
+ "name": "",
551
+ "type": "address"
552
+ }
553
+ ],
554
+ "stateMutability": "view",
555
+ "type": "function"
556
+ },
557
+ {
558
+ "inputs": [
559
+ {
560
+ "internalType": "uint256",
561
+ "name": "index",
562
+ "type": "uint256"
563
+ },
564
+ {
565
+ "internalType": "bool",
566
+ "name": "req",
567
+ "type": "bool"
568
+ }
569
+ ],
570
+ "name": "setReq",
571
+ "outputs": [],
572
+ "stateMutability": "nonpayable",
573
+ "type": "function"
574
+ },
575
+ {
576
+ "inputs": [],
577
+ "name": "shardingTableStorage",
578
+ "outputs": [
579
+ {
580
+ "internalType": "contract ShardingTableStorage",
581
+ "name": "",
582
+ "type": "address"
583
+ }
584
+ ],
585
+ "stateMutability": "view",
586
+ "type": "function"
587
+ },
588
+ {
589
+ "inputs": [],
590
+ "name": "stakingContract",
591
+ "outputs": [
592
+ {
593
+ "internalType": "contract Staking",
594
+ "name": "",
595
+ "type": "address"
596
+ }
597
+ ],
598
+ "stateMutability": "view",
599
+ "type": "function"
600
+ },
601
+ {
602
+ "inputs": [],
603
+ "name": "stakingStorage",
604
+ "outputs": [
605
+ {
606
+ "internalType": "contract StakingStorage",
607
+ "name": "",
608
+ "type": "address"
609
+ }
610
+ ],
611
+ "stateMutability": "view",
612
+ "type": "function"
613
+ },
614
+ {
615
+ "inputs": [
616
+ {
617
+ "components": [
618
+ {
619
+ "internalType": "address",
620
+ "name": "assetContract",
621
+ "type": "address"
622
+ },
623
+ {
624
+ "internalType": "uint256",
625
+ "name": "tokenId",
626
+ "type": "uint256"
627
+ },
628
+ {
629
+ "internalType": "bytes",
630
+ "name": "keyword",
631
+ "type": "bytes"
632
+ },
633
+ {
634
+ "internalType": "uint8",
635
+ "name": "hashFunctionId",
636
+ "type": "uint8"
637
+ },
638
+ {
639
+ "internalType": "uint16",
640
+ "name": "epoch",
641
+ "type": "uint16"
642
+ }
643
+ ],
644
+ "internalType": "struct ServiceAgreementStructsV1.CommitInputArgs",
645
+ "name": "args",
646
+ "type": "tuple"
647
+ }
648
+ ],
649
+ "name": "submitCommit",
650
+ "outputs": [],
651
+ "stateMutability": "nonpayable",
652
+ "type": "function"
653
+ },
654
+ {
655
+ "inputs": [
656
+ {
657
+ "components": [
658
+ {
659
+ "internalType": "address",
660
+ "name": "assetContract",
661
+ "type": "address"
662
+ },
663
+ {
664
+ "internalType": "uint256",
665
+ "name": "tokenId",
666
+ "type": "uint256"
667
+ },
668
+ {
669
+ "internalType": "bytes",
670
+ "name": "keyword",
671
+ "type": "bytes"
672
+ },
673
+ {
674
+ "internalType": "uint8",
675
+ "name": "hashFunctionId",
676
+ "type": "uint8"
677
+ },
678
+ {
679
+ "internalType": "uint16",
680
+ "name": "epoch",
681
+ "type": "uint16"
682
+ }
683
+ ],
684
+ "internalType": "struct ServiceAgreementStructsV1.CommitInputArgs",
685
+ "name": "args",
686
+ "type": "tuple"
687
+ }
688
+ ],
689
+ "name": "submitUpdateCommit",
690
+ "outputs": [],
691
+ "stateMutability": "nonpayable",
692
+ "type": "function"
693
+ },
694
+ {
695
+ "inputs": [],
696
+ "name": "unfinalizedStateStorage",
697
+ "outputs": [
698
+ {
699
+ "internalType": "contract UnfinalizedStateStorage",
700
+ "name": "",
701
+ "type": "address"
702
+ }
703
+ ],
704
+ "stateMutability": "view",
705
+ "type": "function"
706
+ },
707
+ {
708
+ "inputs": [],
709
+ "name": "version",
710
+ "outputs": [
711
+ {
712
+ "internalType": "string",
713
+ "name": "",
714
+ "type": "string"
715
+ }
716
+ ],
717
+ "stateMutability": "pure",
718
+ "type": "function"
719
+ }
720
+ ]