dkg 8.0.0a2__py3-none-any.whl → 8.0.1__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 (72) hide show
  1. dkg/__init__.py +1 -1
  2. dkg/assertion.py +2 -2
  3. dkg/clients/__init__.py +4 -0
  4. dkg/clients/async_dkg.py +109 -0
  5. dkg/{main.py → clients/dkg.py} +42 -21
  6. dkg/constants.py +117 -6
  7. dkg/data/interfaces/AskStorage.json +366 -0
  8. dkg/data/interfaces/Chronos.json +202 -0
  9. dkg/data/interfaces/Hub.json +294 -2
  10. dkg/data/interfaces/IdentityStorage.json +58 -0
  11. dkg/data/interfaces/{ContentAsset.json → KnowledgeCollection.json} +256 -343
  12. dkg/data/interfaces/KnowledgeCollectionStorage.json +2312 -0
  13. dkg/data/interfaces/Paranet.json +30 -214
  14. dkg/data/interfaces/ParanetIncentivesPoolFactory.json +18 -2
  15. dkg/data/interfaces/ParanetKnowledgeMinersRegistry.json +20 -4
  16. dkg/data/interfaces/{ParanetNeurowebIncentivesPool.json → ParanetNeuroIncentivesPool.json} +7 -7
  17. dkg/data/interfaces/ParanetsRegistry.json +102 -32
  18. dkg/data/interfaces/Token.json +146 -17
  19. dkg/managers/__init__.py +0 -0
  20. dkg/managers/async_manager.py +69 -0
  21. dkg/{manager.py → managers/manager.py} +5 -3
  22. dkg/method.py +5 -2
  23. dkg/modules/__init__.py +0 -0
  24. dkg/modules/asset/__init__.py +0 -0
  25. dkg/modules/asset/asset.py +739 -0
  26. dkg/modules/asset/async_asset.py +751 -0
  27. dkg/modules/async_module.py +66 -0
  28. dkg/modules/graph/__init__.py +0 -0
  29. dkg/modules/graph/async_graph.py +118 -0
  30. dkg/modules/graph/graph.py +94 -0
  31. dkg/{module.py → modules/module.py} +1 -1
  32. dkg/modules/network/__init__.py +0 -0
  33. dkg/{network.py → modules/network/network.py} +4 -4
  34. dkg/modules/node/__init__.py +0 -0
  35. dkg/modules/node/async_node.py +39 -0
  36. dkg/{node.py → modules/node/node.py} +2 -2
  37. dkg/modules/paranet/__init__.py +0 -0
  38. dkg/{paranet.py → modules/paranet/paranet.py} +2 -2
  39. dkg/providers/__init__.py +9 -2
  40. dkg/providers/blockchain/__init__.py +4 -0
  41. dkg/providers/blockchain/async_blockchain.py +245 -0
  42. dkg/providers/blockchain/base_blockchain.py +102 -0
  43. dkg/providers/{blockchain.py → blockchain/blockchain.py} +15 -96
  44. dkg/providers/node/__init__.py +4 -0
  45. dkg/providers/node/async_node_http.py +72 -0
  46. dkg/providers/node/base_node_http.py +25 -0
  47. dkg/providers/{node_http.py → node/node_http.py} +12 -10
  48. dkg/services/__init__.py +0 -0
  49. dkg/services/blockchain_services/__init__.py +0 -0
  50. dkg/services/blockchain_services/async_blockchain_service.py +180 -0
  51. dkg/services/blockchain_services/blockchain_service.py +174 -0
  52. dkg/services/input_service.py +183 -0
  53. dkg/services/node_services/__init__.py +0 -0
  54. dkg/services/node_services/async_node_service.py +184 -0
  55. dkg/services/node_services/node_service.py +167 -0
  56. dkg/types/__init__.py +11 -11
  57. dkg/utils/blockchain_request.py +68 -42
  58. dkg/utils/knowledge_asset_tools.py +5 -0
  59. dkg/utils/knowledge_collection_tools.py +248 -0
  60. dkg/utils/node_request.py +60 -13
  61. dkg/utils/rdf.py +9 -3
  62. {dkg-8.0.0a2.dist-info → dkg-8.0.1.dist-info}/METADATA +28 -19
  63. dkg-8.0.1.dist-info/RECORD +82 -0
  64. {dkg-8.0.0a2.dist-info → dkg-8.0.1.dist-info}/WHEEL +1 -1
  65. dkg/asset.py +0 -912
  66. dkg/data/interfaces/AssertionStorage.json +0 -229
  67. dkg/data/interfaces/ContentAssetStorage.json +0 -706
  68. dkg/data/interfaces/ServiceAgreementStorageProxy.json +0 -1314
  69. dkg/graph.py +0 -63
  70. dkg-8.0.0a2.dist-info/RECORD +0 -52
  71. {dkg-8.0.0a2.dist-info → dkg-8.0.1.dist-info}/LICENSE +0 -0
  72. {dkg-8.0.0a2.dist-info → dkg-8.0.1.dist-info}/NOTICE +0 -0
