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
@@ -0,0 +1,202 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "uint256",
6
+ "name": "_startTime",
7
+ "type": "uint256"
8
+ },
9
+ {
10
+ "internalType": "uint256",
11
+ "name": "_epochLength",
12
+ "type": "uint256"
13
+ }
14
+ ],
15
+ "stateMutability": "nonpayable",
16
+ "type": "constructor"
17
+ },
18
+ {
19
+ "inputs": [],
20
+ "name": "InvalidEpochLength",
21
+ "type": "error"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "InvalidStartTime",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [],
30
+ "name": "EPOCH_LENGTH",
31
+ "outputs": [
32
+ {
33
+ "internalType": "uint256",
34
+ "name": "",
35
+ "type": "uint256"
36
+ }
37
+ ],
38
+ "stateMutability": "view",
39
+ "type": "function"
40
+ },
41
+ {
42
+ "inputs": [],
43
+ "name": "START_TIME",
44
+ "outputs": [
45
+ {
46
+ "internalType": "uint256",
47
+ "name": "",
48
+ "type": "uint256"
49
+ }
50
+ ],
51
+ "stateMutability": "view",
52
+ "type": "function"
53
+ },
54
+ {
55
+ "inputs": [],
56
+ "name": "elapsedTimeInCurrentEpoch",
57
+ "outputs": [
58
+ {
59
+ "internalType": "uint256",
60
+ "name": "",
61
+ "type": "uint256"
62
+ }
63
+ ],
64
+ "stateMutability": "view",
65
+ "type": "function"
66
+ },
67
+ {
68
+ "inputs": [
69
+ {
70
+ "internalType": "uint256",
71
+ "name": "timestamp",
72
+ "type": "uint256"
73
+ }
74
+ ],
75
+ "name": "epochAtTimestamp",
76
+ "outputs": [
77
+ {
78
+ "internalType": "uint256",
79
+ "name": "",
80
+ "type": "uint256"
81
+ }
82
+ ],
83
+ "stateMutability": "view",
84
+ "type": "function"
85
+ },
86
+ {
87
+ "inputs": [],
88
+ "name": "epochLength",
89
+ "outputs": [
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "",
93
+ "type": "uint256"
94
+ }
95
+ ],
96
+ "stateMutability": "view",
97
+ "type": "function"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "getCurrentEpoch",
102
+ "outputs": [
103
+ {
104
+ "internalType": "uint256",
105
+ "name": "",
106
+ "type": "uint256"
107
+ }
108
+ ],
109
+ "stateMutability": "view",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "epochNumber",
117
+ "type": "uint256"
118
+ }
119
+ ],
120
+ "name": "hasEpochElapsed",
121
+ "outputs": [
122
+ {
123
+ "internalType": "bool",
124
+ "name": "",
125
+ "type": "bool"
126
+ }
127
+ ],
128
+ "stateMutability": "view",
129
+ "type": "function"
130
+ },
131
+ {
132
+ "inputs": [],
133
+ "name": "isChronosActive",
134
+ "outputs": [
135
+ {
136
+ "internalType": "bool",
137
+ "name": "",
138
+ "type": "bool"
139
+ }
140
+ ],
141
+ "stateMutability": "view",
142
+ "type": "function"
143
+ },
144
+ {
145
+ "inputs": [],
146
+ "name": "startTime",
147
+ "outputs": [
148
+ {
149
+ "internalType": "uint256",
150
+ "name": "",
151
+ "type": "uint256"
152
+ }
153
+ ],
154
+ "stateMutability": "view",
155
+ "type": "function"
156
+ },
157
+ {
158
+ "inputs": [],
159
+ "name": "timeUntilNextEpoch",
160
+ "outputs": [
161
+ {
162
+ "internalType": "uint256",
163
+ "name": "",
164
+ "type": "uint256"
165
+ }
166
+ ],
167
+ "stateMutability": "view",
168
+ "type": "function"
169
+ },
170
+ {
171
+ "inputs": [
172
+ {
173
+ "internalType": "uint256",
174
+ "name": "epochNumber",
175
+ "type": "uint256"
176
+ }
177
+ ],
178
+ "name": "timestampForEpoch",
179
+ "outputs": [
180
+ {
181
+ "internalType": "uint256",
182
+ "name": "",
183
+ "type": "uint256"
184
+ }
185
+ ],
186
+ "stateMutability": "view",
187
+ "type": "function"
188
+ },
189
+ {
190
+ "inputs": [],
191
+ "name": "totalElapsedTime",
192
+ "outputs": [
193
+ {
194
+ "internalType": "uint256",
195
+ "name": "",
196
+ "type": "uint256"
197
+ }
198
+ ],
199
+ "stateMutability": "view",
200
+ "type": "function"
201
+ }
202
+ ]
@@ -1,4 +1,118 @@
1
1
  [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [
9
+ {
10
+ "internalType": "address",
11
+ "name": "addr",
12
+ "type": "address"
13
+ }
14
+ ],
15
+ "name": "AddressAlreadyInSet",
16
+ "type": "error"
17
+ },
18
+ {
19
+ "inputs": [
20
+ {
21
+ "internalType": "address",
22
+ "name": "addr",
23
+ "type": "address"
24
+ }
25
+ ],
26
+ "name": "AddressDoesNotExist",
27
+ "type": "error"
28
+ },
29
+ {
30
+ "inputs": [
31
+ {
32
+ "internalType": "string",
33
+ "name": "name",
34
+ "type": "string"
35
+ }
36
+ ],
37
+ "name": "ContractAlreadyExists",
38
+ "type": "error"
39
+ },
40
+ {
41
+ "inputs": [
42
+ {
43
+ "internalType": "string",
44
+ "name": "name",
45
+ "type": "string"
46
+ }
47
+ ],
48
+ "name": "ContractDoesNotExist",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [
53
+ {
54
+ "internalType": "string",
55
+ "name": "contractName",
56
+ "type": "string"
57
+ }
58
+ ],
59
+ "name": "ContractNotRegistered",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "EmptyName",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [
69
+ {
70
+ "internalType": "address",
71
+ "name": "addr",
72
+ "type": "address"
73
+ }
74
+ ],
75
+ "name": "InvalidTargetContract",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [
80
+ {
81
+ "internalType": "address",
82
+ "name": "owner",
83
+ "type": "address"
84
+ }
85
+ ],
86
+ "name": "OwnableInvalidOwner",
87
+ "type": "error"
88
+ },
89
+ {
90
+ "inputs": [
91
+ {
92
+ "internalType": "address",
93
+ "name": "account",
94
+ "type": "address"
95
+ }
96
+ ],
97
+ "name": "OwnableUnauthorizedAccount",
98
+ "type": "error"
99
+ },
100
+ {
101
+ "inputs": [
102
+ {
103
+ "internalType": "string",
104
+ "name": "msg",
105
+ "type": "string"
106
+ }
107
+ ],
108
+ "name": "UnauthorizedAccess",
109
+ "type": "error"
110
+ },
111
+ {
112
+ "inputs": [],
113
+ "name": "ZeroAddress",
114
+ "type": "error"
115
+ },
2
116
  {
3
117
  "anonymous": false,
4
118
  "inputs": [
@@ -18,6 +132,25 @@
18
132
  "name": "AssetStorageChanged",
19
133
  "type": "event"
20
134
  },
135
+ {
136
+ "anonymous": false,
137
+ "inputs": [
138
+ {
139
+ "indexed": false,
140
+ "internalType": "string",
141
+ "name": "contractName",
142
+ "type": "string"
143
+ },
144
+ {
145
+ "indexed": false,
146
+ "internalType": "address",
147
+ "name": "contractAddress",
148
+ "type": "address"
149
+ }
150
+ ],
151
+ "name": "AssetStorageRemoved",
152
+ "type": "event"
153
+ },
21
154
  {
22
155
  "anonymous": false,
23
156
  "inputs": [
@@ -37,6 +170,25 @@
37
170
  "name": "ContractChanged",
38
171
  "type": "event"
39
172
  },
173
+ {
174
+ "anonymous": false,
175
+ "inputs": [
176
+ {
177
+ "indexed": false,
178
+ "internalType": "string",
179
+ "name": "contractName",
180
+ "type": "string"
181
+ },
182
+ {
183
+ "indexed": false,
184
+ "internalType": "address",
185
+ "name": "contractAddress",
186
+ "type": "address"
187
+ }
188
+ ],
189
+ "name": "ContractRemoved",
190
+ "type": "event"
191
+ },
40
192
  {
41
193
  "anonymous": false,
42
194
  "inputs": [
@@ -94,6 +246,30 @@
94
246
  "name": "OwnershipTransferred",
95
247
  "type": "event"
96
248
  },
249
+ {
250
+ "inputs": [
251
+ {
252
+ "internalType": "address",
253
+ "name": "target",
254
+ "type": "address"
255
+ },
256
+ {
257
+ "internalType": "bytes",
258
+ "name": "data",
259
+ "type": "bytes"
260
+ }
261
+ ],
262
+ "name": "forwardCall",
263
+ "outputs": [
264
+ {
265
+ "internalType": "bytes",
266
+ "name": "",
267
+ "type": "bytes"
268
+ }
269
+ ],
270
+ "stateMutability": "nonpayable",
271
+ "type": "function"
272
+ },
97
273
  {
98
274
  "inputs": [],
99
275
  "name": "getAllAssetStorages",
@@ -111,7 +287,7 @@
111
287
  "type": "address"
112
288
  }
113
289
  ],
114
- "internalType": "struct UnorderedNamedContractDynamicSetStructs.Contract[]",
290
+ "internalType": "struct UnorderedNamedContractDynamicSet.Contract[]",
115
291
  "name": "",
116
292
  "type": "tuple[]"
117
293
  }
@@ -136,7 +312,7 @@
136
312
  "type": "address"
137
313
  }
