Skip to main content

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.



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
cd eip712
python3 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

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.7.tar.gz (62.1 kB view hashes)

Uploaded Source

Built Distribution

eip712-0.2.7-py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page