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.

Dependencies

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


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

Uploaded Source

Built Distribution

eip712-0.2.4-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file eip712-0.2.4.tar.gz.

File metadata

  • Download URL: eip712-0.2.4.tar.gz
  • Upload date:
  • Size: 62.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for eip712-0.2.4.tar.gz
Algorithm Hash digest
SHA256 e69760414523f60328279620776549a17ff72f89974688710d3467ae08717070
MD5 80f492a1535f3c45d9ecd611b0392569
BLAKE2b-256 7a2a49c1700923247338a99eb185abbe486bbc14bac3415aa08a42457cd181f4

See more details on using hashes here.

File details

Details for the file eip712-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: eip712-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for eip712-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 19d9abdb4b0ffb97f12a68addc2bbcdb2f0a2da17bc038a22c77b42353de1ecd
MD5 c31112b70ab1265ce106787696b2c8b0
BLAKE2b-256 02eca03202e64919d83b16b0f17b210aa0719fa613f91bf8f90c37d8c7049a88

See more details on using hashes here.

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