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