https://github.com/antik21/eip712
Eip712 Android library
https://github.com/antik21/eip712
android ethereum java kotlin web3j
Last synced: about 2 months ago
JSON representation
Eip712 Android library
- Host: GitHub
- URL: https://github.com/antik21/eip712
- Owner: Antik21
- License: apache-2.0
- Created: 2024-10-27T16:15:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-04T12:36:27.000Z (over 1 year ago)
- Last Synced: 2025-02-09T08:42:17.514Z (over 1 year ago)
- Topics: android, ethereum, java, kotlin, web3j
- Language: Kotlin
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ethereum EIP712 for Android
EIP712 Android Library is a Kotlin-based library designed to simplify the integration of the EIP712 standard into Android applications, enabling seamless signing and structured data handling for Ethereum transactions.
## Features
- **EIP712 Standard**: Implements the EIP712 standard as outlined in [Ethereum Improvement Proposals](https://eips.ethereum.org/EIPS/eip-712), allowing Android apps to securely and effectively sign structured data for Ethereum smart contract interactions.
- **Kotlin-Optimized**: Built from the ground up in Kotlin, this library fits naturally into Android projects, leveraging Kotlin’s concise and expressive syntax to create clean, maintainable code.
- **Web3j Integration**: Utilizes the powerful [web3j library](https://github.com/hyperledger/web3j) for Ethereum blockchain operations, ensuring compatibility and ease of interaction with Ethereum smart contracts.
## Getting Started
To start using EIP712 Android Library, follow the installation steps below:
1. Add the library to your project’s dependencies.
2. Configure the required Ethereum parameters in your Android application.
3. Utilize the provided Kotlin APIs to sign structured data and interact with Ethereum smart contracts with ease.
## Example Usage
```kotlin
// Example code snippet for signing a structured EIP712 message
val eip712Data = SomeEip712Struct(
...
)
val domain = Eip712Domain(
DOMAIN_NAME,
VERSION,
chainId
)
val signature = signer.signTypedData(domain, eip712Data.value)