I made a small Go library for EOA, EIP-1271, and ERC-6492 verification. Does the API make sense?
I’ve been working on a small Go library for Ethereum signature verification. The part I’m still unsure about is the policy around the main Verify function.
The narrow case is:
address + already-computed common.Hash + signature -> valid?
Repo: github.com/yermakovsa/erc6492-go
It handles:
- EOA recovery
- EIP-1271 for deployed smart contract wallets
- ERC-6492 signatures through a configured deployed verifier
I’m intentionally keeping the scope small: no message building, no EIP-712/SIWE/EIP-191 hashing, no wallet deployment, no RPC client management, and no embedded deployless verifier bytecode. Anything before the final hash exists is outside the package.
The main Verify path currently does:
ERC-6492 wrapped signature
→ WithERC6492Factory wrapping path
→ EIP-1271 if signer has code
→ EOA fallback
There are also narrower entry points: VerifyEOA, VerifyEIP1271, and VerifyERC6492.
This is v0.1.0, so I’m trying to catch bad API/policy decisions before the package hardens.
I’m unsure about a few things:
- If the signer has code and EIP-1271 returns a clean invalid result, like wrong magic value or revert, should
Verifyfall back to EOA recovery? Or would you expect contract-wallet verification to be strict once code exists? - ERC-6492 currently requires a deployed verifier address. I avoided embedding deployless verifier bytecode because I didn’t want copied bytecode in the package without pinned source, compiler settings, and reproducible provenance. Is that too conservative, or reasonable for a small library?
- Does this error split feel right?
​
invalid signature, including malformed/non-canonical EOA signatures
→ Result{Valid:false, Method:...}, nil
RPC / ABI failure / malformed ERC-6492 wrapper / unexpected verifier output
→ error
Also curious if the overall Go API shape feels natural: one main Verify plus narrower explicit functions.
Would appreciate blunt feedback from anyone who has dealt with EOA / contract wallet / counterfactual wallet signature verification.