dkg 1.1.2__py3-none-any.whl → 8.0.0__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 (45) hide show
  1. dkg/asset.py +589 -683
  2. dkg/constants.py +102 -40
  3. dkg/data/interfaces/AskStorage.json +366 -0
  4. dkg/data/interfaces/Chronos.json +202 -0
  5. dkg/data/interfaces/Hub.json +294 -2
  6. dkg/data/interfaces/IdentityStorage.json +400 -0
  7. dkg/data/interfaces/KnowledgeCollection.json +610 -0
  8. dkg/data/interfaces/KnowledgeCollectionStorage.json +2312 -0
  9. dkg/data/interfaces/Paranet.json +656 -135
  10. dkg/data/interfaces/ParanetIncentivesPoolFactory.json +18 -7
  11. dkg/data/interfaces/ParanetKnowledgeMinersRegistry.json +20 -4
  12. dkg/data/interfaces/{ParanetNeurowebIncentivesPool.json → ParanetNeuroIncentivesPool.json} +27 -58
  13. dkg/data/interfaces/ParanetsRegistry.json +844 -36
  14. dkg/data/interfaces/Token.json +146 -17
  15. dkg/dataclasses.py +13 -4
  16. dkg/exceptions.py +1 -0
  17. dkg/graph.py +55 -24
  18. dkg/main.py +18 -2
  19. dkg/network.py +2 -2
  20. dkg/node.py +7 -0
  21. dkg/paranet.py +356 -111
  22. dkg/providers/blockchain.py +23 -24
  23. dkg/providers/node_http.py +6 -13
  24. dkg/services/input_service.py +183 -0
  25. dkg/services/node_service.py +164 -0
  26. dkg/types/__init__.py +15 -3
  27. dkg/types/general.py +15 -8
  28. dkg/utils/blockchain_request.py +188 -64
  29. dkg/utils/knowledge_asset_tools.py +5 -0
  30. dkg/utils/knowledge_collection_tools.py +236 -0
  31. dkg/utils/merkle.py +1 -1
  32. dkg/utils/node_request.py +33 -33
  33. dkg/utils/rdf.py +10 -6
  34. dkg/utils/string_transformations.py +1 -0
  35. {dkg-1.1.2.dist-info → dkg-8.0.0.dist-info}/METADATA +36 -26
  36. dkg-8.0.0.dist-info/RECORD +56 -0
  37. {dkg-1.1.2.dist-info → dkg-8.0.0.dist-info}/WHEEL +1 -1
  38. dkg/data/interfaces/AssertionStorage.json +0 -229
  39. dkg/data/interfaces/ContentAsset.json +0 -801
  40. dkg/data/interfaces/ContentAssetStorage.json +0 -782
  41. dkg/data/interfaces/ServiceAgreementStorageProxy.json +0 -1314
  42. dkg/data/interfaces/UnfinalizedStateStorage.json +0 -171
  43. dkg-1.1.2.dist-info/RECORD +0 -52
  44. {dkg-1.1.2.dist-info → dkg-8.0.0.dist-info}/LICENSE +0 -0
  45. {dkg-1.1.2.dist-info → dkg-8.0.0.dist-info}/NOTICE +0 -0
