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
@@ -0,0 +1,366 @@
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": "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
+ },
29
+ {
30
+ "inputs": [
31
+ {
32
+ "internalType": "uint96",
33
+ "name": "amount",
34
+ "type": "uint96"
35
+ }
36
+ ],
37
+ "name": "decreaseTotalActiveStake",
38
+ "outputs": [],
39
+ "stateMutability": "nonpayable",
40
+ "type": "function"
41
+ },
42
+ {
43
+ "inputs": [
44
+ {
45
+ "internalType": "uint256",
46
+ "name": "amount",
47
+ "type": "uint256"
48
+ }
49
+ ],
50
+ "name": "decreaseWeightedActiveAskSum",
51
+ "outputs": [],
52
+ "stateMutability": "nonpayable",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "getAskBounds",
58
+ "outputs": [
59
+ {
60
+ "internalType": "uint256",
61
+ "name": "",
62
+ "type": "uint256"
63
+ },
64
+ {
65
+ "internalType": "uint256",
66
+ "name": "",
67
+ "type": "uint256"
68
+ }
69
+ ],
70
+ "stateMutability": "view",
71
+ "type": "function"
72
+ },
73
+ {
74
+ "inputs": [],
75
+ "name": "getAskLowerBound",
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": "getAskUpperBound",
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": "getPrevPricePerKbEpoch",
102
+ "outputs": [
103
+ {
104
+ "internalType": "uint256",
105
+ "name": "",
106
+ "type": "uint256"
107
+ }
108
+ ],
109
+ "stateMutability": "view",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [],
114
+ "name": "getPrevStakeWeightedAverageAsk",
115
+ "outputs": [
116
+ {
117
+ "internalType": "uint256",
118
+ "name": "",
119
+ "type": "uint256"
120
+ }
121
+ ],
122
+ "stateMutability": "view",
123
+ "type": "function"
124
+ },
125
+ {
126
+ "inputs": [],
127
+ "name": "getPricePerKbEpoch",
128
+ "outputs": [
129
+ {
130
+ "internalType": "uint256",
131
+ "name": "",
132
+ "type": "uint256"
133
+ }
134
+ ],
135
+ "stateMutability": "view",
136
+ "type": "function"
137
+ },
138
+ {
139
+ "inputs": [],
140
+ "name": "getStakeWeightedAverageAsk",
141
+ "outputs": [
142
+ {
143
+ "internalType": "uint256",
144
+ "name": "",
145
+ "type": "uint256"
146
+ }
147
+ ],
148
+ "stateMutability": "view",
149
+ "type": "function"
150
+ },
151
+ {
152
+ "inputs": [],
153
+ "name": "hub",
154
+ "outputs": [
155
+ {
156
+ "internalType": "contract Hub",
157
+ "name": "",
158
+ "type": "address"
159
+ }
160
+ ],
161
+ "stateMutability": "view",
162
+ "type": "function"
163
+ },
164
+ {
165
+ "inputs": [
166
+ {
167
+ "internalType": "uint96",
168
+ "name": "amount",
169
+ "type": "uint96"
170
+ }
171
+ ],
172
+ "name": "increaseTotalActiveStake",
173
+ "outputs": [],
174
+ "stateMutability": "nonpayable",
175
+ "type": "function"
176
+ },
177
+ {
178
+ "inputs": [
179
+ {
180
+ "internalType": "uint256",
181
+ "name": "amount",
182
+ "type": "uint256"
183
+ }
184
+ ],
185
+ "name": "increaseWeightedActiveAskSum",
186
+ "outputs": [],
187
+ "stateMutability": "nonpayable",
188
+ "type": "function"
189
+ },
190
+ {
191
+ "inputs": [],
192
+ "name": "initialize",
193
+ "outputs": [],
194
+ "stateMutability": "nonpayable",
195
+ "type": "function"
196
+ },
197
+ {
198
+ "inputs": [],
199
+ "name": "name",
200
+ "outputs": [
201
+ {
202
+ "internalType": "string",
203
+ "name": "",
204
+ "type": "string"
205
+ }
206
+ ],
207
+ "stateMutability": "pure",
208
+ "type": "function"
209
+ },
210
+ {
211
+ "inputs": [],
212
+ "name": "parametersStorage",
213
+ "outputs": [
214
+ {
215
+ "internalType": "contract ParametersStorage",
216
+ "name": "",
217
+ "type": "address"
218
+ }
219
+ ],
220
+ "stateMutability": "view",
221
+ "type": "function"
222
+ },
223
+ {
224
+ "inputs": [],
225
+ "name": "prevTotalActiveStake",
226
+ "outputs": [
227
+ {
228
+ "internalType": "uint96",
229
+ "name": "",
230
+ "type": "uint96"
231
+ }
232
+ ],
233
+ "stateMutability": "view",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "inputs": [],
238
+ "name": "prevWeightedActiveAskSum",
239
+ "outputs": [
240
+ {
241
+ "internalType": "uint256",
242
+ "name": "",
243
+ "type": "uint256"
244
+ }
245
+ ],
246
+ "stateMutability": "view",
247
+ "type": "function"
248
+ },
249
+ {
250
+ "inputs": [
251
+ {
252
+ "internalType": "uint96",
253
+ "name": "_prevTotalActiveStake",
254
+ "type": "uint96"
255
+ }
256
+ ],
257
+ "name": "setPrevTotalActiveStake",
258
+ "outputs": [],
259
+ "stateMutability": "nonpayable",
260
+ "type": "function"
261
+ },
262
+ {
263
+ "inputs": [
264
+ {
265
+ "internalType": "uint256",
266
+ "name": "_prevWeightedActiveAskSum",
267
+ "type": "uint256"
268
+ }
269
+ ],
270
+ "name": "setPrevWeightedActiveAskSum",
271
+ "outputs": [],
272
+ "stateMutability": "nonpayable",
273
+ "type": "function"
274
+ },
275
+ {
276
+ "inputs": [
277
+ {
278
+ "internalType": "bool",
279
+ "name": "_status",
280
+ "type": "bool"
281
+ }
282
+ ],
283
+ "name": "setStatus",
284
+ "outputs": [],
285
+ "stateMutability": "nonpayable",
286
+ "type": "function"
287
+ },
288
+ {
289
+ "inputs": [
290
+ {
291
+ "internalType": "uint96",
292
+ "name": "_totalActiveStake",
293
+ "type": "uint96"
294
+ }
295
+ ],
296
+ "name": "setTotalActiveStake",
297
+ "outputs": [],
298
+ "stateMutability": "nonpayable",
299
+ "type": "function"
300
+ },
301
+ {
302
+ "inputs": [
303
+ {
304
+ "internalType": "uint256",
305
+ "name": "_weightedActiveAskSum",
306
+ "type": "uint256"
307
+ }
308
+ ],
309
+ "name": "setWeightedActiveAskSum",
310
+ "outputs": [],
311
+ "stateMutability": "nonpayable",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "inputs": [],
316
+ "name": "status",
317
+ "outputs": [
318
+ {
319
+ "internalType": "bool",
320
+ "name": "",
321
+ "type": "bool"
322
+ }
323
+ ],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [],
329
+ "name": "totalActiveStake",
330
+ "outputs": [
331
+ {
332
+ "internalType": "uint96",
333
+ "name": "",
334
+ "type": "uint96"
335
+ }
336
+ ],
337
+ "stateMutability": "view",
338
+ "type": "function"
339
+ },
340
+ {
341
+ "inputs": [],
342
+ "name": "version",
343
+ "outputs": [
344
+ {
345
+ "internalType": "string",
346
+ "name": "",
347
+ "type": "string"
348
+ }
349
+ ],
350
+ "stateMutability": "pure",
351
+ "type": "function"
352
+ },
353
+ {
354
+ "inputs": [],
355
+ "name": "weightedActiveAskSum",
356
+ "outputs": [
357
+ {
358
+ "internalType": "uint256",
359
+ "name": "",
360
+ "type": "uint256"
361
+ }
362
+ ],
363
+ "stateMutability": "view",
364
+ "type": "function"
365
+ }
366
+ ]
@@ -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
+ ]