@@ -13,12 +13,12 @@
13
13
  {
14
14
  "inputs": [
15
15
  {
16
- "internalType": "enum ParanetStructs.MinersAccessPolicy[]",
16
+ "internalType": "enum ParanetLib.MinersAccessPolicy[]",
17
17
  "name": "expectedAccessPolicies",
18
18
  "type": "uint8[]"
19
19
  },
20
20
  {
21
- "internalType": "enum ParanetStructs.MinersAccessPolicy",
21
+ "internalType": "enum ParanetLib.MinersAccessPolicy",
22
22
  "name": "actualAccessPolicy",
23
23
  "type": "uint8"
24
24
  }
@@ -29,12 +29,12 @@
29
29
  {
30
30
  "inputs": [
31
31
  {
32
- "internalType": "enum ParanetStructs.NodesAccessPolicy[]",
32
+ "internalType": "enum ParanetLib.NodesAccessPolicy[]",
33
33
  "name": "expectedAccessPolicies",
34
34
  "type": "uint8[]"
35
35
  },
36
36
  {
37
- "internalType": "enum ParanetStructs.NodesAccessPolicy",
37
+ "internalType": "enum ParanetLib.NodesAccessPolicy",
38
38
  "name": "actualAccessPolicy",
39
39
  "type": "uint8"
40
40
  }
@@ -42,27 +42,6 @@
42
42
  "name": "InvalidParanetNodesAccessPolicy",
43
43
  "type": "error"
44
44
  },
45
- {
46
- "inputs": [
47
- {
48
- "internalType": "address",
49
- "name": "paranetKnowledgeAssetStorageContract",
50
- "type": "address"
51
- },
52
- {
53
- "internalType": "uint256",
54
- "name": "paranetTokenId",
55
- "type": "uint256"
56
- },
57
- {
58
- "internalType": "bytes32",
59
- "name": "paranetId",
60
- "type": "bytes32"
61
- }
62
- ],
63
- "name": "KnowledgeAssetIsAPartOfOtherParanet",
64
- "type": "error"
65
- },
66
45
  {
67
46
  "inputs": [
68
47
  {
@@ -92,7 +71,7 @@
92
71
  "type": "address"
93
72
  },
94
73
  {
95
- "internalType": "enum ParanetStructs.RequestStatus",
74
+ "internalType": "enum ParanetLib.RequestStatus",
96
75
  "name": "status",
97
76
  "type": "uint8"
98
77
  }
@@ -193,7 +172,7 @@
193
172
  "type": "uint72"
194
173
  },
195
174
  {
196
- "internalType": "enum ParanetStructs.RequestStatus",
175
+ "internalType": "enum ParanetLib.RequestStatus",
197
176
  "name": "status",
198
177
  "type": "uint8"
199
178
  }
@@ -292,6 +271,22 @@
292
271
  "name": "ProfileDoesntExist",
293
272
  "type": "error"
294
273
  },
274
+ {
275
+ "inputs": [
276
+ {
277
+ "internalType": "string",
278
+ "name": "msg",
279
+ "type": "string"
280
+ }
281
+ ],
282
+ "name": "UnauthorizedAccess",
283
+ "type": "error"
284
+ },
285
+ {
286
+ "inputs": [],
287
+ "name": "ZeroAddressHub",
288
+ "type": "error"
289
+ },
295
290
  {
296
291
  "anonymous": false,
297
292
  "inputs": [
@@ -602,7 +597,7 @@
602
597
  }
603
598
  ],
604
599
  "indexed": false,
605
- "internalType": "struct ParanetStructs.IncentivesPool",
600
+ "internalType": "struct ParanetLib.IncentivesPool",
606
601
  "name": "incentivesPool",
607
602
  "type": "tuple"
608
603
  }
@@ -670,19 +665,19 @@
670
665
  },
671
666
  {
672
667
  "indexed": false,
673
- "internalType": "enum ParanetStructs.NodesAccessPolicy",
668
+ "internalType": "enum ParanetLib.NodesAccessPolicy",
674
669
  "name": "nodesAccessPolicy",
675
670
  "type": "uint8"
676
671
  },
677
672
  {
678
673
  "indexed": false,
679
- "internalType": "enum ParanetStructs.MinersAccessPolicy",
674
+ "internalType": "enum ParanetLib.MinersAccessPolicy",
680
675
  "name": "minersAccessPolicy",
681
676
  "type": "uint8"
682
677
  },
683
678
  {
684
679
  "indexed": false,
685
- "internalType": "enum ParanetStructs.KnowledgeAssetsAccessPolicy",
680
+ "internalType": "enum ParanetLib.KnowledgeAssetsAccessPolicy",
686
681
  "name": "knowledgeAssetsAccessPolicy",
687
682
  "type": "uint8"
688
683
  }
@@ -866,7 +861,7 @@
866
861
  "type": "uint256"
867
862
  }
