dkg 8.0.14__tar.gz → 8.1.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 (82) hide show
  1. {dkg-8.0.14 → dkg-8.1.0}/PKG-INFO +1 -1
  2. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/asset/asset.py +3 -11
  3. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/asset/async_asset.py +3 -13
  4. {dkg-8.0.14 → dkg-8.1.0}/pyproject.toml +1 -1
  5. {dkg-8.0.14 → dkg-8.1.0}/LICENSE +0 -0
  6. {dkg-8.0.14 → dkg-8.1.0}/NOTICE +0 -0
  7. {dkg-8.0.14 → dkg-8.1.0}/README.md +0 -0
  8. {dkg-8.0.14 → dkg-8.1.0}/dkg/__init__.py +0 -0
  9. {dkg-8.0.14 → dkg-8.1.0}/dkg/assertion.py +0 -0
  10. {dkg-8.0.14 → dkg-8.1.0}/dkg/clients/__init__.py +0 -0
  11. {dkg-8.0.14 → dkg-8.1.0}/dkg/clients/async_dkg.py +0 -0
  12. {dkg-8.0.14 → dkg-8.1.0}/dkg/clients/dkg.py +0 -0
  13. {dkg-8.0.14 → dkg-8.1.0}/dkg/constants.py +0 -0
  14. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/AskStorage.json +0 -0
  15. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/Chronos.json +0 -0
  16. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/Hub.json +0 -0
  17. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/IdentityStorage.json +0 -0
  18. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/KnowledgeCollection.json +0 -0
  19. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/KnowledgeCollectionStorage.json +0 -0
  20. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/Paranet.json +0 -0
  21. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/ParanetIncentivesPoolFactory.json +0 -0
  22. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/ParanetKnowledgeMinersRegistry.json +0 -0
  23. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/ParanetNeuroIncentivesPool.json +0 -0
  24. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/ParanetsRegistry.json +0 -0
  25. {dkg-8.0.14 → dkg-8.1.0}/dkg/data/interfaces/Token.json +0 -0
  26. {dkg-8.0.14 → dkg-8.1.0}/dkg/dataclasses.py +0 -0
  27. {dkg-8.0.14 → dkg-8.1.0}/dkg/exceptions.py +0 -0
  28. {dkg-8.0.14 → dkg-8.1.0}/dkg/managers/__init__.py +0 -0
  29. {dkg-8.0.14 → dkg-8.1.0}/dkg/managers/async_manager.py +0 -0
  30. {dkg-8.0.14 → dkg-8.1.0}/dkg/managers/manager.py +0 -0
  31. {dkg-8.0.14 → dkg-8.1.0}/dkg/method.py +0 -0
  32. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/__init__.py +0 -0
  33. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/asset/__init__.py +0 -0
  34. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/async_module.py +0 -0
  35. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/graph/__init__.py +0 -0
  36. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/graph/async_graph.py +0 -0
  37. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/graph/graph.py +0 -0
  38. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/module.py +0 -0
  39. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/network/__init__.py +0 -0
  40. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/network/network.py +0 -0
  41. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/node/__init__.py +0 -0
  42. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/node/async_node.py +0 -0
  43. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/node/node.py +0 -0
  44. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/paranet/__init__.py +0 -0
  45. {dkg-8.0.14 → dkg-8.1.0}/dkg/modules/paranet/paranet.py +0 -0
  46. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/__init__.py +0 -0
  47. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/blockchain/__init__.py +0 -0
  48. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/blockchain/async_blockchain.py +0 -0
  49. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/blockchain/base_blockchain.py +0 -0
  50. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/blockchain/blockchain.py +0 -0
  51. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/node/__init__.py +0 -0
  52. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/node/async_node_http.py +0 -0
  53. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/node/base_node_http.py +0 -0
  54. {dkg-8.0.14 → dkg-8.1.0}/dkg/providers/node/node_http.py +0 -0
  55. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/__init__.py +0 -0
  56. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/blockchain_services/__init__.py +0 -0
  57. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/blockchain_services/async_blockchain_service.py +0 -0
  58. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/blockchain_services/blockchain_service.py +0 -0
  59. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/input_service.py +0 -0
  60. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/node_services/__init__.py +0 -0
  61. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/node_services/async_node_service.py +0 -0
  62. {dkg-8.0.14 → dkg-8.1.0}/dkg/services/node_services/node_service.py +0 -0
  63. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/__init__.py +0 -0
  64. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/blockchain.py +0 -0
  65. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/dkg_node.py +0 -0
  66. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/encoding.py +0 -0
  67. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/evm.py +0 -0
  68. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/general.py +0 -0
  69. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/generics.py +0 -0
  70. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/network.py +0 -0
  71. {dkg-8.0.14 → dkg-8.1.0}/dkg/types/rdf.py +0 -0
  72. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/__init__.py +0 -0
  73. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/blockchain_request.py +0 -0
  74. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/decorators.py +0 -0
  75. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/knowledge_asset_tools.py +0 -0
  76. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/knowledge_collection_tools.py +0 -0
  77. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/merkle.py +0 -0
  78. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/metadata.py +0 -0
  79. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/node_request.py +0 -0
  80. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/rdf.py +0 -0
  81. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/string_transformations.py +0 -0
  82. {dkg-8.0.14 → dkg-8.1.0}/dkg/utils/ual.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dkg
