dkg 0.1.0b1__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 (62) hide show
  1. dkg-0.1.0b1/LICENSE +202 -0
  2. dkg-0.1.0b1/PKG-INFO +453 -0
  3. dkg-0.1.0b1/README.md +431 -0
  4. dkg-0.1.0b1/dkg/__init__.py +3 -0
  5. dkg-0.1.0b1/dkg/asset.py +781 -0
  6. dkg-0.1.0b1/dkg/constants.py +39 -0
  7. dkg-0.1.0b1/dkg/data/interfaces/Assertion.json +131 -0
  8. dkg-0.1.0b1/dkg/data/interfaces/AssertionStorage.json +229 -0
  9. dkg-0.1.0b1/dkg/data/interfaces/CommitManagerV1.json +534 -0
  10. dkg-0.1.0b1/dkg/data/interfaces/CommitManagerV1U1.json +720 -0
  11. dkg-0.1.0b1/dkg/data/interfaces/ContentAsset.json +671 -0
  12. dkg-0.1.0b1/dkg/data/interfaces/ContentAssetStorage.json +706 -0
  13. dkg-0.1.0b1/dkg/data/interfaces/HashingProxy.json +227 -0
  14. dkg-0.1.0b1/dkg/data/interfaces/Hub.json +356 -0
  15. dkg-0.1.0b1/dkg/data/interfaces/Identity.json +193 -0
  16. dkg-0.1.0b1/dkg/data/interfaces/IdentityStorage.json +342 -0
  17. dkg-0.1.0b1/dkg/data/interfaces/ParametersStorage.json +468 -0
  18. dkg-0.1.0b1/dkg/data/interfaces/Profile.json +292 -0
  19. dkg-0.1.0b1/dkg/data/interfaces/ProfileStorage.json +596 -0
  20. dkg-0.1.0b1/dkg/data/interfaces/ProofManagerV1.json +525 -0
  21. dkg-0.1.0b1/dkg/data/interfaces/ProofManagerV1U1.json +546 -0
  22. dkg-0.1.0b1/dkg/data/interfaces/ScoringProxy.json +242 -0
  23. dkg-0.1.0b1/dkg/data/interfaces/ServiceAgreementStorageProxy.json +1299 -0
  24. dkg-0.1.0b1/dkg/data/interfaces/ServiceAgreementStorageV1.json +901 -0
  25. dkg-0.1.0b1/dkg/data/interfaces/ServiceAgreementStorageV1U1.json +1097 -0
  26. dkg-0.1.0b1/dkg/data/interfaces/ServiceAgreementV1.json +741 -0
  27. dkg-0.1.0b1/dkg/data/interfaces/ShardingTable.json +268 -0
  28. dkg-0.1.0b1/dkg/data/interfaces/ShardingTableStorage.json +317 -0
  29. dkg-0.1.0b1/dkg/data/interfaces/Staking.json +456 -0
  30. dkg-0.1.0b1/dkg/data/interfaces/StakingStorage.json +407 -0
  31. dkg-0.1.0b1/dkg/data/interfaces/Token.json +544 -0
  32. dkg-0.1.0b1/dkg/data/interfaces/UnfinalizedStateStorage.json +171 -0
  33. dkg-0.1.0b1/dkg/data/interfaces/WhitelistStorage.json +124 -0
  34. dkg-0.1.0b1/dkg/dataclasses.py +45 -0
  35. dkg-0.1.0b1/dkg/exceptions.py +161 -0
  36. dkg-0.1.0b1/dkg/graph.py +63 -0
  37. dkg-0.1.0b1/dkg/main.py +74 -0
  38. dkg-0.1.0b1/dkg/manager.py +64 -0
  39. dkg-0.1.0b1/dkg/method.py +131 -0
  40. dkg-0.1.0b1/dkg/module.py +63 -0
  41. dkg-0.1.0b1/dkg/node.py +54 -0
  42. dkg-0.1.0b1/dkg/providers/__init__.py +2 -0
  43. dkg-0.1.0b1/dkg/providers/blockchain.py +181 -0
  44. dkg-0.1.0b1/dkg/providers/node_http.py +62 -0
  45. dkg-0.1.0b1/dkg/types/__init__.py +8 -0
  46. dkg-0.1.0b1/dkg/types/blockchain.py +58 -0
  47. dkg-0.1.0b1/dkg/types/dkg_node.py +20 -0
  48. dkg-0.1.0b1/dkg/types/encoding.py +22 -0
  49. dkg-0.1.0b1/dkg/types/evm.py +25 -0
  50. dkg-0.1.0b1/dkg/types/generics.py +21 -0
  51. dkg-0.1.0b1/dkg/types/network.py +20 -0
  52. dkg-0.1.0b1/dkg/types/rdf.py +21 -0
  53. dkg-0.1.0b1/dkg/utils/__init__.py +0 -0
  54. dkg-0.1.0b1/dkg/utils/blockchain_request.py +159 -0
  55. dkg-0.1.0b1/dkg/utils/decorators.py +46 -0
  56. dkg-0.1.0b1/dkg/utils/merkle.py +173 -0
  57. dkg-0.1.0b1/dkg/utils/metadata.py +50 -0
  58. dkg-0.1.0b1/dkg/utils/node_request.py +197 -0
  59. dkg-0.1.0b1/dkg/utils/rdf.py +51 -0
  60. dkg-0.1.0b1/dkg/utils/string_transformations.py +22 -0
  61. dkg-0.1.0b1/dkg/utils/ual.py +41 -0
  62. dkg-0.1.0b1/pyproject.toml +29 -0