868
863
  ],
869
- "internalType": "struct ParanetStructs.UniversalAssetLocator[]",
864
+ "internalType": "struct ParanetLib.UniversalAssetLocator[]",
870
865
  "name": "services",
871
866
  "type": "tuple[]"
872
867
  }
@@ -922,51 +917,12 @@
922
917
  "stateMutability": "nonpayable",
923
918
  "type": "function"
924
919
  },
925
- {
926
- "inputs": [],
927
- "name": "contentAsset",
928
- "outputs": [
929
- {
930
- "internalType": "contract ContentAssetV2",
931
- "name": "",
932
- "type": "address"
933
- }
934
- ],
935
- "stateMutability": "view",
936
- "type": "function"
937
- },
938
- {
939
- "inputs": [],
940
- "name": "contentAssetStorage",
941
- "outputs": [
942
- {
943
- "internalType": "contract ContentAssetStorageV2",
944
- "name": "",
945
- "type": "address"
946
- }
947
- ],
948
- "stateMutability": "view",
949
- "type": "function"
950
- },
951
- {
952
- "inputs": [],
953
- "name": "hashingProxy",
954
- "outputs": [
955
- {
956
- "internalType": "contract HashingProxy",
957
- "name": "",
958
- "type": "address"
959
- }
960
- ],
961
- "stateMutability": "view",
962
- "type": "function"
963
- },
964
920
  {
965
921
  "inputs": [],
966
922
  "name": "hub",
967
923
  "outputs": [
968
924
  {
969
- "internalType": "contract HubV2",
925
+ "internalType": "contract Hub",
970
926
  "name": "",
971
927
  "type": "address"
972
928
  }
@@ -994,77 +950,6 @@
994
950
  "stateMutability": "nonpayable",
995
951
  "type": "function"
996
952
  },
997
- {
998
- "inputs": [
999
- {
1000
- "internalType": "address",
1001
- "name": "paranetKAStorageContract",
1002
- "type": "address"
1003
- },
1004
- {
1005
- "internalType": "uint256",
1006
- "name": "paranetKATokenId",
1007
- "type": "uint256"
1008
- },
1009
- {
1010
- "components": [
1011
- {
1012
- "internalType": "bytes32",
1013
- "name": "assertionId",
1014
- "type": "bytes32"
1015
- },
1016
- {
1017
- "internalType": "uint128",
1018
- "name": "size",
1019
- "type": "uint128"
1020
- },
1021
- {
1022
- "internalType": "uint32",
1023
- "name": "triplesNumber",
1024
- "type": "uint32"
1025
- },
1026
- {
1027
- "internalType": "uint96",
1028
- "name": "chunksNumber",
1029
- "type": "uint96"
1030
- },
1031
- {
1032
- "internalType": "uint16",
1033
- "name": "epochsNumber",
1034
- "type": "uint16"
1035
- },
1036
- {
1037
- "internalType": "uint96",
1038
- "name": "tokenAmount",
1039
- "type": "uint96"
1040
- },
1041
- {
1042
- "internalType": "uint8",
1043
- "name": "scoreFunctionId",
1044
- "type": "uint8"
1045
- },
1046
- {
1047
- "internalType": "bool",
1048
- "name": "immutable_",
1049
- "type": "bool"
1050
- }
1051
- ],
1052
- "internalType": "struct ContentAssetStructs.AssetInputArgs",
1053
- "name": "knowledgeAssetArgs",
1054
- "type": "tuple"
1055
- }
1056
- ],
1057
- "name": "mintKnowledgeAsset",
1058
- "outputs": [
1059
- {
1060
- "internalType": "uint256",
1061
- "name": "",
1062
- "type": "uint256"
1063
- }
1064
- ],
1065
- "stateMutability": "nonpayable",
1066
- "type": "function"
1067
- },
1068
953
  {
1069
954
  "inputs": [],
1070
955
  "name": "name",
@@ -1130,34 +1015,6 @@
1130
1015
  "stateMutability": "view",
1131
1016
  "type": "function"
1132
1017
  },
1133
- {
1134
- "inputs": [
1135
- {
1136
- "internalType": "address",
1137
- "name": "paranetKAStorageContract",
1138
- "type": "address"
1139
- },
1140
- {
1141
- "internalType": "uint256",
1142
- "name": "paranetKATokenId",
1143
- "type": "uint256"
1144
- },
1145
- {
1146
- "internalType": "uint256",
1147
- "name": "start",
1148
- "type": "uint256"
1149
- },
1150
- {
1151
- "internalType": "uint256",
1152
- "name": "end",
1153
- "type": "uint256"
1154
- }
1155
- ],
1156
- "name": "processUpdatedKnowledgeAssetStatesMetadata",
1157
- "outputs": [],
1158
- "stateMutability": "nonpayable",
1159
- "type": "function"
1160
- },
1161
1018
  {
1162
1019
  "inputs": [],
1163
1020
  "name": "profileStorage",
@@ -1194,12 +1051,12 @@
1194
1051
  "type": "string"
1195
1052
  },
1196
1053
  {
1197
- "internalType": "enum ParanetStructs.NodesAccessPolicy",
1054
+ "internalType": "enum ParanetLib.NodesAccessPolicy",
1198
1055
  "name": "nodesAccessPolicy",
1199
1056
  "type": "uint8"
1200
1057
  },
1201
1058
  {
1202
- "internalType": "enum ParanetStructs.MinersAccessPolicy",
1059
+ "internalType": "enum ParanetLib.MinersAccessPolicy",
1203
1060
  "name": "minersAccessPolicy",
1204
1061
  "type": "uint8"
1205
1062
  }
@@ -1382,19 +1239,6 @@
1382
1239
  "stateMutability": "nonpayable",
1383
1240
  "type": "function"
1384
1241
  },
