naeural-client 2.5.26__py3-none-any.whl → 2.5.28__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
naeural_client/_ver.py CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "2.5.26"
1
+ __VER__ = "2.5.28"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
@@ -751,7 +751,7 @@ class GenericSession(BaseDecentrAIObject):
751
751
  """
752
752
  raise NotImplementedError
753
753
 
754
- def close(self, close_pipelines=False, wait_close=False, **kwargs):
754
+ def close(self, close_pipelines=False, wait_close=True, **kwargs):
755
755
  """
756
756
  Close the session, releasing all resources and closing all threads
757
757
  Resources are released in the main loop thread, so this method will block until the main loop thread exits.
@@ -762,7 +762,7 @@ class GenericSession(BaseDecentrAIObject):
762
762
  close_pipelines : bool, optional
763
763
  close all the pipelines created by or attached to this session (basically calling `.close_own_pipelines()` for you), by default False
764
764
  wait_close : bool, optional
765
- If `True`, will wait for the main loop thread to exit. Defaults to `False`
765
+ If `True`, will wait for the main loop thread to exit. Defaults to `True`
766
766
  """
767
767
 
768
768
  if close_pipelines:
naeural_client/bc/ec.py CHANGED
@@ -766,6 +766,7 @@ class BaseBCEllipticCurveEngine(BaseBlockEngine):
766
766
  "signature": signed_message.signature.hex(),
767
767
  "signed_message": signed_message_hash.hex(),
768
768
  "sender" : self.eth_address,
769
+ "eth_signed_data" : types,
769
770
  }
770
771
 
771
772
  def eth_sign_text(self, message, signature_only=True):
@@ -794,14 +795,21 @@ class BaseBCEllipticCurveEngine(BaseBlockEngine):
794
795
 
795
796
 
796
797
 
797
- def eth_sign_node_epochs(self, node, epochs, epochs_vals, signature_only=True):
798
+ def eth_sign_node_epochs(
799
+ self,
800
+ node,
801
+ epochs,
802
+ epochs_vals,
803
+ signature_only=True,
804
+ use_evm_node_addr=True
805
+ ):
798
806
  """
799
807
  Signs the node availability
800
808
 
801
809
  Parameters
802
810
  ----------
803
811
  node : str
804
- The node address.
812
+ The node address to sign. Either the node address or the Ethereum address based on `use_evm_node_addr`.
805
813
 
806
814
  epochs : list of int
807
815
  The epochs to sign.
@@ -811,13 +819,19 @@ class BaseBCEllipticCurveEngine(BaseBlockEngine):
811
819
 
812
820
  signature_only : bool, optional
813
821
  Whether to return only the signature. The default is True.
822
+
823
+ use_evm_node_addr : bool, optional
824
+ Whether to use the Ethereum address of the node. The default is True.
814
825
 
815
826
  Returns
816
827
  -------
817
828
  str
818
829
  The signature of the message.
