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

Uploaded Source

Built Distribution

eip712-0.2.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eip712-0.2.2.tar.gz
  • Upload date:
  • Size: 62.0 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.2.tar.gz
Algorithm Hash digest
SHA256 6d2e07a83c66fb1cbe2448bb4dfea1c91913c4822b7d9b89231e5b61473ae426
MD5 5ff3bb00748edc3f890aab3e03312bc3
BLAKE2b-256 7137b0c1121be0ffff88ce068332c7e1cf5ea706f7eabb71a1cac377647a7072

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eip712-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 576476dd1d276e444a633ac22ab25209e18f8f41e5016e576a132d190043a4ba
MD5 4a729ab7029bc3e8b8cc5bf5498e079a
BLAKE2b-256 cfc8a308ae2e2cdbd6a001b85f013bb950e677d63d446019bf20323f70708c96

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