1385
- {
1386
- "inputs": [],
1387
- "name": "serviceAgreementStorageProxy",
1388
- "outputs": [
1389
- {
1390
- "internalType": "contract ServiceAgreementStorageProxy",
1391
- "name": "",
1392
- "type": "address"
1393
- }
1394
- ],
1395
- "stateMutability": "view",
1396
- "type": "function"
1397
- },
1398
1242
  {
1399
1243
  "inputs": [
1400
1244
  {
@@ -1421,34 +1265,6 @@
1421
1265
  "stateMutability": "view",
1422
1266
  "type": "function"
1423
1267
  },
1424
- {
1425
- "inputs": [
1426
- {
1427
- "internalType": "address",
1428
- "name": "paranetKAStorageContract",
1429
- "type": "address"
1430
- },
1431
- {
1432
- "internalType": "uint256",
1433
- "name": "paranetKATokenId",
1434
- "type": "uint256"
1435
- },
1436
- {
1437
- "internalType": "address",
1438
- "name": "knowledgeAssetStorageContract",
1439
- "type": "address"
1440
- },
1441
- {
1442
- "internalType": "uint256",
1443
- "name": "knowledgeAssetTokenId",
1444
- "type": "uint256"
1445
- }
1446
- ],
1447
- "name": "submitKnowledgeAsset",
1448
- "outputs": [],
1449
- "stateMutability": "nonpayable",
1450
- "type": "function"
1451
- },
1452
1268
  {
1453
1269
  "inputs": [
1454
1270
  {
@@ -36,6 +36,22 @@
36
36
  "name": "ParanetIncentivesPoolAlreadyExists",
37
37
  "type": "error"
38
38
  },
39
+ {
40
+ "inputs": [
41
+ {
42
+ "internalType": "string",
43
+ "name": "msg",
44
+ "type": "string"
45
+ }
46
+ ],
47
+ "name": "UnauthorizedAccess",
48
+ "type": "error"
49
+ },
50
+ {
51
+ "inputs": [],
52
+ "name": "ZeroAddressHub",
53
+ "type": "error"
54
+ },
39
55
  {
40
56
  "anonymous": false,
41
57
  "inputs": [
@@ -65,7 +81,7 @@
65
81
  }
66
82
  ],
67
83
  "indexed": false,
68
- "internalType": "struct ParanetStructs.IncentivesPool",
84
+ "internalType": "struct ParanetLib.IncentivesPool",
69
85
  "name": "incentivesPool",
70
86
  "type": "tuple"
71
87
  }
@@ -117,7 +133,7 @@
117
133
  "name": "hub",
118
134
  "outputs": [
119
135
  {
120
- "internalType": "contract HubV2",
136
+ "internalType": "contract Hub",
121
137
  "name": "",
122
138
  "type": "address"
123
139
  }
@@ -10,6 +10,22 @@
10
10
  "stateMutability": "nonpayable",
11
11
  "type": "constructor"
12
12
  },
13
+ {
14
+ "inputs": [
15
+ {
16
+ "internalType": "string",
17
+ "name": "msg",
18
+ "type": "string"
19
+ }
20
+ ],
21
+ "name": "UnauthorizedAccess",
22
+ "type": "error"
23
+ },
24
+ {
25
+ "inputs": [],
26
+ "name": "ZeroAddressHub",
27
+ "type": "error"
28
+ },
13
29
  {
14
30
  "inputs": [
15
31
  {
@@ -288,7 +304,7 @@
288
304
  "type": "uint256"
289
305
  }
290
306
  ],
291
- "internalType": "struct ParanetStructs.KnowledgeMinerMetadata",
307
+ "internalType": "struct ParanetLib.KnowledgeMinerMetadata",
292
308
  "name": "",
293
309
  "type": "tuple"
294
310
  }
@@ -464,7 +480,7 @@
464
480
  "type": "uint96"
465
481
  }
466
482
  ],
467
- "internalType": "struct ParanetStructs.UpdatingKnowledgeAssetState[]",
483
+ "internalType": "struct ParanetLib.UpdatingKnowledgeAssetState[]",
468
484
  "name": "",
469
485
  "type": "tuple[]"
470
486
  }
