dkg 1.1.2__tar.gz → 8.0.0__tar.gz

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 (66) hide show
  1. {dkg-1.1.2 → dkg-8.0.0}/PKG-INFO +36 -26
  2. {dkg-1.1.2 → dkg-8.0.0}/README.md +24 -17
  3. dkg-8.0.0/dkg/asset.py +892 -0
  4. dkg-8.0.0/dkg/constants.py +175 -0
  5. dkg-8.0.0/dkg/data/interfaces/AskStorage.json +366 -0
  6. dkg-8.0.0/dkg/data/interfaces/Chronos.json +202 -0
  7. {dkg-1.1.2 → dkg-8.0.0}/dkg/data/interfaces/Hub.json +294 -2
  8. dkg-8.0.0/dkg/data/interfaces/IdentityStorage.json +400 -0
  9. dkg-8.0.0/dkg/data/interfaces/KnowledgeCollection.json +610 -0
  10. dkg-8.0.0/dkg/data/interfaces/KnowledgeCollectionStorage.json +2312 -0
  11. {dkg-1.1.2 → dkg-8.0.0}/dkg/data/interfaces/Paranet.json +656 -135
  12. {dkg-1.1.2 → dkg-8.0.0}/dkg/data/interfaces/ParanetIncentivesPoolFactory.json +18 -7
  13. {dkg-1.1.2 → dkg-8.0.0}/dkg/data/interfaces/ParanetKnowledgeMinersRegistry.json +20 -4
  14. dkg-1.1.2/dkg/data/interfaces/ParanetNeurowebIncentivesPool.json → dkg-8.0.0/dkg/data/interfaces/ParanetNeuroIncentivesPool.json +27 -58
  15. dkg-8.0.0/dkg/data/interfaces/ParanetsRegistry.json +1680 -0
  16. {dkg-1.1.2 → dkg-8.0.0}/dkg/data/interfaces/Token.json +146 -17
  17. {dkg-1.1.2 → dkg-8.0.0}/dkg/dataclasses.py +13 -4
  18. {dkg-1.1.2 → dkg-8.0.0}/dkg/exceptions.py +1 -0
  19. dkg-8.0.0/dkg/graph.py +94 -0
  20. {dkg-1.1.2 → dkg-8.0.0}/dkg/main.py +18 -2
  21. {dkg-1.1.2 → dkg-8.0.0}/dkg/network.py +2 -2
  22. {dkg-1.1.2 → dkg-8.0.0}/dkg/node.py +7 -0
  23. {dkg-1.1.2 → dkg-8.0.0}/dkg/paranet.py +356 -111
  24. {dkg-1.1.2 → dkg-8.0.0}/dkg/providers/blockchain.py +23 -24
  25. {dkg-1.1.2 → dkg-8.0.0}/dkg/providers/node_http.py +6 -13
  26. dkg-8.0.0/dkg/services/input_service.py +183 -0
  27. dkg-8.0.0/dkg/services/node_service.py +164 -0
  28. dkg-8.0.0/dkg/types/__init__.py +21 -0
  29. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/general.py +15 -8
  30. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/blockchain_request.py +188 -64
  31. dkg-8.0.0/dkg/utils/knowledge_asset_tools.py +5 -0
  32. dkg-8.0.0/dkg/utils/knowledge_collection_tools.py +236 -0
  33. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/merkle.py +1 -1
  34. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/node_request.py +33 -33
  35. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/rdf.py +10 -6
  36. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/string_transformations.py +1 -0
  37. {dkg-1.1.2 → dkg-8.0.0}/pyproject.toml +12 -9
  38. dkg-1.1.2/dkg/asset.py +0 -986
  39. dkg-1.1.2/dkg/constants.py +0 -113
  40. dkg-1.1.2/dkg/data/interfaces/AssertionStorage.json +0 -229
  41. dkg-1.1.2/dkg/data/interfaces/ContentAsset.json +0 -801
  42. dkg-1.1.2/dkg/data/interfaces/ContentAssetStorage.json +0 -782
  43. dkg-1.1.2/dkg/data/interfaces/ParanetsRegistry.json +0 -872
  44. dkg-1.1.2/dkg/data/interfaces/ServiceAgreementStorageProxy.json +0 -1314
  45. dkg-1.1.2/dkg/data/interfaces/UnfinalizedStateStorage.json +0 -171
  46. dkg-1.1.2/dkg/graph.py +0 -63
  47. dkg-1.1.2/dkg/types/__init__.py +0 -9
  48. {dkg-1.1.2 → dkg-8.0.0}/LICENSE +0 -0
  49. {dkg-1.1.2 → dkg-8.0.0}/NOTICE +0 -0
  50. {dkg-1.1.2 → dkg-8.0.0}/dkg/__init__.py +0 -0
  51. {dkg-1.1.2 → dkg-8.0.0}/dkg/assertion.py +0 -0
  52. {dkg-1.1.2 → dkg-8.0.0}/dkg/manager.py +0 -0
  53. {dkg-1.1.2 → dkg-8.0.0}/dkg/method.py +0 -0
  54. {dkg-1.1.2 → dkg-8.0.0}/dkg/module.py +0 -0
  55. {dkg-1.1.2 → dkg-8.0.0}/dkg/providers/__init__.py +0 -0
  56. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/blockchain.py +0 -0
  57. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/dkg_node.py +0 -0
  58. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/encoding.py +0 -0
  59. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/evm.py +0 -0
  60. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/generics.py +0 -0
  61. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/network.py +0 -0
  62. {dkg-1.1.2 → dkg-8.0.0}/dkg/types/rdf.py +0 -0
  63. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/__init__.py +0 -0
  64. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/decorators.py +0 -0
  65. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/metadata.py +0 -0
  66. {dkg-1.1.2 → dkg-8.0.0}/dkg/utils/ual.py +0 -0
