--- id: poly-eip712-structs version: "0.0.1" license: unclear license_treatment: permissive maintenance: dormant --- # poly-eip712-structs — A python library for EIP712 objects License: permissive · Maintenance: dormant · Downloads: 1.3M/mo ## What it is and what it does poly-eip712-structs provides a Python interface for building EIP-712 structured data objects that can be signed for Ethereum transactions. It maps Solidity-like types (Address, Boolean, Bytes, Int, String, Uint, and nested structs) to Python class definitions, then serializes them into signable message bytes with domain separation. The library handles type encoding, message serialization to JSON, and dictionary-style access to struct fields. Typical use is defining a struct class with typed fields, instantiating it with values, optionally setting a default domain, then converting to signable bytes or a message dict for cryptographic signing. It supports nested structs and arrays, dynamic attribute assignment for reserved keywords, and both static and dynamic array lengths. Use it for: - Sign typed Ethereum messages for wallet interactions or contract function calls requiring EIP-712 compliance. - Build structured data objects that map to Solidity struct definitions for off-chain signing before on-chain submission. - Encode domain-separated messages to prevent replay attacks across different Ethereum chains or contracts. - Construct complex nested struct hierarchies with arrays and multiple field types for multi-signature workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Constructs and serializes EIP-712 structured data for Ethereum signing, mapping Solidity-like types to Python objects with domain separation and message encoding. Yes, if you need EIP-712 struct construction for Ethereum signing and can tolerate dormant maintenance. The library is stable with no known vulnerabilities, but expect no active updates or bug fixes. Suitable for production use in mature workflows; less suitable if you need ongoing support. ## Install pip install poly-eip712-structs uv add poly-eip712-structs poetry add poly-eip712-structs ## Installing poly-eip712-structs Before you install: Low friction install with a pure-Python wheel. Dormant maintenance status (last commit 2024-07-18) means no active bug fixes or security updates, though the codebase is stable. License in practice: MIT license (permissive) allows commercial and private use with minimal restrictions. Quickstart: pip install poly-eip712-structs from poly_eip712_structs import EIP712Struct, String, Uint, make_domain class MyStruct(EIP712Struct): some_string = String() some_number = Uint(256) domain = make_domain(name='Example', version='1.0.0') mine = MyStruct(some_string='hello', some_number=1234) my_bytes = mine.signable_bytes(domain) Requires Python >=3.9.10; runtime dependencies are eth-utils, pycryptodome, and pytest. Verify before relying: - Whether this is a maintained fork or a distinct implementation with active development plans. - Compatibility with current Ethereum tooling and whether EIP-712 spec changes since 2024-07-18 affect usage. - Whether pytest is a runtime dependency or a development-only artifact. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags EIP-712 struct construction, Ethereum message signing, typed data encoding, solidity struct python, domain separator, cryptographic message hashing, blockchain struct serialization, ethereum, eip-712, cryptography [View on SkillFed](https://skillfed.io/packages/poly-eip712-structs) · [View on PyPI](https://pypi.org/project/poly-eip712-structs/)