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,610 @@
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": "id",
18
+ "type": "uint256"
19
+ }
20
+ ],
21
+ "name": "CannotUpdateImmutableKnowledgeCollection",
22
+ "type": "error"
23
+ },
24
+ {
25
+ "inputs": [
26
+ {
27
+ "internalType": "uint72",
28
+ "name": "identityId",
29
+ "type": "uint72"
30
+ },
31
+ {
32
+ "internalType": "bytes32",
33
+ "name": "messageHash",
34
+ "type": "bytes32"
35
+ },
36
+ {
37
+ "internalType": "bytes32",
38
+ "name": "r",
39
+ "type": "bytes32"
40
+ },
41
+ {
42
+ "internalType": "bytes32",
43
+ "name": "vs",
44
+ "type": "bytes32"
45
+ }
46
+ ],
47
+ "name": "InvalidSignature",
48
+ "type": "error"
49
+ },
50
+ {
51
+ "inputs": [
52
+ {
53
+ "internalType": "uint96",
54
+ "name": "expectedTokenAMount",
55
+ "type": "uint96"
56
+ },
57
+ {
58
+ "internalType": "uint96",
59
+ "name": "tokenAmount",
60
+ "type": "uint96"
61
+ }
62
+ ],
63
+ "name": "InvalidTokenAmount",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "uint256",
70
+ "name": "id",
71
+ "type": "uint256"
72
+ },
73
+ {
74
+ "internalType": "uint256",
75
+ "name": "currentEpoch",
76
+ "type": "uint256"
77
+ },
78
+ {
79
+ "internalType": "uint256",
80
+ "name": "endEpoch",
81
+ "type": "uint256"
82
+ }
83
+ ],
84
+ "name": "KnowledgeCollectionExpired",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "uint256",
91
+ "name": "requiredSignatures",
92
+ "type": "uint256"
93
+ },
94
+ {
95
+ "internalType": "uint256",
96
+ "name": "receivedSignatures",
97
+ "type": "uint256"
98
+ }
99
+ ],
100
+ "name": "MinSignaturesRequirementNotMet",
101
+ "type": "error"
102
+ },
103
+ {
104
+ "inputs": [
105
+ {
106
+ "internalType": "uint256",
107
+ "name": "rAmount",
108
+ "type": "uint256"
109
+ },
110
+ {
111
+ "internalType": "uint256",
112
+ "name": "vsAmount",
113
+ "type": "uint256"
114
+ },
115
+ {
116
+ "internalType": "uint256",
117
+ "name": "identityIdsAmount",
118
+ "type": "uint256"
119
+ }
120
+ ],
121
+ "name": "SignaturesSignersMismatch",
122
+ "type": "error"
123
+ },
124
+ {
125
+ "inputs": [
126
+ {
127
+ "internalType": "uint72",
128
+ "name": "identityId",
129
+ "type": "uint72"
130
+ },
131
+ {
132
+ "internalType": "address",
133
+ "name": "signer",
134
+ "type": "address"
135
+ }
136
+ ],
137
+ "name": "SignerIsNotNodeOperator",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [
142
+ {
143
+ "internalType": "address",
144
+ "name": "tokenAddress",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "allowance",
150
+ "type": "uint256"
151
+ },
152
+ {
153
+ "internalType": "uint256",
154
+ "name": "expected",
155
+ "type": "uint256"
156
+ }
157
+ ],
158
+ "name": "TooLowAllowance",
159
+ "type": "error"
160
+ },
161
+ {
162
+ "inputs": [
163
+ {
164
+ "internalType": "address",
165
+ "name": "tokenAddress",
166
+ "type": "address"
167
+ },
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "balance",
171
+ "type": "uint256"
172
+ },
173
+ {
174
+ "internalType": "uint256",
175
+ "name": "expected",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "name": "TooLowBalance",
180
+ "type": "error"
181
+ },
182
+ {
183
+ "inputs": [],
184
+ "name": "TransferFailed",
185
+ "type": "error"
186
+ },
187
+ {
188
+ "inputs": [
189
+ {
190
+ "internalType": "string",
191
+ "name": "msg",
192
+ "type": "string"
193
+ }
194
+ ],
195
+ "name": "UnauthorizedAccess",
196
+ "type": "error"
197
+ },
198
+ {
199
+ "inputs": [],
200
+ "name": "ZeroAddressHub",
201
+ "type": "error"
202
+ },
203
+ {
204
+ "inputs": [],
205
+ "name": "ZeroTokenAmount",
206
+ "type": "error"
207
+ },
208
+ {
209
+ "inputs": [],
210
+ "name": "askStorage",
211
+ "outputs": [
212
+ {
213
+ "internalType": "contract AskStorage",
214
+ "name": "",
215
+ "type": "address"
216
+ }
217
+ ],
218
+ "stateMutability": "view",
219
+ "type": "function"
220
+ },
221
+ {
222
+ "inputs": [],
223
+ "name": "chronos",
224
+ "outputs": [
225
+ {
226
+ "internalType": "contract Chronos",
227
+ "name": "",
228
+ "type": "address"
229
+ }
230
+ ],
231
+ "stateMutability": "view",
232
+ "type": "function"
233
+ },
234
+ {
235
+ "inputs": [
236
+ {
237
+ "internalType": "string",
238
+ "name": "publishOperationId",
239
+ "type": "string"
240
+ },
241
+ {
242
+ "internalType": "bytes32",
243
+ "name": "merkleRoot",
244
+ "type": "bytes32"
245
+ },
246
+ {
247
+ "internalType": "uint256",
248
+ "name": "knowledgeAssetsAmount",
249
+ "type": "uint256"
250
+ },
251
+ {
252
+ "internalType": "uint88",
253
+ "name": "byteSize",
254
+ "type": "uint88"
255
+ },
256
+ {
257
+ "internalType": "uint40",
258
+ "name": "epochs",
259
+ "type": "uint40"
260
+ },
261
+ {
262
+ "internalType": "uint96",
263
+ "name": "tokenAmount",
264
+ "type": "uint96"
265
+ },
266
+ {
267
+ "internalType": "bool",
268
+ "name": "isImmutable",
269
+ "type": "bool"
270
+ },
271
+ {
272
+ "internalType": "address",
273
+ "name": "paymaster",
274
+ "type": "address"
275
+ },
276
+ {
277
+ "internalType": "uint72",
278
+ "name": "publisherNodeIdentityId",
279
+ "type": "uint72"
280
+ },
281
+ {
282
+ "internalType": "bytes32",
283
+ "name": "publisherNodeR",
284
+ "type": "bytes32"
285
+ },
286
+ {
287
+ "internalType": "bytes32",
288
+ "name": "publisherNodeVS",
289
+ "type": "bytes32"
290
+ },
291
+ {
292
+ "internalType": "uint72[]",
293
+ "name": "identityIds",
294
+ "type": "uint72[]"
295
+ },
296
+ {
297
+ "internalType": "bytes32[]",
298
+ "name": "r",
299
+ "type": "bytes32[]"
300
+ },
301
+ {
302
+ "internalType": "bytes32[]",
303
+ "name": "vs",
304
+ "type": "bytes32[]"
305
+ }
306
+ ],
307
+ "name": "createKnowledgeCollection",
308
+ "outputs": [
309
+ {
310
+ "internalType": "uint256",
311
+ "name": "",
312
+ "type": "uint256"
313
+ }
314
+ ],
315
+ "stateMutability": "nonpayable",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [],
320
+ "name": "epochStorage",
321
+ "outputs": [
322
+ {
323
+ "internalType": "contract EpochStorage",
324
+ "name": "",
325
+ "type": "address"
326
+ }
327
+ ],
328
+ "stateMutability": "view",
329
+ "type": "function"
330
+ },
331
+ {
332
+ "inputs": [
333
+ {
334
+ "internalType": "uint256",
335
+ "name": "id",
336
+ "type": "uint256"
337
+ },
338
+ {
339
+ "internalType": "uint40",
340
+ "name": "epochs",
341
+ "type": "uint40"
342
+ },
343
+ {
344
+ "internalType": "uint96",
345
+ "name": "tokenAmount",
346
+ "type": "uint96"
347
+ },
348
+ {
349
+ "internalType": "address",
350
+ "name": "paymaster",
351
+ "type": "address"
352
+ }
353
+ ],
354
+ "name": "extendKnowledgeCollectionLifetime",
355
+ "outputs": [],
356
+ "stateMutability": "nonpayable",
357
+ "type": "function"
358
+ },
359
+ {
360
+ "inputs": [],
361
+ "name": "hub",
362
+ "outputs": [
363
+ {
364
+ "internalType": "contract Hub",
365
+ "name": "",
366
+ "type": "address"
367
+ }
368
+ ],
369
+ "stateMutability": "view",
370
+ "type": "function"
371
+ },
372
+ {
373
+ "inputs": [],
374
+ "name": "identityStorage",
375
+ "outputs": [
376
+ {
377
+ "internalType": "contract IdentityStorage",
378
+ "name": "",
379
+ "type": "address"
380
+ }
381
+ ],
382
+ "stateMutability": "view",
383
+ "type": "function"
384
+ },
385
+ {
386
+ "inputs": [
387
+ {
388
+ "internalType": "uint256",
389
+ "name": "id",
390
+ "type": "uint256"
391
+ },
392
+ {
393
+ "internalType": "uint96",
394
+ "name": "tokenAmount",
395
+ "type": "uint96"
396
+ },
397
+ {
398
+ "internalType": "address",
399
+ "name": "paymaster",
400
+ "type": "address"
401
+ }
402
+ ],
403
+ "name": "increaseKnowledgeCollectionTokenAmount",
404
+ "outputs": [],
405
+ "stateMutability": "nonpayable",
406
+ "type": "function"
407
+ },
408
+ {
409
+ "inputs": [],
410
+ "name": "initialize",
411
+ "outputs": [],
412
+ "stateMutability": "nonpayable",
413
+ "type": "function"
414
+ },
415
+ {
416
+ "inputs": [],
417
+ "name": "knowledgeCollectionStorage",
418
+ "outputs": [
419
+ {
420
+ "internalType": "contract KnowledgeCollectionStorage",
421
+ "name": "",
422
+ "type": "address"
423
+ }
424
+ ],
425
+ "stateMutability": "view",
426
+ "type": "function"
427
+ },
428
+ {
429
+ "inputs": [],
430
+ "name": "name",
431
+ "outputs": [
432
+ {
433
+ "internalType": "string",
434
+ "name": "",
435
+ "type": "string"
436
+ }
437
+ ],
438
+ "stateMutability": "pure",
439
+ "type": "function"
440
+ },
441
+ {
442
+ "inputs": [],
443
+ "name": "parametersStorage",
444
+ "outputs": [
445
+ {
446
+ "internalType": "contract ParametersStorage",
447
+ "name": "",
448
+ "type": "address"
449
+ }
450
+ ],
451
+ "stateMutability": "view",
452
+ "type": "function"
453
+ },
454
+ {
455
+ "inputs": [],
456
+ "name": "paymasterManager",
457
+ "outputs": [
458
+ {
459
+ "internalType": "contract PaymasterManager",
460
+ "name": "",
461
+ "type": "address"
462
+ }
463
+ ],
464
+ "stateMutability": "view",
465
+ "type": "function"
466
+ },
467
+ {
468
+ "inputs": [
469
+ {
470
+ "internalType": "bool",
471
+ "name": "_status",
472
+ "type": "bool"
473
+ }
474
+ ],
475
+ "name": "setStatus",
476
+ "outputs": [],
477
+ "stateMutability": "nonpayable",
478
+ "type": "function"
479
+ },
480
+ {
481
+ "inputs": [],
482
+ "name": "shardingTableStorage",
483
+ "outputs": [
484
+ {
485
+ "internalType": "contract ShardingTableStorage",
486
+ "name": "",
487
+ "type": "address"
488
+ }
489
+ ],
490
+ "stateMutability": "view",
491
+ "type": "function"
492
+ },
493
+ {
494
+ "inputs": [],
495
+ "name": "status",
496
+ "outputs": [
497
+ {
498
+ "internalType": "bool",
499
+ "name": "",
500
+ "type": "bool"
501
+ }
502
+ ],
503
+ "stateMutability": "view",
504
+ "type": "function"
505
+ },
506
+ {
507
+ "inputs": [],
508
+ "name": "tokenContract",
509
+ "outputs": [
510
+ {
511
+ "internalType": "contract IERC20",
512
+ "name": "",
513
+ "type": "address"
514
+ }
515
+ ],
516
+ "stateMutability": "view",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "inputs": [
521
+ {
522
+ "internalType": "uint256",
523
+ "name": "id",
524
+ "type": "uint256"
525
+ },
526
+ {
527
+ "internalType": "string",
528
+ "name": "updateOperationId",
529
+ "type": "string"
530
+ },
531
+ {
532
+ "internalType": "bytes32",
533
+ "name": "merkleRoot",
534
+ "type": "bytes32"
535
+ },
536
+ {
537
+ "internalType": "uint256",
538
+ "name": "mintKnowledgeAssetsAmount",
539
+ "type": "uint256"
540
+ },
541
+ {
542
+ "internalType": "uint256[]",
543
+ "name": "knowledgeAssetsToBurn",
544
+ "type": "uint256[]"
545
+ },
546
+ {
547
+ "internalType": "uint88",
548
+ "name": "byteSize",
549
+ "type": "uint88"
550
+ },
551
+ {
552
+ "internalType": "uint96",
553
+ "name": "tokenAmount",
554
+ "type": "uint96"
555
+ },
556
+ {
557
+ "internalType": "address",
558
+ "name": "paymaster",
559
+ "type": "address"
560
+ },
561
+ {
562
+ "internalType": "uint72",
563
+ "name": "publisherNodeIdentityId",
564
+ "type": "uint72"
565
+ },
566
+ {
567
+ "internalType": "bytes32",
568
+ "name": "publisherNodeR",
569
+ "type": "bytes32"
570
+ },
571
+ {
572
+ "internalType": "bytes32",
573
+ "name": "publisherNodeVS",
574
+ "type": "bytes32"
575
+ },
576
+ {
577
+ "internalType": "uint72[]",
578
+ "name": "identityIds",
579
+ "type": "uint72[]"
580
+ },
581
+ {
582
+ "internalType": "bytes32[]",
583
+ "name": "r",
584
+ "type": "bytes32[]"
585
+ },
586
+ {
587
+ "internalType": "bytes32[]",
588
+ "name": "vs",
589
+ "type": "bytes32[]"
590
+ }
591
+ ],
592
+ "name": "updateKnowledgeCollection",
593
+ "outputs": [],
594
+ "stateMutability": "nonpayable",
595
+ "type": "function"
596
+ },
597
+ {
598
+ "inputs": [],
599
+ "name": "version",
600
+ "outputs": [
601
+ {
602
+ "internalType": "string",
603
+ "name": "",
604
+ "type": "string"
605
+ }
606
+ ],
607
+ "stateMutability": "pure",
608
+ "type": "function"
609
+ }
610
+ ]