@@ -1,29 +1,32 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dkg
3
- Version: 1.1.2
3
+ Version: 8.0.0
4
4
  Summary: Python library for interacting with the OriginTrail Decentralized Knowledge Graph
5
5
  License: Apache-2.0
6
- Author: Uladzislau Hubar
7
- Author-email: hubar.uladzislau@gmail.com
6
+ Author: Zvonimir Scuac
7
+ Author-email: zvonimir.sculac@origin-trail.com
8
8
  Requires-Python: >=3.10,<4.0
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: eth-abi (>=5.0.1,<6.0.0)
15
- Requires-Dist: eth-account (>=0.11.0,<0.12.0)
16
- Requires-Dist: hexbytes (>=0.3.0,<0.4.0)
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: eth-abi (>=5.1.0,<6.0.0)
16
+ Requires-Dist: eth-account (>=0.13.4,<0.14.0)
17
+ Requires-Dist: eth-typing (>=5.0.0,<6.0.0)
18
+ Requires-Dist: hexbytes (>=1.2.1,<2.0.0)
17
19
  Requires-Dist: ot-pyld (>=2.1.1,<3.0.0)
18
- Requires-Dist: pandas (>=1.5.3,<2.0.0)
19
- Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
20
+ Requires-Dist: pandas (>=2.2.3,<3.0.0)
21
+ Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
22
+ Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
20
23
  Requires-Dist: rdflib (>=6.3.2,<7.0.0)
21
- Requires-Dist: web3 (>=6.19.0,<7.0.0)
24
+ Requires-Dist: web3 (>=7.3.0,<8.0.0)
22
25
  Description-Content-Type: text/markdown
23
26
 
24
27
  <a name="readme-top"></a>
25
28
 
26
- ___
29
+ ---
27
30
 
28
31
  <br />
29
32
  <div align="center">
@@ -74,7 +77,7 @@ ___
74
77
  </ol>
75
78
  </details>
76
79
 
77
- ___
80
+ ---
78
81
 
79
82
  <br/>
80
83
 
@@ -84,6 +87,7 @@ ___
84
87
  <summary>
85
88
 
86
89
  ### **What is the Decentralized Knowledge Graph?**
90
+
87
91
  </summary>
88
92
 
89
93
  <br/>
@@ -93,17 +97,19 @@ ___
93
97
  </div>
94
98
 
95
99
  OriginTrail Decentralized Knowledge Graph (DKG), hosted on the OriginTrail Decentralized Network (ODN) as trusted knowledge infrastructure, is shared global Knowledge Graph of Knowledge Assets. Running on the basis of the permissionless multi-chain OriginTrail protocol, it combines blockchains and knowledge graph technology to enable trusted AI applications based on key W3C standards.
100
+
96
101
  </details>
97
102
 
