{"id":19001781,"url":"https://github.com/etherspot/eip1271-verification-util","last_synced_at":"2025-09-03T07:40:24.021Z","repository":{"id":89530788,"uuid":"601184087","full_name":"etherspot/eip1271-verification-util","owner":"etherspot","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-12T16:16:11.000Z","size":838,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-30T04:45:02.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/etherspot.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-13T14:43:11.000Z","updated_at":"2024-02-26T18:04:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"87709d89-01a0-49b2-bbd5-2cf49cdf8912","html_url":"https://github.com/etherspot/eip1271-verification-util","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.3571428571428571,"last_synced_commit":"79ed9beb4ff9e2b90f20f3a141337d09de596ee7"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/etherspot/eip1271-verification-util","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherspot%2Feip1271-verification-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherspot%2Feip1271-verification-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherspot%2Feip1271-verification-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherspot%2Feip1271-verification-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etherspot","download_url":"https://codeload.github.com/etherspot/eip1271-verification-util/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etherspot%2Feip1271-verification-util/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273410257,"owners_count":25100450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"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":[],"created_at":"2024-11-08T18:12:48.652Z","updated_at":"2025-09-03T07:40:23.947Z","avatar_url":"https://github.com/etherspot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EIP1271 Module\n\nA simple library to validate EIP1271 signatures.\n\n### Usage\n\nSimple usage\n\n```ts\nimport ethers from \"ethers\";\nimport {\n  isValidEip1271Signature,\n  isValidEip1271SignatureForAllNetworks,\n} from \"@etherspot/eip1271-verification-util\";\nimport { MNEMONIC, RPC } from \"./constants\";\n\nconst checkSig = async () =\u003e {\n  const signer = ethers.Wallet.fromMnemonic(MNEMONIC);\n  const data = \"0x123456\";\n\n  const rpcUrls = [RPC.polygon, RPC.bsc, RPC.xdai]; // Array of RPC URLs to create providers to perform smart contract wallet validation with EIP 1271\n  const walletAddress = signer.address; // The signer address to verify the signature against\n  const signature = await signer.signMessage(ethers.utils.arrayify(hexxed)); // The signature to verify as a hex string\n  const hash = ethers.utils.hashMessage(ethers.utils.arrayify(hexxed)); // Hashed data used for the signature to verify. The dApp will need to pre-compute this as no hashing will occur in the function, and this will be directly used in isValidEip1271Signature\n\n  const isValidSig = await isValidEip1271Signature(\n    rpcUrls,\n    walletAddress,\n    hash,\n    signature\n  );\n\n  console.log(\"is signature valid:\", isValidSig); // Returns a single boolean\n\n  const isValidSigPerNetwork = await isValidEip1271SignatureForAllNetworks(\n    rpcUrls,\n    walletAddress,\n    hash,\n    signature\n  );\n\n  console.log(\"is signature valid for each network:\", isValidSigPerNetwork); // Returns an array of booleans with chainId for each network you provided a RPC URL for eg. [{ chainId: 1, name: \"mainnet\", valid: true }, { chainId: 56, name: \"bnb\", valid: false }, ...]\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetherspot%2Feip1271-verification-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetherspot%2Feip1271-verification-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetherspot%2Feip1271-verification-util/lists"}