819
830
  """
820
- types = ["string", "uint256[]", "uint256[]"]
831
+ if use_evm_node_addr:
832
+ types = ["address", "uint256[]", "uint256[]"]
833
+ else:
834
+ types = ["string", "uint256[]", "uint256[]"]
821
835
  values = [node, epochs, epochs_vals]
822
836
  result = self.eth_sign_message(types, values)
823
837
  if signature_only:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naeural_client
3
- Version: 2.5.26
3
+ Version: 2.5.28
4
4
  Summary: `naeural_client` is the Python SDK required for client app development for the Naeural Edge Protocol Edge Protocol framework
5
5
  Project-URL: Homepage, https://github.com/NaeuralEdgeProtocol/naeural_client
6
6
  Project-URL: Bug Tracker, https://github.com/NaeuralEdgeProtocol/naeural_client/issues
@@ -1,10 +1,10 @@
1
1
  naeural_client/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- naeural_client/_ver.py,sha256=8hHk58mquJxWggJKicLlNUEf81FcB_OM-4VuQOLyG8E,331
2
+ naeural_client/_ver.py,sha256=WowAQLrKuMB_ys3x8LQ8iAqPPUK2E9Jjbf6c1oavd4o,331
3
3
  naeural_client/base_decentra_object.py,sha256=C4iwZTkhKNBS4VHlJs5DfElRYLo4Q9l1V1DNVSk1fyQ,4412
4
4
  naeural_client/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
5
5
  naeural_client/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
6
6
  naeural_client/base/distributed_custom_code_presets.py,sha256=cvz5R88P6Z5V61Ce1vHVVh8bOkgXd6gve_vdESDNAsg,2544
7
- naeural_client/base/generic_session.py,sha256=TAfLadFrvSO_IPsrY4vRm8qLHtDNzW0Nq7pux32Wch4,91555
7
+ naeural_client/base/generic_session.py,sha256=CrG66_XsMtnM4VrMNeLNlZv6UDJUf9J9pODvqpPTBek,91553
8
8
  naeural_client/base/instance.py,sha256=kcZJmjLBtx8Bjj_ysIOx1JmLA-qSpG7E28j5rq6IYus,20444
9
9
  naeural_client/base/pipeline.py,sha256=b4uNHrEIOlAtw4PGUx20dxwBhDck5__SrVXaHcSi8ZA,58251
10
10
  naeural_client/base/plugin_template.py,sha256=qGaXByd_JZFpjvH9GXNbT7KaitRxIJB6-1IhbKrZjq4,138123
@@ -16,7 +16,7 @@ naeural_client/base/payload/payload.py,sha256=x-au7l67Z_vfn_4R2C_pjZCaFuUVXHngJi
16
16
  naeural_client/bc/__init__.py,sha256=FQj23D1PrY06NUOARiKQi4cdj0-VxnoYgYDEht8lpr8,158
17
17
  naeural_client/bc/base.py,sha256=Nd0THGidmlLZOD8k8vwldQqIZ_LnvMgAE6l5U5OA45E,32286
18
18
  naeural_client/bc/chain.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- naeural_client/bc/ec.py,sha256=mWjodWCRgC3omVXOA9jtNdtPVNn2kMKV3Dcjt9oFUCQ,22974
19
+ naeural_client/bc/ec.py,sha256=qI8l7YqiS4MNftlx-tF7IZUswrSeQc7KMn5OZ0fEaJs,23370
20
20
  naeural_client/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  naeural_client/certs/r9092118.ala.eu-central-1.emqxsl.com.crt,sha256=y-6io0tseyx9-a4Pmde1z1gPULtJNSYUpG_YFkYaMKU,1337
22
22
  naeural_client/cli/README.md,sha256=WPdI_EjzAbUW1aPyj1sSR8rLydcJKZtoiaEtklQrjHo,74
@@ -81,8 +81,8 @@ naeural_client/utils/__init__.py,sha256=mAnke3-MeRzz3nhQvhuHqLnpaaCSmDxicd7Ck9uw
81
81
  naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,1072
82
82
  naeural_client/utils/config.py,sha256=JfW2gMQMYx9NzF2M4mJpioXawDHcOQ3deJprpCRtdOI,5874
83
83
  naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
84
- naeural_client-2.5.26.dist-info/METADATA,sha256=_KG-9kNCy1R0hjdpfHNBG2PnnSh6i73ICp3N-Pz-hvQ,14619
85
- naeural_client-2.5.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
- naeural_client-2.5.26.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
87
- naeural_client-2.5.26.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
88
- naeural_client-2.5.26.dist-info/RECORD,,
84
+ naeural_client-2.5.28.dist-info/METADATA,sha256=SsdpD3nkjR9WKPjweP2ZYgwTMfdmbrjpAHFItTtkxPE,14619
85
+ naeural_client-2.5.28.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
+ naeural_client-2.5.28.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
87
+ naeural_client-2.5.28.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
88
+ naeural_client-2.5.28.dist-info/RECORD,,