@@ -510,7 +526,7 @@
510
526
  "type": "uint96"
511
527
  }
512
528
  ],
513
- "internalType": "struct ParanetStructs.UpdatingKnowledgeAssetState[]",
529
+ "internalType": "struct ParanetLib.UpdatingKnowledgeAssetState[]",
514
530
  "name": "",
515
531
  "type": "tuple[]"
516
532
  }
@@ -523,7 +539,7 @@
523
539
  "name": "hub",
524
540
  "outputs": [
525
541
  {
526
- "internalType": "contract HubV2",
542
+ "internalType": "contract Hub",
527
543
  "name": "",
528
544
  "type": "address"
529
545
  }
@@ -212,7 +212,7 @@
212
212
  "type": "uint96"
213
213
  }
214
214
  ],
215
- "internalType": "struct ParanetStructs.ParanetIncentivizationProposalVoterInput[]",
215
+ "internalType": "struct ParanetLib.ParanetIncentivizationProposalVoterInput[]",
216
216
  "name": "voters_",
217
217
  "type": "tuple[]"
218
218
  }
@@ -366,7 +366,7 @@
366
366
  "type": "uint256"
367
367
  }
368
368
  ],
369
- "internalType": "struct ParanetStructs.ParanetIncentivesPoolClaimedRewardsProfile[]",
369
+ "internalType": "struct ParanetLib.ParanetIncentivesPoolClaimedRewardsProfile[]",
370
370
  "name": "",
