{"id":50472139,"url":"https://github.com/yermakovsa/erc6492-go","last_synced_at":"2026-06-01T11:01:52.537Z","repository":{"id":356670516,"uuid":"1228185020","full_name":"yermakovsa/erc6492-go","owner":"yermakovsa","description":"Go library for Ethereum signature verification with EOA, EIP-1271, and ERC-6492 support.","archived":false,"fork":false,"pushed_at":"2026-05-16T14:21:18.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-16T16:40:32.770Z","etag":null,"topics":["cryptography","eip-1271","erc-6492","ethereum","go","go-ethereum","golang","signatures","wallets","web3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yermakovsa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-03T17:51:53.000Z","updated_at":"2026-05-16T14:17:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yermakovsa/erc6492-go","commit_stats":null,"previous_names":["yermakovsa/erc6492-go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yermakovsa/erc6492-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yermakovsa%2Ferc6492-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yermakovsa%2Ferc6492-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yermakovsa%2Ferc6492-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yermakovsa%2Ferc6492-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yermakovsa","download_url":"https://codeload.github.com/yermakovsa/erc6492-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yermakovsa%2Ferc6492-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33771629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","eip-1271","erc-6492","ethereum","go","go-ethereum","golang","signatures","wallets","web3"],"created_at":"2026-06-01T11:01:46.548Z","updated_at":"2026-06-01T11:01:52.527Z","avatar_url":"https://github.com/yermakovsa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# erc6492-go\n\n`erc6492-go` verifies Ethereum signatures against caller-supplied `common.Hash` values.\n\nIt answers: did this Ethereum address sign this already-computed hash?\n\nIt supports:\n\n- EOAs,\n- deployed smart contract wallets via EIP-1271,\n- ERC-6492 wrapped counterfactual-wallet signatures through a configured deployed verifier.\n\nThe package does not construct messages or hashes, manage RPC clients, send transactions, or include deployless verifier bytecode.\n\n## Status\n\nInitial pre-release. The API may change before v1.0.0.\n\nInstall the latest tagged release:\n\n```bash\ngo get github.com/yermakovsa/erc6492-go@v0.1.0\n````\n\nPin a commit if you need an unreleased change:\n\n```bash\ngo get github.com/yermakovsa/erc6492-go@\u003ccommit\u003e\n```\n\n## API shape\n\nThe main entry points are:\n\n- `Verify` for universal EOA / EIP-1271 / ERC-6492 routing,\n- `VerifyEOA` for local EOA recovery,\n- `VerifyEIP1271` for deployed contract-wallet verification,\n- `VerifyERC6492` for ERC-6492 verification through a configured verifier.\n\n`Verify` requires a caller that implements both contract calls and code reads. A standard go-ethereum `ethclient.Client` satisfies the required interfaces.\n\n`VerifyEIP1271` and `VerifyERC6492` require only contract-call support.\n\n## Verification order\n\nUniversal verification follows this order:\n\n```text\nERC-6492 wrapped signature\n→ WithERC6492Factory wrapping path\n→ EIP-1271 if signer has code\n→ EOA fallback\n```\n\nIf EIP-1271 returns a clean invalid result, such as a wrong magic value or contract revert, `Verify` falls back to EOA recovery. RPC failures, ABI failures, malformed ABI-backed inputs, and unexpected verifier outputs are returned as errors.\n\nWhen the ERC-6492 path is selected, the verifier result is final. A verifier `false` result returns `Result{Valid:false, Method:MethodERC6492}, nil` and does not fall through to EIP-1271 or EOA.\n\nCall the narrower function when you need a narrower policy:\n\n- `VerifyEOA` for EOA-only verification,\n- `VerifyEIP1271` for strict deployed contract-wallet verification,\n- `VerifyERC6492` for ERC-6492 verification through a configured verifier.\n\n## Error model\n\n```text\ninvalid signature → Result{Valid:false, Method:...}, nil\nmalformed ABI input or output / RPC failure / unexpected verifier result → error\n```\n\nExamples:\n\n```text\nwrong EOA signer                    → Result{false, MethodEOA}, nil\nmalformed EOA signature             → Result{false, MethodEOA}, nil\nEIP-1271 wrong magic value          → Result{false, MethodEIP1271}, nil\nEIP-1271 contract revert            → Result{false, MethodEIP1271}, nil\nERC-6492 verifier returns false     → Result{false, MethodERC6492}, nil\nbad ERC-6492 wrapper                → error\nERC-6492 verifier call failure      → error\nRPC timeout                         → error\n```\n\n## Verification details\n\n### EOA\n\n`VerifyEOA` verifies a 65-byte Ethereum EOA signature against the supplied hash.\n\nIt accepts `v` as `27/28` or `0/1`, normalizes it for go-ethereum recovery, enforces low-`s`, and compares the recovered address to the expected signer.\n\nMalformed or non-canonical EOA signatures return `Result{Valid:false, Method:MethodEOA}, nil`.\n\n### EIP-1271\n\n`VerifyEIP1271` calls:\n\n```solidity\nisValidSignature(bytes32,bytes)\n```\n\nThe decoded `bytes4` return value must equal `0x1626ba7e`.\n\nWrong magic values and contract reverts are clean invalid results. RPC failures, ABI failures, and malformed return data are errors.\n\n### ERC-6492\n\nERC-6492 wrapped signatures end with:\n\n```text\n0x6492649264926492649264926492649264926492649264926492649264926492\n```\n\nThe payload before the suffix ABI-decodes as:\n\n```solidity\n(address factory, bytes factoryData, bytes signature)\n```\n\n`VerifyERC6492` supports already-wrapped signatures and unwrapped signatures with `WithERC6492Factory`. Both paths require `WithERC6492VerifierAddress`.\n\nDeployless verification is not implemented. If no deployed verifier address is configured, `VerifyERC6492` returns `ErrDeploylessVerifierMissing`.\n\nThe package does not implement ERC-6492 prepare-call retry logic. Any deployment or prepare semantics depend on the configured verifier contract.\n\n## Basic usage\n\n### Universal verification\n\n```go\nresult, err := erc6492.Verify(\n\tctx,\n\tclient,\n\tsigner,\n\thash,\n\tsignature,\n\terc6492.WithERC6492VerifierAddress(verifier),\n)\nif err != nil {\n\treturn err\n}\n\nif result.Valid {\n\t// signature is valid\n}\n```\n\n`WithERC6492VerifierAddress` is only required when ERC-6492 verification may be used. Plain EOA and direct EIP-1271 verification do not require it.\n\n### EOA-only verification\n\n```go\nresult, err := erc6492.VerifyEOA(signer, hash, signature)\nif err != nil {\n\treturn err\n}\n\nif result.Valid {\n\t// EOA signature is valid\n}\n```\n\n### ERC-6492 with factory data\n\n```go\nresult, err := erc6492.VerifyERC6492(\n\tctx,\n\tclient,\n\tsigner,\n\thash,\n\tsignature,\n\terc6492.WithERC6492Factory(factory, factoryData),\n\terc6492.WithERC6492VerifierAddress(verifier),\n)\nif err != nil {\n\treturn err\n}\n\nif result.Valid {\n\t// ERC-6492 signature is valid\n}\n```\n\n## Examples\n\nRunnable examples are available in [`examples`](examples).\n\n- [`examples/eoa`](examples/eoa) verifies a known EOA signature locally.\n- [`examples/eip1271`](examples/eip1271) verifies a known EIP-1271 signature against a fixture contract on Sepolia.\n\nThe examples use caller-supplied final hashes. They do not build messages, hash typed data, send transactions, or deploy contracts.\n\n## Testing\n\n```bash\ngo test ./...\ngo vet ./...\n```\n\n## Compatibility\n\nThe module currently targets Go 1.24.\n\n## Documentation\n\n- [Non-goals](docs/non-goals.md)\n- [Security notes](docs/security.md)\n- [ERC-6492 verifier bytecode](docs/verifier-bytecode.md)\n\n## License\n\nSee [`LICENSE`](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyermakovsa%2Ferc6492-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyermakovsa%2Ferc6492-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyermakovsa%2Ferc6492-go/lists"}