cchecksum 0.0.11__tar.gz → 0.0.12__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.
Potentially problematic release.
This version of cchecksum might be problematic. Click here for more details.
- {cchecksum-0.0.11 → cchecksum-0.0.12}/.github/workflows/pytest.yaml +1 -1
- {cchecksum-0.0.11 → cchecksum-0.0.12}/PKG-INFO +2 -2
- cchecksum-0.0.12/README.md +9 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum/_checksum.c +8 -8
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum/_checksum.pyx +3 -4
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum.egg-info/PKG-INFO +2 -2
- {cchecksum-0.0.11 → cchecksum-0.0.12}/setup.py +1 -1
- cchecksum-0.0.11/README.md +0 -7
- {cchecksum-0.0.11 → cchecksum-0.0.12}/.github/workflows/black.yaml +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/.github/workflows/deploy-docs.yaml +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/.github/workflows/release.yaml +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/.gitignore +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/LICENSE +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/Makefile +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum/__init__.py +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum/_checksum.pyi +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum/checksum.py +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum/checksum.pyi +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum/py.typed +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum.egg-info/SOURCES.txt +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum.egg-info/dependency_links.txt +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum.egg-info/not-zip-safe +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum.egg-info/requires.txt +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/cchecksum.egg-info/top_level.txt +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/Makefile +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/alabaster.css +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/basic.css +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/custom.css +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/doctools.js +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/documentation_options.js +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/file.png +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/language_data.js +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/minus.png +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/plus.png +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/pygments.css +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/searchtools.js +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/conf.py +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/index.rst +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/docs/make.bat +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/pyproject.toml +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/requirements.txt +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/setup.cfg +0 -0
- {cchecksum-0.0.11 → cchecksum-0.0.12}/test_checksum.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cchecksum
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary: A ~
|
|
3
|
+
Version: 0.0.12
|
|
4
|
+
Summary: A ~4.5x 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
|
|
7
7
|
Author-email: bobthebuidlerdefi@gmail.com
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## CChecksum
|
|
2
|
+
|
|
3
|
+
CChecksum is a ~4.5x faster drop-in replacement for eth_utils.to_checksum_address, with the most cpu-intensive part implemented in c.
|
|
4
|
+
|
|
5
|
+
It keeps the exact same API as the existing implementation, exceptions and all.
|
|
6
|
+
|
|
7
|
+
Just `pip install cchecksum`, drop it in, and run your script with a substantial speed improvement.
|
|
8
|
+
|
|
9
|
+

|
|
@@ -3148,7 +3148,7 @@ static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero
|
|
|
3148
3148
|
static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
|
|
3149
3149
|
static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
|
|
3150
3150
|
static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
|
|
3151
|
-
static const char __pyx_k_Computes_the_checksummed_versio[] = "\n Computes the checksummed version of an Ethereum address.\n\n This function takes a normalized Ethereum address (without the '0x' prefix) and its corresponding\n hash (also without the '0x' prefix) and returns the checksummed address as per the Ethereum\n Improvement Proposal 55 (EIP-55).\n\n Args:\n norm_address_no_0x
|
|
3151
|
+
static const char __pyx_k_Computes_the_checksummed_versio[] = "\n Computes the checksummed version of an Ethereum address.\n\n This function takes a normalized Ethereum address (without the '0x' prefix) and its corresponding\n hash (also without the '0x' prefix) and returns the checksummed address as per the Ethereum\n Improvement Proposal 55 (EIP-55).\n\n Args:\n norm_address_no_0x: The normalized Ethereum address without the '0x' prefix.\n address_hash_hex_no_0x: The hash of the address, also without the '0x' prefix.\n\n Returns:\n The checksummed Ethereum address with the '0x' prefix.\n\n Examples:\n >>> cchecksum(\"b47e3cd837ddf8e4c57f05d70ab865de6e193bbb\", \"abcdef1234567890abcdef1234567890abcdef12\")\n '0xB47E3Cd837DdF8E4C57F05D70Ab865De6E193BbB'\n\n >>> cchecksum(\"0000000000000000000000000000000000000000\", \"1234567890abcdef1234567890abcdef12345678\")\n '0x0000000000000000000000000000000000000000'\n\n See Also:\n - :func:`eth_utils.to_checksum_address`: A utility function for converting addresses to their checksummed form.\n ";
|
|
3152
3152
|
static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
|
|
3153
3153
|
static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
|
|
3154
3154
|
static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
|
|
@@ -17995,7 +17995,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
17995
17995
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
17996
17996
|
#endif
|
|
17997
17997
|
); /*proto*/
|
|
17998
|
-
PyDoc_STRVAR(__pyx_doc_9cchecksum_9_checksum_cchecksum, "cchecksum(unicode norm_address_no_0x, const unsigned char[::1] address_hash_hex_no_0x) -> str\n\n Computes the checksummed version of an Ethereum address.\n\n This function takes a normalized Ethereum address (without the '0x' prefix) and its corresponding\n hash (also without the '0x' prefix) and returns the checksummed address as per the Ethereum\n Improvement Proposal 55 (EIP-55).\n\n Args:\n norm_address_no_0x
|
|
17998
|
+
PyDoc_STRVAR(__pyx_doc_9cchecksum_9_checksum_cchecksum, "cchecksum(unicode norm_address_no_0x, const unsigned char[::1] address_hash_hex_no_0x) -> str\n\n Computes the checksummed version of an Ethereum address.\n\n This function takes a normalized Ethereum address (without the '0x' prefix) and its corresponding\n hash (also without the '0x' prefix) and returns the checksummed address as per the Ethereum\n Improvement Proposal 55 (EIP-55).\n\n Args:\n norm_address_no_0x: The normalized Ethereum address without the '0x' prefix.\n address_hash_hex_no_0x: The hash of the address, also without the '0x' prefix.\n\n Returns:\n The checksummed Ethereum address with the '0x' prefix.\n\n Examples:\n >>> cchecksum(\"b47e3cd837ddf8e4c57f05d70ab865de6e193bbb\", \"abcdef1234567890abcdef1234567890abcdef12\")\n '0xB47E3Cd837DdF8E4C57F05D70Ab865De6E193BbB'\n\n >>> cchecksum(\"0000000000000000000000000000000000000000\", \"1234567890abcdef1234567890abcdef12345678\")\n '0x0000000000000000000000000000000000000000'\n\n See Also:\n - :func:`eth_utils.to_checksum_address`: A utility function for converting addresses to their checksummed form.\n ");
|
|
17999
17999
|
static PyMethodDef __pyx_mdef_9cchecksum_9_checksum_1cchecksum = {"cchecksum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cchecksum_9_checksum_1cchecksum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cchecksum_9_checksum_cchecksum};
|
|
18000
18000
|
static PyObject *__pyx_pw_9cchecksum_9_checksum_1cchecksum(PyObject *__pyx_self,
|
|
18001
18001
|
#if CYTHON_METH_FASTCALL
|
|
@@ -18227,7 +18227,7 @@ static PyObject *__pyx_pf_9cchecksum_9_checksum_cchecksum(CYTHON_UNUSED PyObject
|
|
|
18227
18227
|
* # the character is capitalized.
|
|
18228
18228
|
* buffer[i + 2] = address_char - 32 if 97 <= address_char <= 102 else address_char # <<<<<<<<<<<<<<
|
|
18229
18229
|
*
|
|
18230
|
-
* #
|
|
18230
|
+
* # It is faster to decode a buffer with a known size ie buffer[:42]
|
|
18231
18231
|
*/
|
|
18232
18232
|
__Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L1_error))
|
|
18233
18233
|
__pyx_t_7 = (97 <= __pyx_v_address_char);
|
|
@@ -18244,14 +18244,14 @@ static PyObject *__pyx_pf_9cchecksum_9_checksum_cchecksum(CYTHON_UNUSED PyObject
|
|
|
18244
18244
|
__pyx_L5:;
|
|
18245
18245
|
}
|
|
18246
18246
|
|
|
18247
|
-
/* "cchecksum/_checksum.pyx":
|
|
18248
|
-
*
|
|
18249
|
-
* #
|
|
18247
|
+
/* "cchecksum/_checksum.pyx":55
|
|
18248
|
+
*
|
|
18249
|
+
* # It is faster to decode a buffer with a known size ie buffer[:42]
|
|
18250
18250
|
* return buffer[:42].decode('ascii') # <<<<<<<<<<<<<<
|
|
18251
18251
|
*/
|
|
18252
|
-
__Pyx_TraceLine(
|
|
18252
|
+
__Pyx_TraceLine(55,0,__PYX_ERR(0, 55, __pyx_L1_error))
|
|
18253
18253
|
__Pyx_XDECREF(__pyx_r);
|
|
18254
|
-
__pyx_t_3 = __Pyx_decode_c_string(((char const *)__pyx_v_buffer), 0, 42, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
18254
|
+
__pyx_t_3 = __Pyx_decode_c_string(((char const *)__pyx_v_buffer), 0, 42, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
|
|
18255
18255
|
__Pyx_GOTREF(__pyx_t_3);
|
|
18256
18256
|
__pyx_r = ((PyObject*)__pyx_t_3);
|
|
18257
18257
|
__pyx_t_3 = 0;
|
|
@@ -10,8 +10,8 @@ def cchecksum(str norm_address_no_0x, const unsigned char[::1] address_hash_hex_
|
|
|
10
10
|
Improvement Proposal 55 (EIP-55).
|
|
11
11
|
|
|
12
12
|
Args:
|
|
13
|
-
norm_address_no_0x
|
|
14
|
-
address_hash_hex_no_0x
|
|
13
|
+
norm_address_no_0x: The normalized Ethereum address without the '0x' prefix.
|
|
14
|
+
address_hash_hex_no_0x: The hash of the address, also without the '0x' prefix.
|
|
15
15
|
|
|
16
16
|
Returns:
|
|
17
17
|
The checksummed Ethereum address with the '0x' prefix.
|
|
@@ -51,6 +51,5 @@ def cchecksum(str norm_address_no_0x, const unsigned char[::1] address_hash_hex_
|
|
|
51
51
|
# the character is capitalized.
|
|
52
52
|
buffer[i + 2] = address_char - 32 if 97 <= address_char <= 102 else address_char
|
|
53
53
|
|
|
54
|
-
#
|
|
55
|
-
# Lucky for us, the first 42 characters are always correct. One day maybe I'll debug this.
|
|
54
|
+
# It is faster to decode a buffer with a known size ie buffer[:42]
|
|
56
55
|
return buffer[:42].decode('ascii')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cchecksum
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary: A ~
|
|
3
|
+
Version: 0.0.12
|
|
4
|
+
Summary: A ~4.5x 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
|
|
7
7
|
Author-email: bobthebuidlerdefi@gmail.com
|
|
@@ -13,7 +13,7 @@ setup(
|
|
|
13
13
|
"local_scheme": "no-local-version",
|
|
14
14
|
"version_scheme": "python-simplified-semver",
|
|
15
15
|
},
|
|
16
|
-
description="A ~
|
|
16
|
+
description="A ~4.5x faster drop-in replacement for eth_utils.to_checksum_address. Raises the exact same Exceptions. Implemented in C.",
|
|
17
17
|
author="BobTheBuidler",
|
|
18
18
|
author_email="bobthebuidlerdefi@gmail.com",
|
|
19
19
|
url="https://github.com/BobTheBuidler/cchecksum",
|
cchecksum-0.0.11/README.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
## CChecksum
|
|
2
|
-
|
|
3
|
-
CChecksum is a ~2x faster drop-in replacement for eth_utils.to_checksum_address, with the most cpu-intensive part implemented in c.
|
|
4
|
-
|
|
5
|
-
Just `pip install cchecksum`, drop it in, and run your script with a substantial speed improvement.
|
|
6
|
-
|
|
7
|
-

|
|
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
|