eip712: Message classes for typed structured data hashing and signing in Ethereum
Project description
Quick Start
Message classes for typed structured data hashing and signing in Ethereum. See EIP-712 for details.
Dependencies
- python3 version 3.8 up to 3.12.
Installation
via pip
You can install the latest release via pip
:
pip install eip712
via setuptools
You 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
Quick Usage
Define EIP-712 models:
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eip712-0.2.7.tar.gz
(62.1 kB
view details)
Built Distribution
eip712-0.2.7-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file eip712-0.2.7.tar.gz
.
File metadata
- Download URL: eip712-0.2.7.tar.gz
- Upload date:
- Size: 62.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d055fd6f14fffe338b9fba27935e75a9133f7e4417ea9b8331995c2ef58f3b6 |
|
MD5 | 0be5e06ec635ff89dc7c692aefee1e37 |
|
BLAKE2b-256 | 9adef93da50c86f593c4286fed783a9899bc066ddfd40983a7267293586ee68b |
File details
Details for the file eip712-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: eip712-0.2.7-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a722400d8f72650b8ae8af3593894de35dfa6d158984e8bff933008e9710013f |
|
MD5 | 6ad61a7e0329a6691ec7cbdcfe6a6e45 |
|
BLAKE2b-256 | bc440e9351190f80b1d23253fcdb5a2ac3c1a2f6027be822d8f4b50526a23939 |