98
103
  <details open>
99
104
  <summary>
100
105
 
101
106
  ### **The OriginTrail DKG Architecture**
107
+
102
108
  </summary>
103
109
 
104
110
  <br/>
105
111
 
106
- The OriginTrail tech stack is a three layer structure, consisting of the multi-chain consensus layer (OriginTrail layer 1, running on multiple blockchains), the Decentralized Knowledge Graph layer (OriginTrail Layer 2, hosted on the ODN) and Trusted Knowledge applications in the application layer.
112
+ The OriginTrail tech stack is a three layer structure, consisting of the multi-chain consensus layer (OriginTrail layer 1, running on multiple blockchains), the Decentralized Knowledge Graph layer (OriginTrail Layer 2, hosted on the ODN) and Trusted Knowledge applications in the application layer.
107
113
 
108
114
  <div align="center">
109
115
  <img src="images/dkg-architecture.png" alt="DKG Architecture" width="400">
@@ -111,13 +117,15 @@ The OriginTrail tech stack is a three layer structure, consisting of the multi-c
111
117
 
112
118
  Further, the architecture differentiates between **the public, replicated knowledge graph** shared by all network nodes according to the protocol, and **private Knowledge graphs** hosted separately by each of the OriginTrail nodes.
113
119
 
114
- **Anyone can run an OriginTrail node and become part of the ODN, contributing to the network capacity and hosting the OriginTrail DKG. The OriginTrail node is the ultimate data service for data and knowledge intensive Web3 applications and is used as the key backbone for trusted AI applications (see https://chatdkg.ai)**
120
+ **Anyone can run an OriginTrail node and become part of the ODN, contributing to the network capacity and hosting the OriginTrail DKG. The OriginTrail node is the ultimate data service for data and knowledge intensive Web3 applications and is used as the key backbone for trusted AI applications (see https://chatdkg.ai)**
121
+
115
122
  </details>
116
123
 
117
124
  <details open>
118
125
  <summary>
119
126
 
120
127
  ### **What is a Knowledge Asset?**
128
+
121
129
  </summary>
122
130
 
123
131
  <br/>
@@ -129,15 +137,16 @@ Further, the architecture differentiates between **the public, replicated knowle
129
137
  **Knowledge Asset is the new, AI‑ready resource for the Internet**
130
138
 
131
139
  Knowledge Assets are verifiable containers of structured knowledge that live on the OriginTrail DKG and provide:
140
+
132
141
  - **Discoverability - UAL is the new URL**. Uniform Asset Locators (UALs, based on the W3C Decentralized Identifiers) are a new Web3 knowledge identifier (extensions of the Uniform Resource Locators - URLs) which identify a specific piece of knowledge and make it easy to find and connect with other Knowledge Assets.
133
142
  - **Ownership - NFTs enable ownership**. Each Knowledge Asset contains an NFT token that enables ownership, knowledge asset administration and market mechanisms.
134
143
  - **Verifiability - On-chain information origin and verifiable trail**. The blockchain tech increases trust, security, transparency, and the traceability of information.
135
144
 
136
-
137
145
  By their nature, Knowledge Assets are semantic resources (following the W3C Semantic Web set of standards), and through their symbolic representations inherently AI ready. See more at https://chatdkg.ai
138
146
  <br/>
139
147
 
140
148
  **Discover Knowledge Assets with the DKG Explorer:**
149
+
141
150
  <div align="center">
142
151
  <table>
143
152
  <tr>
@@ -169,7 +178,6 @@ By their nature, Knowledge Assets are semantic resources (following the W3C Sema
169
178
  </table>
170
179
  </div>
171
180
 
172
-
173
181
  </details>
174
182
 
175
183
  <p align="right">(<a href="#readme-top">back to top</a>)</p>
@@ -177,40 +185,43 @@ By their nature, Knowledge Assets are semantic resources (following the W3C Sema
177
185
 
178
186
  ## 🚀 Getting Started
179
187
 
180
- ___
188
+ ---
181
189
 
182
190
  ### Prerequisites
183
191
 
184
- * python `>=3.10`
185
- * poetry `>=1.5.1`
186
-
192
+ - python `>=3.10`
193
+ - poetry `>=1.5.1`
187
194
 
188
195
  In order to use in the local environment, make sure to [run the local DKG network](https://github.com/OriginTrail/ot-node?tab=readme-ov-file#local-network-setup).
189
196
 
190
- ___
197
+ ---
198
+
191
199
  <br/>
192
200
 
193
201
  ### Installation
194
202
 
195
-
196
203
  Create virtual environment (you can choose any existing folder this command will create configurations and virtual env for python):
204
+
197
205
  ```bash
198
206
  python3 -m venv /path/to/folder
199
207
  ```
200
208
 
201
209
  Inside of previously generated folder you will find activate script in bin folder and run it:
210
+
202
211
  ```bash
203
212
  source /path/to/folder/bin/activate
204
213
  ```
205
214
 
206
- Install dependencies:
215
+ Install dependencies and configure pre-commit hooks:
216
+
207
217
  ```bash
208
- poetry install
218
+ make install
209
219
  ```
210
220
 
211
221
  Now you can run a demo example file (you need to have the local DKG network running):
222
+
212
223
  ```bash
213
- python3 examples/demo.py
224
+ make run-demo
214
225
  ```
215
226
 
216
227
  <br/>
@@ -251,7 +262,6 @@ Don't forget to give the project a star! Thanks again!
251
262
 
252
263
  - [web3.py](https://github.com/ethereum/web3.py): Basis for this project
253
264
 
254
-
255
265
  <br/>
256
266
  <p align="right">(<a href="#readme-top">back to top</a>)</p>
257
267
 
@@ -286,5 +296,5 @@ Don't forget to give the project a star! Thanks again!
286
296
  </a>
287
297
  </div>
288
298
 
289
- ___
299
+ ---
290
300
 
@@ -1,6 +1,6 @@
1
1
  <a name="readme-top"></a>
2
2
 
3
- ___
3
+ ---
4
4
 
5
5
  <br />
6
6
  <div align="center">
@@ -51,7 +51,7 @@ ___
51
51
  </ol>
52
52
  </details>
53
53
 
54
- ___
54
+ ---
55
55
 
56
56
  <br/>
57
57
 
@@ -61,6 +61,7 @@ ___
61
61
  <summary>
62
62
 
63
63
  ### **What is the Decentralized Knowledge Graph?**
64
+
64
65
  </summary>
65
66
 
66
67
  <br/>
@@ -70,17 +71,19 @@ ___
70
71
  </div>
71
72
 
72
73
  OriginTrail Decentralized Knowledge Graph (DKG), hosted on the OriginTrail Decentralized Network (ODN) as trusted knowledge infrastructure, is shared global Knowledge Graph of Knowledge Assets. Running on the basis of the permissionless multi-chain OriginTrail protocol, it combines blockchains and knowledge graph technology to enable trusted AI applications based on key W3C standards.
74
+
73
75
  </details>
74
76
 
75
77
  <details open>
76
78
  <summary>
77
79
 
78
80
  ### **The OriginTrail DKG Architecture**
81
+
79
82
  </summary>
80
83
 
81
84
  <br/>
82
85
 
83
- The OriginTrail tech stack is a three layer structure, consisting of the multi-chain consensus layer (OriginTrail layer 1, running on multiple blockchains), the Decentralized Knowledge Graph layer (OriginTrail Layer 2, hosted on the ODN) and Trusted Knowledge applications in the application layer.
86
+ The OriginTrail tech stack is a three layer structure, consisting of the multi-chain consensus layer (OriginTrail layer 1, running on multiple blockchains), the Decentralized Knowledge Graph layer (OriginTrail Layer 2, hosted on the ODN) and Trusted Knowledge applications in the application layer.
84
87
 
85
88
  <div align="center">
86
89
  <img src="images/dkg-architecture.png" alt="DKG Architecture" width="400">
@@ -88,13 +91,15 @@ The OriginTrail tech stack is a three layer structure, consisting of the multi-c
88
91
 
89
92
  Further, the architecture differentiates between **the public, replicated knowledge graph** shared by all network nodes according to the protocol, and **private Knowledge graphs** hosted separately by each of the OriginTrail nodes.
90
93
 
91
- **Anyone can run an OriginTrail node and become part of the ODN, contributing to the network capacity and hosting the OriginTrail DKG. The OriginTrail node is the ultimate data service for data and knowledge intensive Web3 applications and is used as the key backbone for trusted AI applications (see https://chatdkg.ai)**
94
+ **Anyone can run an OriginTrail node and become part of the ODN, contributing to the network capacity and hosting the OriginTrail DKG. The OriginTrail node is the ultimate data service for data and knowledge intensive Web3 applications and is used as the key backbone for trusted AI applications (see https://chatdkg.ai)**
95
+
92
96
  </details>
93
97
 
94
98
  <details open>
95
99
  <summary>
96
100
 
97
101
  ### **What is a Knowledge Asset?**
102
+
98
103
  </summary>
99
104
 
100
105
  <br/>
@@ -106,15 +111,16 @@ Further, the architecture differentiates between **the public, replicated knowle
106
111
  **Knowledge Asset is the new, AI‑ready resource for the Internet**
107
112
 
108
113
  Knowledge Assets are verifiable containers of structured knowledge that live on the OriginTrail DKG and provide:
114
+
109
115
  - **Discoverability - UAL is the new URL**. Uniform Asset Locators (UALs, based on the W3C Decentralized Identifiers) are a new Web3 knowledge identifier (extensions of the Uniform Resource Locators - URLs) which identify a specific piece of knowledge and make it easy to find and connect with other Knowledge Assets.
110
116
  - **Ownership - NFTs enable ownership**. Each Knowledge Asset contains an NFT token that enables ownership, knowledge asset administration and market mechanisms.
111
117
  - **Verifiability - On-chain information origin and verifiable trail**. The blockchain tech increases trust, security, transparency, and the traceability of information.
112
118
 
113
-
114
119
  By their nature, Knowledge Assets are semantic resources (following the W3C Semantic Web set of standards), and through their symbolic representations inherently AI ready. See more at https://chatdkg.ai
115
120
  <br/>
116
121
 
117
122
  **Discover Knowledge Assets with the DKG Explorer:**
123
+
118
124
  <div align="center">
119
125
  <table>
120
126
  <tr>
@@ -146,7 +152,6 @@ By their nature, Knowledge Assets are semantic resources (following the W3C Sema
146
152
  </table>
147
153
  </div>
148
154
 
149
-
150
155
  </details>
151
156
 
152
157
  <p align="right">(<a href="#readme-top">back to top</a>)</p>
@@ -154,40 +159,43 @@ By their nature, Knowledge Assets are semantic resources (following the W3C Sema
154
159
 
155
160
  ## 🚀 Getting Started
156
161
 
157
- ___
162
+ ---
158
163
 
159
164
  ### Prerequisites
160
165
 
161
- * python `>=3.10`
162
- * poetry `>=1.5.1`
163
-
166
+ - python `>=3.10`
167
+ - poetry `>=1.5.1`
164
168
 
165
169
  In order to use in the local environment, make sure to [run the local DKG network](https://github.com/OriginTrail/ot-node?tab=readme-ov-file#local-network-setup).
166
170
 
167
- ___
171
+ ---
172
+
168
173
  <br/>
169
174
 
170
175
  ### Installation
171
176
 
172
-
173
177
  Create virtual environment (you can choose any existing folder this command will create configurations and virtual env for python):
178
+
174
179
  ```bash
175
180
  python3 -m venv /path/to/folder
176
181
  ```
177
182
 
178
183
  Inside of previously generated folder you will find activate script in bin folder and run it:
184
+
179
185
  ```bash
180
186
  source /path/to/folder/bin/activate
181
187
  ```
182
188
 
183
- Install dependencies:
189
+ Install dependencies and configure pre-commit hooks:
190
+
184
191
  ```bash
185
- poetry install
192
+ make install
186
193
  ```
187
194
 
188
195
  Now you can run a demo example file (you need to have the local DKG network running):
196
+
189
197
  ```bash
190
- python3 examples/demo.py
198
+ make run-demo
191
199
  ```
192
200
 
193
201
  <br/>
@@ -228,7 +236,6 @@ Don't forget to give the project a star! Thanks again!
228
236
 
229
237
  - [web3.py](https://github.com/ethereum/web3.py): Basis for this project
230
238
 
231
-
232
239
  <br/>
233
240
  <p align="right">(<a href="#readme-top">back to top</a>)</p>
234
241
 
@@ -263,4 +270,4 @@ Don't forget to give the project a star! Thanks again!
263
270
  </a>
264
271
  </div>
265
272
 
266
- ___
273
+ ---