dkg-0.1.0b1/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2023 Uladzislau Hubar <hubar.uladzislau@gmail.com>
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
dkg-0.1.0b1/PKG-INFO ADDED
@@ -0,0 +1,453 @@
1
+ Metadata-Version: 2.1
2
+ Name: dkg
3
+ Version: 0.1.0b1
4
+ Summary: Python library for interacting with the OriginTrail Decentralized Knowledge Graph
5
+ License: Apache-2.0
6
+ Author: Uladzislau Hubar
7
+ Author-email: hubar.uladzislau@gmail.com
8
+ Requires-Python: >=3.11,<4.0
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Requires-Dist: eth-abi (>=4.0.0,<5.0.0)
13
+ Requires-Dist: eth-account (>=0.8.0,<0.9.0)
14
+ Requires-Dist: hexbytes (>=0.3.0,<0.4.0)
15
+ Requires-Dist: ot-pyld (>=2.1.1,<3.0.0)
16
+ Requires-Dist: pandas (>=1.5.3,<2.0.0)
17
+ Requires-Dist: pyyaml (>=6.0,<7.0)
18
+ Requires-Dist: rdflib (>=6.3.2,<7.0.0)
19
+ Requires-Dist: web3 (>=6.0.0,<7.0.0)
20
+ Description-Content-Type: text/markdown
21
+
22
+ <a name="readme-top"></a>
23
+
24
+ ___
25
+
26
+ <br />
27
+ <div align="center">
28
+ <a href="https://github.com/OriginTrail/dkg.py">
29
+ <img src="images/banner.svg" alt="Python SDK Banner">
30
+ </a>
31
+
32
+ <h3 align="center"><b>dkg.py</b></h3>
33
+
34
+ <p align="center">
35
+ Python SDK for interacting with the OriginTrail Decentralized Knowledge Graph
36
+ </br>
37
+ <a href="https://docs.origintrail.io/">OriginTrail Docs</a>
38
+ ·
39
+ <a href="https://github.com/OriginTrail/dkg.py/examples/demo.py">View Demo</a>
40
+ ·
41
+ <a href="https://github.com/OriginTrail/dkg.py/issues">Report Bug</a>
42
+ ·
43
+ <a href="https://github.com/OriginTrail/dkg.py/issues">Request Feature</a>
44
+ </p>
45
+ </div>
46
+
47
+ </br>
48
+
49
+ > **Disclaimer: Beta Version**
50
+ >
51
+ > Welcome to the beta version of our client! This software is currently in the beta testing phase, which means it is not the final release version. As a beta version, it may still contain bugs, undergo frequent updates, and have limited features.
52
+ Important Points to Note:
53
+
54
+ > **Use at Your Own Risk:** While we have made efforts to ensure the stability and reliability of the beta version, there is a possibility of encountering unexpected issues. Please use this software at your own risk.
55
+
56
+ > **Limited Support:** As this is a beta release, our support resources may be focused on addressing critical bugs and gathering feedback from users. Therefore, support for beta versions may be limited compared to our stable releases.
57
+
58
+ > **Feedback Appreciated:** Your feedback is invaluable to us. If you encounter any issues, have suggestions, or want to share your experiences with the beta version, please let us know. Your feedback will help us improve the software for the final release.
59
+
60
+ > **Not for Production Use:** The beta version is intended for testing and evaluation purposes only. It is not recommended for use in a production environment where stability and reliability are crucial.
61
+
62
+ </br>
63
+
64
+ <details open>
65
+ <summary>
66
+ <b>Table of Contents</b>
67
+ </summary>
68
+ <ol>
69
+ <li>
70
+ <a href="#📚-about-the-project">📚 About The Project</a>
71
+ <ul>
72
+ <li><a href="#what-is-a-decentralized-knowledge-graph">What is a Decentralized Knowledge Graph?</a></li>
73
+ <li><a href="#the-origintrail-dkg-architecture">The OriginTrail DKG Architecture</a></li>
74
+ <li><a href="#what-is-a-knowledge-asset">What is a Knowledge Asset?</a></li>
75
+ </ul>
76
+ </li>
77
+ <li>
78
+ <a href="#🚀-getting-started">🚀 Getting Started</a>
79
+ <ul>
80
+ <li><a href="#prerequisites">Prerequisites</a></li>
81
+ <li><a href="#installation">Installation</a></li>
82
+ </ul>
83
+ </li>
84
+ <li>
85
+ <a href="#📜-roadmap">📜 Roadmap</a>
86
+ <ul>
87
+ <li><a href="#1️⃣-pre-development-phase">1️⃣ Pre-development Phase</a></li>
88
+ <li><a href="#2️⃣-development-phase">2️⃣ Development Phase</a></li>
89
+ <li><a href="#3️⃣-documentation-phase">3️⃣ Documentation Phase</a></li>
90
+ <li><a href="#4️⃣-pre-release-phase">4️⃣ Pre-release Phase</a></li>
91
+ <li><a href="#5️⃣-release">5️⃣ Release</a></li>
92
+ <li><a href="#6️⃣-post-release">6️⃣ Post-release</a></li>
93
+ </ul>
94
+ </li>
95
+ <li><a href="#📄-license">📄 License</a></li>
96
+ <li><a href="#🤝-contributing">🤝 Contributing</a></li>
97
+ <li><a href="#❤️-thanks-to-all-contributors">❤️ Contributors</a></li>
98
+ <li><a href="#🌟-acknowledgements">🌟 Acknowledgements</a></li>
99
+ <li><a href="#📰-social-media">📰 Social Media</a></li>
100
+ </ol>
101
+ </details>
102
+
103
+ ___
104
+
105
+ <br/>
106
+
107
+ ## 📚 About The Project
108
+
109
+ <details open>
110
+ <summary>
111
+
112
+ ### <b>What is a Decentralized Knowledge Graph?</b>
113
+ </summary>
114
+
115
+ <br/>
116
+
117
+ <div align="center">
118
+ <img src="images/nodes.png" alt="Knowledge Asset" width="200">
119
+ </div>
120
+
121
+ There are many available definitions of a knowledge graph, therefore we will present a simplified one focused on usability, rather than completeness. The purpose of this introduction is not to be a comprehensive guide for knowledge graphs, however it aims to get you started with the basics.
122
+
123
+ A **Knowledge Graph (KG)** is a complex structure that maps the connections and relationships among various entities - be they physical, digital, event-based, or conceptual. Commonly represented as semantic networks, these graphs are leveraged by major corporations such as [Amazon](http://lunadong.com/talks/PG.pdf), [Google](https://en.wikipedia.org/wiki/Google_Knowledge_Graph), [Uber](https://www.youtube.com/watch?v=r3yMSl5NB_Q), and [IBM](https://www.ibm.com/cloud/learn/knowledge-graph) for a wide array of applications, including search, data integration, knowledge reasoning, recommendation engines, analytics, and diverse facets of machine learning and artificial intelligence.
124
+
125
+ Key characteristics of knowledge graphs include:
126
+
127
+ - Prioritization of data connections, treating them as "first-class citizens" within the realm of linked data.
128
+ - Designed to accommodate data from diverse sources, supporting a variety of formats.
129
+ - Their data models are flexible and easily extendable, ready to adapt to the evolving nature of data and its relationships.
130
+
131
+ While knowledge graphs are typically deployed within the boundaries of a single organization to capture knowledge from various internal and external sources, we conceptualize them more broadly. We define the **Decentralized Knowledge Graph (DKG)** as a global, open data structure comprised of interlinked knowledge assets, benefiting both organizations and individuals.
132
+
133
+ Unique attributes of the DKG are:
134
+
135
+ - Empowerment of decentralized applications (Dapps) with search, integration, analytics, AI, and ML capabilities across a wide range of data sources, including blockchains, IPFS, enterprise systems, web services, and personal devices.
136
+ - Elimination of the need for a central authority by leveraging decentralized infrastructure.
137
+ - Facilitation of permissionless operations within the public network.
138
+ - Utilization of decentralized identity and Verifiable Credentials for access control, enabling references to private data.
139
+
140
+ This expansive approach enhances accessibility and flexibility, positioning the DKG as a powerful tool in the evolving digital landscape.
141
+ </details>
142
+
143
+ <details open>
144
+ <summary>
145
+
146
+ ### <b>The OriginTrail DKG Architecture</b>
147
+ </summary>
148
+
149
+ <br/>
150
+
151
+ The OriginTrail tech stack is tailored to enable the discoverability, verifiability, and connectivity of physical and digital assets in a coherent Web3 data ecosystem. It meets two fundamental requirements for such an infrastructure:
152
+
153
+ - Ensuring trust via decentralized consensus.
154
+ - Utilizing semantic, verifiable asset data to represent complex real-world relationships and characteristics.
155
+
156
+ OriginTrail achieves this by incorporating two distinct types of technology into two network layers - Blockchains (trust networks) and Knowledge Graphs (semantic data networks).
157
+
158
+ <div align="center">
159
+ <img src="images/dkg-architecture1.png" alt="DKG Architecture" width="400">
160
+ </div>
161
+
162
+ **The DKG layer (Layer 2) consists of multiple sub-layers:**
163
+
164
+ - **Consensus layer**: Implements interfaces to several blockchains hosting trusted smart contracts used to manage relations between the nodes and implement trustless protocols.
165
+ - **Network layer**: A peer-to-peer swarm of DKG nodes hosted by individuals and organizations.
166
+ - **Data layer**: Hosting the knowledge graph data, distributed across the network in separate instances of graph databases.
167
+ - **Service layer**: Implements various core & extended services like authentication, standard interfaces, and data pipelines.
168
+ - **Application layer**: Includes Dapps and traditional applications that utilize the OriginTrail DKG as part of their data flows.
169
+
170
+ <div align="center">
171
+ <img src="images/dkg-architecture2.png" alt="DKG Architecture" width="400">
172
+ </div>
173
+
174
+ Further, the architecture differentiates between **the public, replicated knowledge graph** shared by all network nodes according to the protocol, and **private graphs** hosted separately by each of the networked nodes.
175
+
176
+ **The OriginTrail DKG** - combining blockchain and knowledge graph technologies - forms the backbone of the new, trusted Web3 data ecosystem. If you're a developer, you can use it to create, maintain, and use Knowledge Assets across Web3 applications, implementing standardized technologies like GS1 EPCIS, RDF/SPARQL, JSON-LD, and other W3C and GS1 standards right out of the box.
177
+ </details>
178
+
179
+ <details open>
180
+ <summary>
181
+
182
+ ### <b>What is a Knowledge Asset?</b>
183
+ </summary>
184
+
185
+ <br/>
186
+
187
+ <div align="center">
188
+ <img src="images/ka.png" alt="Knowledge Asset" width="200">
189
+ </div>
190
+
191
+ **Knowledge Asset is the new, AI‑ready resource for the Internet**
192
+
193
+ Knowledge Assets are verifiable containers of structured knowledge that live on the OriginTrail DKG and provide:
194
+ - **Discoverability - UAL is the new URL**. Consider Uniform Asset Locators (UALs) a kind of URL that identify a piece of knowledge and make it easy to find and connect with other Knowledge Assets.
195
+ - **Ownership - NFTs enable ownership**. Each Knowledge Asset is created with an NFT token that enables trusted ownership and verifiability of your knowledge.
196
+ - **Verifiability - On-chain information trail**. The blockchain tech increases trust, security, transparency, and the traceability of information.
197
+
198
+ <br/>
199
+
200
+ **Discover Knowledge Assets with the DKG Explorer:**
201
+ <div align="center">
202
+ <table>
203
+ <tr>
204
+ <td align="center">
205
+ <a href="https://dkg.origintrail.io/explore?ual=did:dkg:otp/0x5cac41237127f94c2d21dae0b14bfefa99880630/309100">
206
+ <img src="images/knowledge-assets-graph1.svg" width="300" alt="Knowledge Assets Graph 1">
207
+ </a>
208
+ <br><b>Supply Chains</b>
209
+ </td>
210
+ <td align="center">
211
+ <a href="https://dkg.origintrail.io/explore?ual=did:dkg:otp/0x5cac41237127f94c2d21dae0b14bfefa99880630/309285">
212
+ <img src="images/knowledge-assets-graph2.svg" width="300" alt="Knowledge Assets Graph 2">
213
+ </a>
214
+ <br><b>Construction</b>
215
+ </td>
216
+ <td align="center">
217
+ <a href="https://dkg.origintrail.io/explore?ual=did:dkg:otp/0x5cac41237127f94c2d21dae0b14bfefa99880630/309222">
218
+ <img src="images/knowledge-assets-graph3.svg" width="300" alt="Knowledge Assets Graph 3">
219
+ </a>
220
+ <br><b>Life sciences and healthcare</b>
221
+ </td>
222
+ <td align="center">
223
+ <a href="https://dkg.origintrail.io/explore?ual=did:dkg:otp/0x5cac41237127f94c2d21dae0b14bfefa99880630/308028">
224
+ <img src="images/knowledge-assets-graph4.svg" width="300" alt="Knowledge Assets Graph 3">
225
+ </a>
226
+ <br><b>Metaverse</b>
227
+ </td>
228
+ </tr>
229
+ </table>
230
+ </div>
231
+
232
+
233
+ </details>
234
+
235
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
236
+ <br/>
237
+
238
+ ## 🚀 Getting Started
239
+
240
+ ___
241
+
242
+ ### Prerequisites
243
+
244
+ * python `>=3.11`
245
+ * poetry `>=1.5.1`
246
+
247
+ ___
248
+ <br/>
249
+
250
+ ### Installation
251
+
252
+
253
+ Create virtual environment (you can choose any existing folder this command will create configurations and virtual env for python):
254
+ ```bash
255
+ python3 -m venv /path/to/folder
256
+ ```
257
+
258
+ Inside of previously generated folder you will find activate script in bin folder and run it:
259
+ ```bash
260
+ source /path/to/folder/bin/activate
261
+ ```
262
+
263
+ Install dependencies:
264
+ ```bash
265
+ poetry install
266
+ ```
267
+
268
+ Now you can run a demo example file:
269
+ ```bash
270
+ python3 examples/demo.py
271
+ ```
272
+
273
+ <br/>
274
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
275
+
276
+ ## 📜 Roadmap
277
+
278
+ This roadmap outlines the goals for the first major release of the `dkg.py`. Each section represents a stage in the development process and the features we plan to implement.
279
+
280
+ <details open>
281
+ <summary>
282
+
283
+ ### 1️⃣ Pre-development Phase
284
+
285
+ </summary>
286
+
287
+ - [x] **Requirement Analysis and Planning**
288
+ - [x] Define the project's scope
289
+ - [x] Identify the core functionalities
290
+
291
+ - [x] **Design**
292
+ - [x] Plan the library's architecture
293
+ - [x] Establish coding standards
294
+
295
+ - [ ] **Setup Development Environment**
296
+ - [x] Setup development, testing and production environments
297
+ - [ ] Add pytest config
298
+ - [ ] Add mypy config
299
+ - [ ] Add tox config ?
300
+ - [ ] Setup Continuous Integration (CI) and Continuous Deployment (CD) pipeline
301
+ </details>
302
+
303
+ <details open>
304
+ <summary>
305
+
306
+ ### 2️⃣ Development Phase
307
+ </summary>
308
+
309
+ | Feature | Status | Tests coverage |
310
+ |:-:|:-:|:-:|
311
+ | Create | 🟩 Completed | ❌ |
312
+ | Transfer | 🟩 Completed | ❌ |
313
+ | Update | 🟩 Completed | ❌ |
314
+ | Wait for finalization | 🟥 Not Started | ❌ |
315
+ | Cancel update | 🟩 Completed | ❌ |
316
+ | Burn | 🟩 Completed | ❌ |
317
+ | Get | 🟩 Completed | ❌ |
318
+ | Query | 🟩 Completed | ❌ |
319
+ | Extend storing period | 🟩 Completed | ❌ |
320
+ | Add tokens | 🟩 Completed | ❌ |
321
+ | Add update tokens | 🟩 Completed | ❌ |
322
+ | Get owner | 🟩 Completed | ❌ |
323
+ | Experimental | 🟥 Not Started | ❌ |
324
+ </details>
325
+
326
+ <details open>
327
+ <summary>
328
+
329
+ ### 3️⃣ Documentation Phase
330
+ </summary>
331
+
332
+ - [ ] Write comprehensive documentation
333
+ - [x] Provide examples and use-cases
334
+ - [ ] Review and finalize documentation
335
+ </details>
336
+
337
+ <details open>
338
+ <summary>
339
+
340
+ ### 4️⃣ Pre-release Phase
341
+ </summary>
342
+
343
+ - [ ] **Beta Release**
344
+ - [X] Release a beta version for testing
345
+ - [ ] Gather and address feedback
346
+
347
+ - **Bug Fixes**
348
+ - Identify and fix bugs
349
+
350
+ - [ ] **Final Testing and QA**
351
+ - [ ] Perform comprehensive testing
352
+ - [ ] Ensure the library meets quality standards
353
+ </details>
354
+
355
+ <details open>
356
+ <summary>
357
+
358
+ ### 5️⃣ Release
359
+ </summary>
360
+
361
+ - [ ] Merge the first version into the main branch
362
+ - [ ] Release the v1.0.0 of the `dkg.py` library
363
+ </details>
364
+
365
+ <details open>
366
+ <summary>
367
+
368
+ ### 6️⃣ Post-release
369
+ </summary>
370
+
371
+ - Monitor for any issues
372
+ - Plan for next versions based on user feedback and usage
373
+ </details>
374
+
375
+ <br/>
376
+
377
+ **Note:** This roadmap is subject to changes. Each step will be accompanied by appropriate documentation, testing and code review to maintain the quality of the library.
378
+
379
+ <br/>
380
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
381
+
382
+ ## 📄 License
383
+
384
+ Distributed under the Apache-2.0 License. See `LICENSE` file for more information.
385
+
386
+ <br/>
387
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
388
+
389
+ ## 🤝 Contributing
390
+
391
+ Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
392
+
393
+ If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
394
+ Don't forget to give the project a star! Thanks again!
395
+
396
+ 1. Fork the Project
397
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
398
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
399
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
400
+ 5. Open a Pull Request
401
+
402
+ <br/>
403
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
404
+
405
+ ## ❤️ Thanks to all Contributors!
406
+
407
+ <!-- readme: <u.hubar>,collaborators,<mucke12>,contributors/- -start -->
408
+ <!-- readme: <u.hubar>,collaborators,<mucke12>,contributors/- -end -->
409
+
410
+ <br/>
411
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
412
+
413
+ ## 🌟 Acknowledgements
414
+
415
+ - [web3.py](https://github.com/ethereum/web3.py): Basis for this project
416
+
417
+
418
+ <br/>
419
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
420
+
421
+ ## 📰 Social Media
422
+
423
+ <br/>
424
+
425
+ <div align="center">
426
+ <a href="https://medium.com/origintrail">
427
+ <img src="images/icons/medium.svg" alt="Medium Badge" width="30" style="margin-right: 10px"/>
428
+ </a>
429
+ <a href="https://t.me/origintrail">
430
+ <img src="images/icons/telegram.svg" alt="Telegram Badge" width="30" style="margin-right: 10px"/>
431
+ </a>
432
+ <a href="https://x.com/origin_trail">
433
+ <img src="images/icons/x.svg" alt="X Badge" width="30" style="margin-right: 10px"/>
434
+ </a>
435
+ <a href="https://www.youtube.com/c/origintrail">
436
+ <img src="images/icons/youtube.svg" alt="YouTube Badge" width="30" style="margin-right: 10px"/>
437
+ </a>
438
+ <a href="https://www.linkedin.com/company/origintrail/">
439
+ <img src="images/icons/linkedin.svg" alt="LinkedIn Badge" width="30" style="margin-right: 10px"/>
440
+ </a>
441
+ <a href="https://discord.gg/cCRPzzmnNT">
442
+ <img src="images/icons/discord.svg" alt="Discord Badge" width="30" style="margin-right: 10px"/>
443
+ </a>
444
+ <a href="https://www.reddit.com/r/OriginTrail/">
445
+ <img src="images/icons/reddit.svg" alt="Reddit Badge" width="30" style="margin-right: 10px"/>
446
+ </a>
447
+ <a href="https://coinmarketcap.com/currencies/origintrail/">
448
+ <img src="images/icons/coinmarketcap.svg" alt="Coinmarketcap Badge" width="30" style="margin-right: 10px"/>
449
+ </a>
450
+ </div>
451
+
452
+ ___
453
+