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.9.tar.gz
(62.0 kB
view details)
Built Distribution
eip712-0.2.9-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file eip712-0.2.9.tar.gz
.
File metadata
- Download URL: eip712-0.2.9.tar.gz
- Upload date:
- Size: 62.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 993b73cc511d1a5820187f4d9722c2bf66fb6d57dd301b12b5276f290770fcff |
|
MD5 | ae219645ca2d186a3aa00b7bd15d3453 |
|
BLAKE2b-256 | 4924d579b730e841b22bf5c9acd07e975ffce3a99d2ac89bab569e08e4c2a2ff |
File details
Details for the file eip712-0.2.9-py3-none-any.whl
.
File metadata
- Download URL: eip712-0.2.9-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 | e81e6e432bdfbeb24f5cef9dcf630025cef65d3f49e157bae615c625165e4208 |
|
MD5 | 6aa99dcf9c3efb457fd5a921069d23b3 |
|
BLAKE2b-256 | 8a74ca6299c743a9773d6e0ce99f03bc2ef91dd2ef059d9fb0557a82b97118d6 |