@@ -1,801 +0,0 @@
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
- {
350
- "internalType": "uint256",
351
- "name": "tokenId",
352
- "type": "uint256"
353
- }
354
- ],
355
- "name": "cancelAssetStateUpdateFromContract",
356
- "outputs": [],
357
- "stateMutability": "nonpayable",
358
- "type": "function"
359
- },
360
- {
361
- "inputs": [],
362
- "name": "contentAssetStorage",
363
- "outputs": [
364
- {
365
- "internalType": "contract ContentAssetStorage",
366
- "name": "",
367
- "type": "address"
368
- }
369
- ],
370
- "stateMutability": "view",
371
- "type": "function"
372
- },
373
- {
374
- "inputs": [
375
- {
376
- "components": [
377
- {
378
- "internalType": "bytes32",
379
- "name": "assertionId",
380
- "type": "bytes32"
381
- },
382
- {
383
- "internalType": "uint128",
384
- "name": "size",
385
- "type": "uint128"
386
- },
387
- {
388
- "internalType": "uint32",
389
- "name": "triplesNumber",
390
- "type": "uint32"
391
- },
392
- {
393
- "internalType": "uint96",
394
- "name": "chunksNumber",
395
- "type": "uint96"
396
- },
397
- {
398
- "internalType": "uint16",
399
- "name": "epochsNumber",
400
- "type": "uint16"
401
- },
402
- {
403
- "internalType": "uint96",
404
- "name": "tokenAmount",
405
- "type": "uint96"
406
- },
407
- {
408
- "internalType": "uint8",
409
- "name": "scoreFunctionId",
410
- "type": "uint8"
411
- },
412
- {
413
- "internalType": "bool",
414
- "name": "immutable_",
415
- "type": "bool"
416
- }
417
- ],
418
- "internalType": "struct ContentAssetStructs.AssetInputArgs",
419
- "name": "args",
420
- "type": "tuple"
421
- }
422
- ],
423
- "name": "createAsset",
424
- "outputs": [
425
- {
426
- "internalType": "uint256",
427
- "name": "",
428
- "type": "uint256"
429
- }
430
- ],
431
- "stateMutability": "nonpayable",
432
- "type": "function"
433
- },
434
- {
435
- "inputs": [
436
- {
437
- "internalType": "address",
438
- "name": "originalSender",
439
- "type": "address"
440
- },
441
- {
442
- "components": [
443
- {
444
- "internalType": "bytes32",
445
- "name": "assertionId",
446
- "type": "bytes32"
447
- },
448
- {
449
- "internalType": "uint128",
450
- "name": "size",
451
- "type": "uint128"
452
- },
453
- {
454
- "internalType": "uint32",
455
- "name": "triplesNumber",
456
- "type": "uint32"
457
- },
458
- {
459
- "internalType": "uint96",
460
- "name": "chunksNumber",
461
- "type": "uint96"
462
- },
463
- {
464
- "internalType": "uint16",
465
- "name": "epochsNumber",
466
- "type": "uint16"
467
- },
468
- {
469
- "internalType": "uint96",
470
- "name": "tokenAmount",
471
- "type": "uint96"
472
- },
473
- {
474
- "internalType": "uint8",
475
- "name": "scoreFunctionId",
476
- "type": "uint8"
477
- },
478
- {
479
- "internalType": "bool",
480
- "name": "immutable_",
481
- "type": "bool"
482
- }
483
- ],
484
- "internalType": "struct ContentAssetStructs.AssetInputArgs",
485
- "name": "args",
486
- "type": "tuple"
487
- }
488
- ],
489
- "name": "createAssetFromContract",
490
- "outputs": [
491
- {
492
- "internalType": "uint256",
493
- "name": "",
494
- "type": "uint256"
495
- }
496
- ],
497
- "stateMutability": "nonpayable",
498
- "type": "function"
499
- },
500
- {
501
- "inputs": [
502
- {
503
- "internalType": "bytes32",
504
- "name": "assertionId",
505
- "type": "bytes32"
506
- },
507
- {
508
- "internalType": "uint128",
509
- "name": "size",
510
- "type": "uint128"
511
- },
512
- {
513
- "internalType": "uint32",
514
- "name": "triplesNumber",
515
- "type": "uint32"
516
- },
517
- {
518
- "internalType": "uint96",
519
- "name": "chunksNumber",
520
- "type": "uint96"
521
- },
522
- {
523
- "internalType": "uint16",
524
- "name": "epochsNumber",
525
- "type": "uint16"
526
- },
527
- {
528
- "internalType": "uint96",
529
- "name": "tokenAmount",
530
- "type": "uint96"
531
- },
532
- {
533
- "internalType": "uint8",
534
- "name": "scoreFunctionId",
535
- "type": "uint8"
536
- },
537
- {
538
- "internalType": "bool",
539
- "name": "immutable_",
540
- "type": "bool"
541
- }
542
- ],
543
- "name": "createAssetWithVariables",
544
- "outputs": [
545
- {
546
- "internalType": "uint256",
547
- "name": "",
548
- "type": "uint256"
549
- }
550
- ],
551
- "stateMutability": "nonpayable",
552
- "type": "function"
553
- },
554
- {
555
- "inputs": [
556
- {
557
- "internalType": "uint256",
558
- "name": "tokenId",
559
- "type": "uint256"
560
- },
561
- {
562
- "internalType": "uint16",
563
- "name": "epochsNumber",
564
- "type": "uint16"
565
- },
566
- {
567
- "internalType": "uint96",
568
- "name": "tokenAmount",
569
- "type": "uint96"
570
- }
571
- ],
572
- "name": "extendAssetStoringPeriod",
573
- "outputs": [],
574
- "stateMutability": "nonpayable",
575
- "type": "function"
576
- },
577
- {
578
- "inputs": [],
579
- "name": "hashingProxy",
580
- "outputs": [
581
- {
582
- "internalType": "contract HashingProxy",
583
- "name": "",
584
- "type": "address"
585
- }
586
- ],
587
- "stateMutability": "view",
588
- "type": "function"
589
- },
590
- {
591
- "inputs": [],
592
- "name": "hub",
593
- "outputs": [
594
- {
595
- "internalType": "contract HubV2",
596
- "name": "",
597
- "type": "address"
598
- }
599
- ],
600
- "stateMutability": "view",
601
- "type": "function"
602
- },
603
- {
604
- "inputs": [
605
- {
606
- "internalType": "uint256",
607
- "name": "tokenId",
608
- "type": "uint256"
609
- },
610
- {
611
- "internalType": "uint96",
612
- "name": "tokenAmount",
613
- "type": "uint96"
614
- }
615
- ],
616
- "name": "increaseAssetTokenAmount",
617
- "outputs": [],
618
- "stateMutability": "nonpayable",
619
- "type": "function"
620
- },
621
- {
622
- "inputs": [
623
- {
624
- "internalType": "uint256",
625
- "name": "tokenId",
626
- "type": "uint256"
627
- },
628
- {
629
- "internalType": "uint96",
630
- "name": "tokenAmount",
631
- "type": "uint96"
632
- }
633
- ],
634
- "name": "increaseAssetUpdateTokenAmount",
635
- "outputs": [],
636
- "stateMutability": "nonpayable",
637
- "type": "function"
638
- },
639
- {
640
- "inputs": [],
641
- "name": "initialize",
642
- "outputs": [],
643
- "stateMutability": "nonpayable",
644
- "type": "function"
645
- },
646
- {
647
- "inputs": [],
648
- "name": "name",
649
- "outputs": [
650
- {
651
- "internalType": "string",
652
- "name": "",
653
- "type": "string"
654
- }
655
- ],
656
- "stateMutability": "pure",
657
- "type": "function"
658
- },
659
- {
660
- "inputs": [],
661
- "name": "parametersStorage",
662
- "outputs": [
663
- {
664
- "internalType": "contract ParametersStorage",
665
- "name": "",
666
- "type": "address"
667
- }
668
- ],
669
- "stateMutability": "view",
670
- "type": "function"
671
- },
672
- {
673
- "inputs": [],
674
- "name": "paranetKnowledgeAssetsRegistry",
675
- "outputs": [
676
- {
677
- "internalType": "contract ParanetKnowledgeAssetsRegistry",
678
- "name": "",
679
- "type": "address"
680
- }
681
- ],
682
- "stateMutability": "view",
683
- "type": "function"
684
- },
685
- {
686
- "inputs": [],
687
- "name": "paranetKnowledgeMinersRegistry",
688
- "outputs": [
689
- {
690
- "internalType": "contract ParanetKnowledgeMinersRegistry",
691
- "name": "",
692
- "type": "address"
693
- }
694
- ],
695
- "stateMutability": "view",
696
- "type": "function"
697
- },
698
- {
699
- "inputs": [],
700
- "name": "paranetsRegistry",
701
- "outputs": [
702
- {
703
- "internalType": "contract ParanetsRegistry",
704
- "name": "",
705
- "type": "address"
706
- }
707
- ],
708
- "stateMutability": "view",
709
- "type": "function"
710
- },
711
- {
712
- "inputs": [],
713
- "name": "serviceAgreementStorageProxy",
714
- "outputs": [
715
- {
716
- "internalType": "contract ServiceAgreementStorageProxy",
717
- "name": "",
718
- "type": "address"
719
- }
720
- ],
721
- "stateMutability": "view",
722
- "type": "function"
723
- },
724
- {
725
- "inputs": [],
726
- "name": "serviceAgreementV1",
727
- "outputs": [
728
- {
729
- "internalType": "contract ServiceAgreementV1",
730
- "name": "",
731
- "type": "address"
732
- }
733
- ],
734
- "stateMutability": "view",
735
- "type": "function"
736
- },
737
- {
738
- "inputs": [],
739
- "name": "unfinalizedStateStorage",
740
- "outputs": [
741
- {
742
- "internalType": "contract UnfinalizedStateStorage",
743
- "name": "",
744
- "type": "address"
745
- }
746
- ],
747
- "stateMutability": "view",
748
- "type": "function"
749
- },
750
- {
751
- "inputs": [
752
- {
753
- "internalType": "uint256",
754
- "name": "tokenId",
755
- "type": "uint256"
756
- },
757
- {
758
- "internalType": "bytes32",
759
- "name": "assertionId",
760
- "type": "bytes32"
761
- },
762
- {
763
- "internalType": "uint128",
764
- "name": "size",
765
- "type": "uint128"
766
- },
767
- {
768
- "internalType": "uint32",
769
- "name": "triplesNumber",
770
- "type": "uint32"
771
- },
772
- {
773
- "internalType": "uint96",
774
- "name": "chunksNumber",
775
- "type": "uint96"
776
- },
777
- {
778
- "internalType": "uint96",
779
- "name": "updateTokenAmount",
780
- "type": "uint96"
781
- }
782
- ],
783
- "name": "updateAssetState",
784
- "outputs": [],
785
- "stateMutability": "nonpayable",
786
- "type": "function"
787
- },
788
- {
789
- "inputs": [],
790
- "name": "version",
791
- "outputs": [
792
- {
793
- "internalType": "string",
794
- "name": "",
795
- "type": "string"
796
- }
797
- ],
798
- "stateMutability": "pure",
799
- "type": "function"
800
- }
801
- ]