2024-05-26 13:15:51 +03:00

136 lines
4.5 KiB
Plaintext

Metadata-Version: 2.1
Name: eip712
Version: 0.2.7
Summary: eip712: Message classes for typed structured data hashing and signing in Ethereum
Home-page: https://github.com/ApeWorX/eip712
Author: ApeWorX Ltd.
Author-email: admin@apeworx.io
License: Apache-2.0
Keywords: ethereum
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8,<4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dataclassy <1,>=0.8.2
Requires-Dist: eth-abi <6,>=5.1.0
Requires-Dist: eth-account <0.12,>=0.10.0
Requires-Dist: eth-hash[pycryptodome]
Requires-Dist: eth-typing <4,>=3.5.2
Requires-Dist: eth-utils <3,>=2.3.1
Requires-Dist: hexbytes <1,>=0.3.0
Provides-Extra: dev
Requires-Dist: pytest <8,>=6.0 ; extra == 'dev'
Requires-Dist: pytest-xdist ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: hypothesis <7,>=6.70.0 ; extra == 'dev'
Requires-Dist: black <24,>=23.12.0 ; extra == 'dev'
Requires-Dist: mypy <2,>=1.7.1 ; extra == 'dev'
Requires-Dist: types-setuptools ; extra == 'dev'
Requires-Dist: flake8 <7,>=6.1.0 ; extra == 'dev'
Requires-Dist: isort <6,>=5.12.0 ; extra == 'dev'
Requires-Dist: mdformat <0.8,>=0.7.17 ; extra == 'dev'
Requires-Dist: mdformat-gfm <0.4,>=0.3.5 ; extra == 'dev'
Requires-Dist: mdformat-frontmatter <0.5,>=0.4.1 ; extra == 'dev'
Requires-Dist: myst-parser <0.19,>=0.18.1 ; extra == 'dev'
Requires-Dist: Sphinx <6,>=5.3.0 ; extra == 'dev'
Requires-Dist: sphinx-rtd-theme <2,>=1.2.0 ; extra == 'dev'
Requires-Dist: sphinxcontrib-napoleon >=0.7 ; extra == 'dev'
Requires-Dist: setuptools ; extra == 'dev'
Requires-Dist: wheel ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Requires-Dist: commitizen <3,>=2.42 ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: pytest-watch ; extra == 'dev'
Requires-Dist: IPython ; extra == 'dev'
Requires-Dist: ipdb ; extra == 'dev'
Provides-Extra: doc
Requires-Dist: myst-parser <0.19,>=0.18.1 ; extra == 'doc'
Requires-Dist: Sphinx <6,>=5.3.0 ; extra == 'doc'
Requires-Dist: sphinx-rtd-theme <2,>=1.2.0 ; extra == 'doc'
Requires-Dist: sphinxcontrib-napoleon >=0.7 ; extra == 'doc'
Provides-Extra: lint
Requires-Dist: black <24,>=23.12.0 ; extra == 'lint'
Requires-Dist: mypy <2,>=1.7.1 ; extra == 'lint'
Requires-Dist: types-setuptools ; extra == 'lint'
Requires-Dist: flake8 <7,>=6.1.0 ; extra == 'lint'
Requires-Dist: isort <6,>=5.12.0 ; extra == 'lint'
Requires-Dist: mdformat <0.8,>=0.7.17 ; extra == 'lint'
Requires-Dist: mdformat-gfm <0.4,>=0.3.5 ; extra == 'lint'
Requires-Dist: mdformat-frontmatter <0.5,>=0.4.1 ; extra == 'lint'
Provides-Extra: release
Requires-Dist: setuptools ; extra == 'release'
Requires-Dist: wheel ; extra == 'release'
Requires-Dist: twine ; extra == 'release'
Provides-Extra: test
Requires-Dist: pytest <8,>=6.0 ; extra == 'test'
Requires-Dist: pytest-xdist ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: hypothesis <7,>=6.70.0 ; extra == 'test'
# Quick Start
Message classes for typed structured data hashing and signing in Ethereum.
See [EIP-712](https://eips.ethereum.org/EIPS/eip-712) for details.
## Dependencies
- [python3](https://www.python.org/downloads) version 3.8 up to 3.12.
## Installation
### via `pip`
You can install the latest release via [`pip`](https://pypi.org/project/pip/):
```bash
pip install eip712
```
### via `setuptools`
You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:
```bash
git clone https://github.com/ApeWorX/eip712.git
cd eip712
python3 setup.py install
```
## Quick Usage
Define EIP-712 models:
```python
from eip712.messages import EIP712Message, EIP712Type
class Person(EIP712Type):
name: "string"
wallet: "address"
class Mail(EIP712Message):
_chainId_ = 1
_name_ = "Ether Mail"
_verifyingContract_ = "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
_version_ = "1"
sender: Person
receiver: Person
```
# Initialize a Person object as you would normally
person = Person(name="Joe", wallet="0xa27CEF8aF2B6575903b676e5644657FAe96F491F")