Repository URL to install this package:
|
Version:
0.1.6.dev0+g8ca1bfe.d20221103 ▾
|
| .github |
| docs |
| eip712 |
| eip712.egg-info |
| tests |
| .gitignore |
| .pre-commit-config.yaml |
| CONTRIBUTING.md |
| LICENSE |
| PKG-INFO |
| README.md |
| build_docs.py |
| pyproject.toml |
| setup.cfg |
| setup.py |
Message classes for typed structured data hashing and signing in Ethereum. See EIP-712 for details.
pipYou can install the latest release via pip:
pip install eip712
setuptoolsYou can clone the repository and use setuptools for the most up-to-date version:
git clone https://github.com/ApeWorX/eip712.git cd eip712 python3 setup.py install
Define EIP-712 models:
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