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.1.tar.gz
(61.6 kB
view details)
Built Distribution
File details
Details for the file eip712-0.2.1.tar.gz
.
File metadata
- Download URL: eip712-0.2.1.tar.gz
- Upload date:
- Size: 61.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3997dace7e581b66a84d106a10baac47a3f6c94095d79c7d0971ca0ede1926ad |
|
MD5 | 5a2eca5cef344fd21699c0c335c84744 |
|
BLAKE2b-256 | d7dfea403817125dde74fb1fc3c1acfa70afea0b8e38ef85df99c847f6d3c256 |
File details
Details for the file eip712-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: eip712-0.2.1-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 | c984c577358d1c7e5d4e52802bf4bd0432e965ba7326448998f95fcc1b6d5269 |
|
MD5 | 223e5a9f0c5e7ae9fe2a74784a38d54f |
|
BLAKE2b-256 | 57ec4dc019d13e614138900caa42e68314fe36dc1aeaeeaadef69dbd361bff7d |