138
314
  ],
139
- "internalType": "struct UnorderedNamedContractDynamicSetStructs.Contract[]",
315
+ "internalType": "struct UnorderedNamedContractDynamicSet.Contract[]",
140
316
  "name": "",
141
317
  "type": "tuple[]"
142
318
  }
@@ -284,6 +460,58 @@
284
460
  "stateMutability": "view",
285
461
  "type": "function"
286
462
  },
463
+ {
464
+ "inputs": [
465
+ {
466
+ "internalType": "address",
467
+ "name": "assetStorageAddress",
468
+ "type": "address"
469
+ }
470
+ ],
471
+ "name": "removeAssetStorageByAddress",
472
+ "outputs": [],
473
+ "stateMutability": "nonpayable",
474
+ "type": "function"
475
+ },
476
+ {
477
+ "inputs": [
478
+ {
479
+ "internalType": "string",
480
+ "name": "assetStorageName",
481
+ "type": "string"
482
+ }
483
+ ],
484
+ "name": "removeAssetStorageByName",
485
+ "outputs": [],
486
+ "stateMutability": "nonpayable",
487
+ "type": "function"
488
+ },
489
+ {
490
+ "inputs": [
491
+ {
492
+ "internalType": "address",
493
+ "name": "contractAddress",
494
+ "type": "address"
495
+ }
496
+ ],
497
+ "name": "removeContractByAddress",
498
+ "outputs": [],
499
+ "stateMutability": "nonpayable",
500
+ "type": "function"
501
+ },
502
+ {
503
+ "inputs": [
504
+ {
505
+ "internalType": "string",
506
+ "name": "contractName",
507
+ "type": "string"
508
+ }
509
+ ],
510
+ "name": "removeContractByName",
511
+ "outputs": [],
512
+ "stateMutability": "nonpayable",
513
+ "type": "function"
514
+ },
287
515
  {
288
516
  "inputs": [],
289
517
  "name": "renounceOwnership",
@@ -291,6 +519,70 @@
291
519
  "stateMutability": "nonpayable",
292
520
  "type": "function"
293
521
  },
