cchecksum 0.3.0__pp310-pypy310_pp73-win_amd64.whl → 0.3.1__pp310-pypy310_pp73-win_amd64.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.
Potentially problematic release.
This version of cchecksum might be problematic. Click here for more details.
- cchecksum/__init__.py +3 -1
- cchecksum/_checksum.pypy310-pp73-win_amd64.pyd +0 -0
- cchecksum/monkey_patch.py +47 -0
- {cchecksum-0.3.0.dist-info → cchecksum-0.3.1.dist-info}/METADATA +1 -1
- cchecksum-0.3.1.dist-info/RECORD +12 -0
- {cchecksum-0.3.0.dist-info → cchecksum-0.3.1.dist-info}/WHEEL +1 -1
- cchecksum-0.3.0.dist-info/RECORD +0 -11
- {cchecksum-0.3.0.dist-info → cchecksum-0.3.1.dist-info}/licenses/LICENSE +0 -0
- {cchecksum-0.3.0.dist-info → cchecksum-0.3.1.dist-info}/top_level.txt +0 -0
cchecksum/__init__.py
CHANGED
|
@@ -5,5 +5,7 @@ It keeps the exact same API as the existing implementation, exceptions and all.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from cchecksum._checksum import to_checksum_address
|
|
8
|
+
from cchecksum.monkey_patch import monkey_patch_eth_utils, monkey_patch_web3py
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
__all__ = ["to_checksum_address", "monkey_patch_eth_utils", "monkey_patch_web3py"]
|
|
Binary file
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from cchecksum._checksum import to_checksum_address
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def monkey_patch_eth_utils() -> None:
|
|
5
|
+
"""Monkey patch eth_utils to use cchecksum's implementation internally."""
|
|
6
|
+
import eth_utils
|
|
7
|
+
import eth_utils.address
|
|
8
|
+
|
|
9
|
+
eth_utils.to_checksum_address = to_checksum_address
|
|
10
|
+
eth_utils.address.to_checksum_address = to_checksum_address
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def monkey_patch_web3py() -> None:
|
|
14
|
+
"""Monkey patch web3.py to use cchecksum's implementation internally."""
|
|
15
|
+
import web3._utils as web3_utils
|
|
16
|
+
import web3.main as web3_main
|
|
17
|
+
import web3.middleware as web3_middleware
|
|
18
|
+
|
|
19
|
+
web3_main.to_checksum_address = to_checksum_address
|
|
20
|
+
web3_utils.ens.to_checksum_address = to_checksum_address
|
|
21
|
+
web3_utils.method_formatters.to_checksum_address = to_checksum_address
|
|
22
|
+
web3_utils.normalizers.to_checksum_address = to_checksum_address
|
|
23
|
+
web3_middleware.signing.to_checksum_address = to_checksum_address
|
|
24
|
+
|
|
25
|
+
try:
|
|
26
|
+
import web3.utils.address as web3_address
|
|
27
|
+
|
|
28
|
+
web3_address.to_checksum_address = to_checksum_address
|
|
29
|
+
except ModuleNotFoundError:
|
|
30
|
+
# youre on an older web3py, no monkey patch for you
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
try:
|
|
34
|
+
import ens.ens
|
|
35
|
+
|
|
36
|
+
ens.ens.to_checksum_address = to_checksum_address
|
|
37
|
+
except ModuleNotFoundError:
|
|
38
|
+
# youre on an older web3py, no monkey patch for you
|
|
39
|
+
pass
|
|
40
|
+
|
|
41
|
+
try:
|
|
42
|
+
import ens.async_ens
|
|
43
|
+
|
|
44
|
+
ens.async_ens.to_checksum_address = to_checksum_address
|
|
45
|
+
except ModuleNotFoundError:
|
|
46
|
+
# youre on an older web3py, no monkey patch for you
|
|
47
|
+
pass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cchecksum
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A ~8x faster drop-in replacement for eth_utils.to_checksum_address. Raises the exact same Exceptions. Implemented in C.
|
|
5
5
|
Home-page: https://github.com/BobTheBuidler/cchecksum
|
|
6
6
|
Author: BobTheBuidler
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
cchecksum/__init__.py,sha256=-Kr6qCmi2w8Mzy5TGFJgZIGcxFGY19uTw4HJbkK8duE,448
|
|
2
|
+
cchecksum/_checksum.c,sha256=gfrmEOHGBKVph3OO3huh0im6EoPcV5HKjRlHEOPL_vY,1205139
|
|
3
|
+
cchecksum/_checksum.pyi,sha256=eUGDp_H5_OOvDRL0GJRekMDSXSPxGwhPo9WKLCpIz3Q,2377
|
|
4
|
+
cchecksum/_checksum.pypy310-pp73-win_amd64.pyd,sha256=6RyF9dE_VI_ToHOMi6ieKnHXyPBOcWm96a1llcgLbOk,145920
|
|
5
|
+
cchecksum/_checksum.pyx,sha256=ukYP-Klj5pnVZu015h9gZqTBwW2bfFvo0RRJMIcAfXw,16125
|
|
6
|
+
cchecksum/monkey_patch.py,sha256=rEGkjNKS0gLnmg9K5cB2xf9LDZgs9_M9wf8mggAq4_Q,1587
|
|
7
|
+
cchecksum/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
cchecksum-0.3.1.dist-info/licenses/LICENSE,sha256=fQVwsRjteeLx97IRvfK64JDaGcNv1BN4_SvhXX0Zemo,1091
|
|
9
|
+
cchecksum-0.3.1.dist-info/METADATA,sha256=oASB5Hj--vwoQcTQeRQqgjAvumvoP-F1bmKL-UrTWf4,1216
|
|
10
|
+
cchecksum-0.3.1.dist-info/WHEEL,sha256=092FxqZvDsD2Hq3_m5wIOsQ4_e-S-rfSm6W9mNaowS4,108
|
|
11
|
+
cchecksum-0.3.1.dist-info/top_level.txt,sha256=Qm8-fG-PzUlKgrtwwH508kIYkP63C2tRYA1qePeqAZQ,10
|
|
12
|
+
cchecksum-0.3.1.dist-info/RECORD,,
|
cchecksum-0.3.0.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
cchecksum/__init__.py,sha256=LpElEhZx7qv5zPz73Fn5M6ITGXkgdFXRbQqNNTtnL08,317
|
|
2
|
-
cchecksum/_checksum.c,sha256=gfrmEOHGBKVph3OO3huh0im6EoPcV5HKjRlHEOPL_vY,1205139
|
|
3
|
-
cchecksum/_checksum.pyi,sha256=eUGDp_H5_OOvDRL0GJRekMDSXSPxGwhPo9WKLCpIz3Q,2377
|
|
4
|
-
cchecksum/_checksum.pypy310-pp73-win_amd64.pyd,sha256=rhkervcufBMzU2I3KphUutpdr8emloeiHNGv5vjoL7w,145920
|
|
5
|
-
cchecksum/_checksum.pyx,sha256=ukYP-Klj5pnVZu015h9gZqTBwW2bfFvo0RRJMIcAfXw,16125
|
|
6
|
-
cchecksum/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
cchecksum-0.3.0.dist-info/licenses/LICENSE,sha256=fQVwsRjteeLx97IRvfK64JDaGcNv1BN4_SvhXX0Zemo,1091
|
|
8
|
-
cchecksum-0.3.0.dist-info/METADATA,sha256=Qh-EhOWlSylpPZRgqvjErBMx16AL-1byDLpm3r5je0Q,1216
|
|
9
|
-
cchecksum-0.3.0.dist-info/WHEEL,sha256=5A_vS-GgrO-8fgaiEeK10rWf7Wx8T0CzNKcgI-9-IDQ,108
|
|
10
|
-
cchecksum-0.3.0.dist-info/top_level.txt,sha256=Qm8-fG-PzUlKgrtwwH508kIYkP63C2tRYA1qePeqAZQ,10
|
|
11
|
-
cchecksum-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|