371
371
  "type": "tuple[]"
372
372
  }
@@ -391,7 +391,7 @@
391
391
  "type": "uint256"
392
392
  }
393
393
  ],
394
- "internalType": "struct ParanetStructs.ParanetIncentivesPoolClaimedRewardsProfile[]",
394
+ "internalType": "struct ParanetLib.ParanetIncentivesPoolClaimedRewardsProfile[]",
395
395
  "name": "",
396
396
  "type": "tuple[]"
397
397
  }
@@ -518,7 +518,7 @@
518
518
  "type": "bool"
519
519
  }
520
520
  ],
521
- "internalType": "struct ParanetStructs.NeuroEmissionMultiplier[]",
521
+ "internalType": "struct ParanetLib.NeuroEmissionMultiplier[]",
522
522
  "name": "",
523
523
  "type": "tuple[]"
524
524
  }
@@ -619,7 +619,7 @@
619
619
  "type": "uint256"
620
620
  }
621
621
  ],
622
- "internalType": "struct ParanetStructs.ParanetIncentivizationProposalVoter",
622
+ "internalType": "struct ParanetLib.ParanetIncentivizationProposalVoter",
623
623
  "name": "",
624
624
  "type": "tuple"
625
625
  }
@@ -649,7 +649,7 @@
649
649
  "type": "uint256"
650
650
  }
651
651
  ],
652
- "internalType": "struct ParanetStructs.ParanetIncentivizationProposalVoter[]",
652
+ "internalType": "struct ParanetLib.ParanetIncentivizationProposalVoter[]",
653
653
  "name": "",
654
654
  "type": "tuple[]"
655
655
  }
@@ -675,7 +675,7 @@
675
675
  "name": "hub",
676
676
  "outputs": [
677
677
  {
678
- "internalType": "contract HubV2",
678
+ "internalType": "contract Hub",
679
679
  "name": "",
680
680
  "type": "address"
681
681
  }