522
+ {
523
+ "inputs": [
524
+ {
525
+ "components": [
526
+ {
527
+ "internalType": "string",
528
+ "name": "name",
529
+ "type": "string"
530
+ },
531
+ {
532
+ "internalType": "address",
533
+ "name": "addr",
534
+ "type": "address"
535
+ }
536
+ ],
537
+ "internalType": "struct HubLib.Contract[]",
538
+ "name": "newContracts",
539
+ "type": "tuple[]"
540
+ },
541
+ {
542
+ "components": [
543
+ {
544
+ "internalType": "string",
545
+ "name": "name",
546
+ "type": "string"
547
+ },
548
+ {
549
+ "internalType": "address",
550
+ "name": "addr",
551
+ "type": "address"
552
+ }
553
+ ],
554
+ "internalType": "struct HubLib.Contract[]",
555
+ "name": "newAssetStorageContracts",
556
+ "type": "tuple[]"
557
+ },
558
+ {
559
+ "internalType": "address[]",
560
+ "name": "contractsToReinitialize",
561
+ "type": "address[]"
562
+ },
563
+ {
564
+ "components": [
565
+ {
566
+ "internalType": "string",
567
+ "name": "contractName",
568
+ "type": "string"
569
+ },
570
+ {
571
+ "internalType": "bytes[]",
572
+ "name": "encodedData",
573
+ "type": "bytes[]"
574
+ }
575
+ ],
576
+ "internalType": "struct HubLib.ForwardCallInputArgs[]",
577
+ "name": "forwardCallsData",
578
+ "type": "tuple[]"
579
+ }
580
+ ],
581
+ "name": "setAndReinitializeContracts",
582
+ "outputs": [],
583
+ "stateMutability": "nonpayable",
584
+ "type": "function"
585
+ },
294
586
  {
295
587
  "inputs": [
296
588
  {