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.9 up to 3.12.
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
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.10.tar.gz
(62.1 kB
view details)
Built Distribution
eip712-0.2.10-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file eip712-0.2.10.tar.gz
.
File metadata
- Download URL: eip712-0.2.10.tar.gz
- Upload date:
- Size: 62.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fed8caaab859fb342e4b9b2f1c84f4cb3145144645985177cb9cdf457edbf911 |
|
MD5 | 3c2bc4c14a6b251b46584935b25b7e7e |
|
BLAKE2b-256 | 8f2310bec4ac9a435f46455651a79549684cf5a9ebbc4fa7683e71178bf03f9f |
File details
Details for the file eip712-0.2.10-py3-none-any.whl
.
File metadata
- Download URL: eip712-0.2.10-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e8cbf092b1943d787c97b91116791b14f3d4b122bc3aab198ba599ff3256a67 |
|
MD5 | 369274f2282d890b3b8904b44c3d7f1f |
|
BLAKE2b-256 | fc73b6233d8a25195d3b186a1bb9a601f1be9ced393ecc2ddfa2e2fdab625c13 |