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_: "uint256" = 1
_name_: "string" = "Ether Mail"
_verifyingContract_: "address" = "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
_version_: "string" = "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.1.2.tar.gz
(63.1 kB
view hashes)
Built Distribution
eip712-0.1.2-py3-none-any.whl
(14.1 kB
view hashes)