{"id":25564584,"url":"https://github.com/generalgalactic/eip4361-tools","last_synced_at":"2025-08-02T23:15:11.563Z","repository":{"id":42575808,"uuid":"426282956","full_name":"generalgalactic/eip4361-tools","owner":"generalgalactic","description":"A set of tools for working with Sign-In With Ethereum","archived":false,"fork":false,"pushed_at":"2023-01-12T17:48:03.000Z","size":360,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-19T15:52:56.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/generalgalactic.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}},"created_at":"2021-11-09T15:29:36.000Z","updated_at":"2023-06-20T15:26:20.000Z","dependencies_parsed_at":"2023-02-09T12:50:14.359Z","dependency_job_id":null,"html_url":"https://github.com/generalgalactic/eip4361-tools","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/generalgalactic/eip4361-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generalgalactic%2Feip4361-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generalgalactic%2Feip4361-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generalgalactic%2Feip4361-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generalgalactic%2Feip4361-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generalgalactic","download_url":"https://codeload.github.com/generalgalactic/eip4361-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generalgalactic%2Feip4361-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268470799,"owners_count":24255391,"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-08-02T02:00:12.353Z","response_time":74,"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":"2025-02-20T21:20:44.092Z","updated_at":"2025-08-02T23:15:11.523Z","avatar_url":"https://github.com/generalgalactic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eip4361-tools\n\n![Workflow pasing status](https://github.com/generalgalactic/eip4361-tools/actions/workflows/ci.yml/badge.svg)\n\nA set of tools for working with Sign-In With Ethereum (EIP4361).\n\n- See: https://github.com/ethereum/EIPs/pull/4361/files\n- See: https://ethereum-magicians.org/t/eip-4361-sign-in-with-ethereum/7263\n\n## Functions\n\n### `eip4361.makeNonce(expirationTTLSeconds = null, notBefore = null)`\n\nProduces a `Nonce` object. If no parameters are specified will produce a `Nonce` with only `value` and `issuedAt` properties.\n\nOptionally, caller can specify `expirationTTLSeconds` to set an `expirationTime` property. May also specify a `notBefore` `Date` object to set the corresponding property.\n\nIf either of these two properties are set when verifying, they will be checked for validity.\n\nIf operating in a secure context, suggest storing this object and only exposing the `value` to the insecure client. Pass the `value` back to the secure context which can validate the nonce hasn't already been used before attempting to verify the signature.\n\n### `eip4361.produceMessage(domain, address, statement, uri, version, nonce, chainId = null, requestId= null, resources = [])`\n\nProduces an EIP4361 compliant message for a wallet to sign.\n\n- `nonce.expirationTime`, `nonce.notBefore`, `chainId`, `requestID`, and `resources` are all optional.\n\nRequest the connected wallet to `personal_sign` (EIP-191) this message and capture the signature.\n\n- See: https://eips.ethereum.org/EIPS/eip-191\n- See: https://geth.ethereum.org/docs/rpc/ns-personal#personal_sign\n- See: https://docs.ethers.io/v5/api/signer/#Signer-signMessage\n- See: https://web3js.readthedocs.io/en/v1.5.2/web3-eth-personal.html#sign\n\n### `eip4361.verifyMessage(signature, domain, address, statement, uri, version, nonce, chainId = null, requestId = null, resources = [])`\n\nOnce a wallet has signed the message, pass it back to `verifyMessage` with all the same parameters you used for `produceMessage` to verify it.\n\n- If the nonce is bad `eip4361.InvalidNonceError` will be thrown.\n- If the signature is bad `eip4361.InvalidSignatureError` will be thrown.\n\n---\n\n\"It almost certainly works.\" - Clint","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneralgalactic%2Feip4361-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeneralgalactic%2Feip4361-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneralgalactic%2Feip4361-tools/lists"}