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.5.tar.gz
(62.1 kB
view details)
Built Distribution
eip712-0.2.5-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file eip712-0.2.5.tar.gz
.
File metadata
- Download URL: eip712-0.2.5.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 | f5cabb4baea7a2edd0162045ab136850f5e7932f0ef888169a7a167b11d08235 |
|
MD5 | a8686e54a03de7cb1301751e8c7f7e17 |
|
BLAKE2b-256 | 315a1540aa6f14c6f3d920130c3036dcaa61e8e3d274aa8727571065c7dc10f5 |
File details
Details for the file eip712-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: eip712-0.2.5-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 | 698c52422cf852f3e7e0a93cd98d1b17494d49abdc8a787bf9c384d1d92e7f54 |
|
MD5 | 86a67f254c51f3d8c1c6f2949022868c |
|
BLAKE2b-256 | 2ba0ffc08cb8ff5af491a7ed793fe158a0d82590a2e26b6aa38470bd50086d20 |