naeural-client 2.6.25__py3-none-any.whl → 2.6.26__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.
- naeural_client/_ver.py +1 -1
- naeural_client/bc/base.py +46 -0
- naeural_client/utils/oracle_sync/multiple_requests.py +5 -0
- {naeural_client-2.6.25.dist-info → naeural_client-2.6.26.dist-info}/METADATA +1 -1
- {naeural_client-2.6.25.dist-info → naeural_client-2.6.26.dist-info}/RECORD +8 -8
- {naeural_client-2.6.25.dist-info → naeural_client-2.6.26.dist-info}/WHEEL +0 -0
- {naeural_client-2.6.25.dist-info → naeural_client-2.6.26.dist-info}/entry_points.txt +0 -0
- {naeural_client-2.6.25.dist-info → naeural_client-2.6.26.dist-info}/licenses/LICENSE +0 -0
naeural_client/_ver.py
CHANGED
naeural_client/bc/base.py
CHANGED
@@ -1253,6 +1253,52 @@ class BaseBlockEngine:
|
|
1253
1253
|
def eth_account(self):
|
1254
1254
|
return self.__eth_account
|
1255
1255
|
|
1256
|
+
@staticmethod
|
1257
|
+
def is_valid_evm_address(address: str) -> bool:
|
1258
|
+
"""
|
1259
|
+
Check if the input string is a valid Ethereum (EVM) address using basic heuristics.
|
1260
|
+
|
1261
|
+
Parameters
|
1262
|
+
----------
|
1263
|
+
address : str
|
1264
|
+
The address string to verify.
|
1265
|
+
|
1266
|
+
Returns
|
1267
|
+
-------
|
1268
|
+
bool
|
1269
|
+
True if `address` meets the basic criteria for an EVM address, False otherwise.
|
1270
|
+
"""
|
1271
|
+
# Basic checks:
|
1272
|
+
# A) Must start with '0x'
|
1273
|
+
# B) Must be exactly 42 characters in total
|
1274
|
+
# C) All remaining characters must be valid hexadecimal digits
|
1275
|
+
if not address.startswith("0x"):
|
1276
|
+
return False
|
1277
|
+
if len(address) != 42:
|
1278
|
+
return False
|
1279
|
+
|
1280
|
+
hex_part = address[2:]
|
1281
|
+
# Ensure all characters in the hex part are valid hex digits
|
1282
|
+
return all(c in "0123456789abcdefABCDEF" for c in hex_part)
|
1283
|
+
|
1284
|
+
@staticmethod
|
1285
|
+
def is_valid_eth_address(address: str) -> bool:
|
1286
|
+
"""
|
1287
|
+
Check if the input string is a valid Ethereum (EVM) address using basic heuristics.
|
1288
|
+
|
1289
|
+
Parameters
|
1290
|
+
----------
|
1291
|
+
address : str
|
1292
|
+
The address string to verify.
|
1293
|
+
|
1294
|
+
Returns
|
1295
|
+
-------
|
1296
|
+
bool
|
1297
|
+
True if `address` meets the basic criteria for an EVM address, False otherwise.
|
1298
|
+
"""
|
1299
|
+
return BaseBlockEngine.is_valid_evm_address(address)
|
1300
|
+
|
1301
|
+
|
1256
1302
|
### end Ethereum
|
1257
1303
|
|
1258
1304
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: naeural_client
|
3
|
-
Version: 2.6.
|
3
|
+
Version: 2.6.26
|
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,5 +1,5 @@
|
|
1
1
|
naeural_client/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
|
2
|
-
naeural_client/_ver.py,sha256=
|
2
|
+
naeural_client/_ver.py,sha256=v41SsIkuU8mwgkOit-MvKm8l1U2wH1sGEPmEk-6Qf6Q,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
|
@@ -14,7 +14,7 @@ naeural_client/base/webapp_pipeline.py,sha256=QmPLVmhP0CPdi0YuvbZEH4APYz2Amtw3gy
|
|
14
14
|
naeural_client/base/payload/__init__.py,sha256=y8fBI8tG2ObNfaXFWjyWZXwu878FRYj_I8GIbHT4GKE,29
|
15
15
|
naeural_client/base/payload/payload.py,sha256=x-au7l67Z_vfn_4R2C_pjZCaFuUVXHngJiGOfIAYVdE,2690
|
16
16
|
naeural_client/bc/__init__.py,sha256=FQj23D1PrY06NUOARiKQi4cdj0-VxnoYgYDEht8lpr8,158
|
17
|
-
naeural_client/bc/base.py,sha256=
|
17
|
+
naeural_client/bc/base.py,sha256=NafeKetxDoG86-gNls3FPN1M09nzRUP9unCUzEcXlrk,37706
|
18
18
|
naeural_client/bc/chain.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
naeural_client/bc/ec.py,sha256=qI8l7YqiS4MNftlx-tF7IZUswrSeQc7KMn5OZ0fEaJs,23370
|
20
20
|
naeural_client/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -82,9 +82,9 @@ naeural_client/utils/__init__.py,sha256=mAnke3-MeRzz3nhQvhuHqLnpaaCSmDxicd7Ck9uw
|
|
82
82
|
naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,1072
|
83
83
|
naeural_client/utils/config.py,sha256=v7xHikr6Z5Sbvf3opYeMhYzGWD2pe0HlRwa-aGJzUh8,6323
|
84
84
|
naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
|
85
|
-
naeural_client/utils/oracle_sync/multiple_requests.py,sha256=
|
86
|
-
naeural_client-2.6.
|
87
|
-
naeural_client-2.6.
|
88
|
-
naeural_client-2.6.
|
89
|
-
naeural_client-2.6.
|
90
|
-
naeural_client-2.6.
|
85
|
+
naeural_client/utils/oracle_sync/multiple_requests.py,sha256=GLzROGZ0gI4d1PVWgW_JBUYZjEL4LqZvHvwelxDiPW4,20892
|
86
|
+
naeural_client-2.6.26.dist-info/METADATA,sha256=jvfB6kdLKoCkEHGyjhFJnTfmrH9Ya8J4fu4Z68ldclE,12354
|
87
|
+
naeural_client-2.6.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
88
|
+
naeural_client-2.6.26.dist-info/entry_points.txt,sha256=PNdyotDaQBAslZREx5luVyj0kqpQnwNACwkFNTPIHU4,55
|
89
|
+
naeural_client-2.6.26.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
|
90
|
+
naeural_client-2.6.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|