3
- Version: 8.0.14
3
+ Version: 8.1.0
4
4
  Summary: Python library for interacting with the OriginTrail Decentralized Knowledge Graph
5
5
  License: Apache-2.0
6
6
  Author: Uladzislau Hubar
@@ -386,24 +386,16 @@ class KnowledgeAsset(Module):
386
386
  if token_amount:
387
387
  estimated_publishing_cost = token_amount
388
388
  else:
389
- time_until_next_epoch = self.blockchain_service.time_until_next_epoch()
390
- epoch_length = self.blockchain_service.epoch_length()
391
389
  stake_weighted_average_ask = (
392
390
  self.blockchain_service.get_stake_weighted_average_ask()
393
391
  )
394
392
 
395
393
  # Convert to integers and perform calculation
396
394
  estimated_publishing_cost = (
397
- (
398
- int(stake_weighted_average_ask)
399
- * (
400
- int(epochs_num) * int(1e18)
401
- + (int(time_until_next_epoch) * int(1e18)) // int(epoch_length)
402
- )
403
- * int(dataset_size)
404
- )
395
+ int(stake_weighted_average_ask)
396
+ * int(epochs_num)
397
+ * int(dataset_size)
405
398
  // 1024
406
- // int(1e18)
407
399
  )
408
400
 
409
401
  knowledge_collection_id = None
@@ -398,26 +398,16 @@ class AsyncKnowledgeAsset(AsyncModule):
398
398
  if token_amount:
399
399
  estimated_publishing_cost = token_amount
400
400
  else:
401
- time_until_next_epoch = (
402
- await self.blockchain_service.time_until_next_epoch()
403
- )
404
- epoch_length = await self.blockchain_service.epoch_length()
405
401
  stake_weighted_average_ask = (
406
402
  await self.blockchain_service.get_stake_weighted_average_ask()
407
403
  )
408
404
 
409
405
  # Convert to integers and perform calculation
410
406
  estimated_publishing_cost = (
411
- (
412
- int(stake_weighted_average_ask)
413
- * (
414
- int(epochs_num) * int(1e18)
415
- + (int(time_until_next_epoch) * int(1e18)) // int(epoch_length)
416
- )
417
- * int(dataset_size)
418
- )
407
+ int(stake_weighted_average_ask)
408
+ * int(epochs_num)
409
+ * int(dataset_size)
419
410
  // 1024
420
- // int(1e18)
421
411
  )
422
412
 
423
413
  knowledge_collection_id = None
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dkg"
3
- version = "8.0.14"
3
+ version = "8.1.0"
4
4
  description = "Python library for interacting with the OriginTrail Decentralized Knowledge Graph"
5
5
  authors = ["Uladzislau Hubar <hubar.uladzislau@gmail.com>, Zvonimir Sculac <zvonimir.sculac@origin-trail.com>"]
6
6
  license = "Apache-2.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes