Name | circomlibpy JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | Circom libs in Python |
upload_time | 2024-10-28 00:14:22 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT License Copyright (c) 2024 hoongun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
poseidon
merkle
circom
zkp
zero-knowledge
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# circomlibpy
Circom libs in Python
## Obtaining a Poseidon hash from two elements:
```python
from circomlibpy.poseidon import PoseidonHash
poseidon = PoseidonHash()
hash = poseidon.hash(2, [12345, 67890])
```
## Constructing a Merkle tree based on Poseidon hashes:
```python
from circomlibpy.merkle_tree import MerkleTree
leafs: list[int] = [
[1, 2, 3],
[11, 22, 33],
]
mtree = MerkleTree(leafs)
path, order = mtree.gen_proof(index=0)
print(f'Root: {mtree.root}')
print(f'Path: {path}')
print(f'Order: {order}')
```
Raw data
{
"_id": null,
"home_page": null,
"name": "circomlibpy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "poseidon, merkle, circom, zkp, zero-knowledge",
"author": null,
"author_email": "Artem Belozerov <hoongun.off@yandex.ru>",
"download_url": "https://files.pythonhosted.org/packages/67/d6/01e064fb5ef06ac7e86659aad630126bccd95278e4d6ab98b2683eae40f7/circomlibpy-1.0.0.tar.gz",
"platform": null,
"description": "# circomlibpy\nCircom libs in Python\n\n## Obtaining a Poseidon hash from two elements:\n\n```python\nfrom circomlibpy.poseidon import PoseidonHash\n\nposeidon = PoseidonHash()\nhash = poseidon.hash(2, [12345, 67890])\n```\n\n## Constructing a Merkle tree based on Poseidon hashes:\n\n```python\nfrom circomlibpy.merkle_tree import MerkleTree\n\nleafs: list[int] = [\n [1, 2, 3],\n [11, 22, 33],\n]\nmtree = MerkleTree(leafs)\npath, order = mtree.gen_proof(index=0)\n\nprint(f'Root: {mtree.root}')\nprint(f'Path: {path}')\nprint(f'Order: {order}')\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 hoongun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Circom libs in Python",
"version": "1.0.0",
"project_urls": {
"Repository": "https://github.com/hoongun/circomlibjs.git"
},
"split_keywords": [
"poseidon",
" merkle",
" circom",
" zkp",
" zero-knowledge"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f14f7408c12ea2bbb877fe20f777ba9ad0fd1ec67ae825aa2eb8bc006eaf711c",
"md5": "08667111a97e0496db3cb2bc718abd29",
"sha256": "e4ffcc3a74e7686cb335756976e757921efbe1e6bcb3858342536d1ac01d24b1"
},
"downloads": -1,
"filename": "circomlibpy-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "08667111a97e0496db3cb2bc718abd29",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 906083,
"upload_time": "2024-10-28T00:14:20",
"upload_time_iso_8601": "2024-10-28T00:14:20.567198Z",
"url": "https://files.pythonhosted.org/packages/f1/4f/7408c12ea2bbb877fe20f777ba9ad0fd1ec67ae825aa2eb8bc006eaf711c/circomlibpy-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "67d601e064fb5ef06ac7e86659aad630126bccd95278e4d6ab98b2683eae40f7",
"md5": "86ef7e5eb7212e012563db47f5f9818d",
"sha256": "fa5e03bf9c82ba6afe4b7f7e51ab76676630fa33040851803fb8846c835b1d10"
},
"downloads": -1,
"filename": "circomlibpy-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "86ef7e5eb7212e012563db47f5f9818d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 905218,
"upload_time": "2024-10-28T00:14:22",
"upload_time_iso_8601": "2024-10-28T00:14:22.042346Z",
"url": "https://files.pythonhosted.org/packages/67/d6/01e064fb5ef06ac7e86659aad630126bccd95278e4d6ab98b2683eae40f7/circomlibpy-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 00:14:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hoongun",
"github_project": "circomlibjs",
"github_not_found": true,
"lcname": "circomlibpy"
}