Repository URL to install this package:
|
Version:
0.1.6.dev0+g8ca1bfe.d20221103 ▾
|
eip712
/
PKG-INFO
|
|---|
Metadata-Version: 2.1
Name: eip712
Version: 0.1.6.dev0+g8ca1bfe.d20221103
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
Platform: UNKNOWN
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
Requires-Python: >=3.8,<4
Description-Content-Type: text/markdown
Provides-Extra: test
Provides-Extra: lint
Provides-Extra: doc
Provides-Extra: release
Provides-Extra: dev
License-File: LICENSE
# 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.7.2 or greater, python3-dev
## 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_: "uint256" = 1
_name_: "string" = "Ether Mail"
_verifyingContract_: "address" = "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
_version_: "string" = "1"
sender: Person
receiver: Person
```