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.9 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.8.tar.gz
(62.1 kB
view details)
Built Distribution
eip712-0.2.8-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file eip712-0.2.8.tar.gz
.
File metadata
- Download URL: eip712-0.2.8.tar.gz
- Upload date:
- Size: 62.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1fa18acc54c69899f37509cdf3d77507ec859b1d9633ccafd80f77b94dc1501 |
|
MD5 | 3f7e194281262ea733ce051d20ba13a7 |
|
BLAKE2b-256 | dae029f788f4ea6982c432e8a4d46dbd02299ec1b40d8bcdc46ec332a836abb2 |
File details
Details for the file eip712-0.2.8-py3-none-any.whl
.
File metadata
- Download URL: eip712-0.2.8-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 072ca3b4332e1ff5cd4be7c1445740db0d112c702d2e2f1279164673afd3f664 |
|
MD5 | e2fa34aa23aca1ada33399e1587171ed |
|
BLAKE2b-256 | b5e0f7f28492fc184168acceff8cc492a26bfd9c767cd9c76676a15900013ff3 |