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.7.2 or greater, python3-dev
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
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.0.tar.gz
(61.5 kB
view details)
Built Distribution
File details
Details for the file eip712-0.2.0.tar.gz
.
File metadata
- Download URL: eip712-0.2.0.tar.gz
- Upload date:
- Size: 61.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7356336ff5ea47c434f672657054d104d93ffac19daddccc634f02c12723ee9a |
|
MD5 | f92c31c24815b99227ff06a804ceb7fd |
|
BLAKE2b-256 | 9d19c70a608334904a0ed9863b1e48858ec35472ca976d627b0a712b4fdb2c05 |
File details
Details for the file eip712-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: eip712-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ab01a05417b3ec528c55773ec97be24ee0877255426bbf9fdd49b412bf9274 |
|
MD5 | 39b6ea3bf3694b8d9b8afd5398af6d73 |
|
BLAKE2b-256 | 01bf0b37cacc800efdd890fd04acf3884615f59e088102f1d15c20ea65f9e7ae |