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