Overview
Use the Java SDK to sign EIP-712 typed data with your server wallet. Typed data signing is used for permits, order signing, and other structured data that produces a recoverable signature.
DynamicEvmWalletClient::signTypedData takes the typed data as a JSON string (the standard EIP-712 envelope: domain, types, primaryType, message) and returns the 0x-prefixed r || s || v signature.
Prerequisites
Sign Typed Data
The method returns the serialized ECDSA signature as a 0x-prefixed hex string (130 hex chars).
ERC-2612 Permit Example
A common use case is signing ERC-2612 token permits, allowing gasless approvals:
Large integers (uint256) should be serialized as JSON strings to avoid precision loss — Java’s JSON parsers and the underlying web3j EIP-712 encoder both accept the string form.
Verifying a typed-data signature
EIP-712 signatures recover the same way as EIP-191 — hash the typed-data digest, then run ecrecover against the signature. Use web3j’s StructuredDataEncoder:
Next Steps
Last modified on September 21, 2026