{"id":28380662,"url":"https://github.com/0xsequence/ethauth.js","last_synced_at":"2025-06-24T21:31:33.143Z","repository":{"id":42722402,"uuid":"209849783","full_name":"0xsequence/ethauth.js","owner":"0xsequence","description":"ETHAuth -- self-signed authorization proofs using EIP712","archived":false,"fork":false,"pushed_at":"2024-07-03T14:45:52.000Z","size":501,"stargazers_count":28,"open_issues_count":3,"forks_count":6,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-06-09T23:48:04.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/0xsequence.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":"2019-09-20T17:50:57.000Z","updated_at":"2024-11-23T19:51:53.000Z","dependencies_parsed_at":"2024-06-07T17:03:58.039Z","dependency_job_id":"5f19ab25-08b6-40a0-ab29-199af8b0ff02","html_url":"https://github.com/0xsequence/ethauth.js","commit_stats":{"total_commits":41,"total_committers":5,"mean_commits":8.2,"dds":"0.29268292682926833","last_synced_commit":"7e59376252217890050a38d5e1e283c4489a51c0"},"previous_names":["arcadeum/ethwebtoken.js","arcadeum/ethauth.js"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/0xsequence/ethauth.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethauth.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethauth.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethauth.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethauth.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xsequence","download_url":"https://codeload.github.com/0xsequence/ethauth.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethauth.js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261222673,"owners_count":23126898,"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","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-05-30T03:09:02.708Z","updated_at":"2025-06-24T21:31:33.131Z","avatar_url":"https://github.com/0xsequence.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n ____ ____ ____ ____ ____ ____ ____\n||e |||t |||h |||a |||u |||t |||h ||\n||__|||__|||__|||__|||__|||__|||__||\n|/__\\|/__\\|/__\\|/__\\|/__\\|/__\\|/__\\|\n```\n\n## Usage\n\n`pnpm add @0xsequence/ethauth` (or `yarn add ...` or `npm install ...`)\n\n\n\n## Format\n\n`proof = eth.\u003caddress\u003e.\u003cclaims\u003e.\u003csignature\u003e.\u003cextra\u003e`\n\n\n### Address\n\nThe account address in hex encoding, ie. '0x9e63b5BF4b31A7F8d5D8b4f54CD361344Eb744C5'.\n\nNote, you should not take the account address in the ethauth proof at face value -- you must parse the Proof\nand validate it with the library methods provided. The address is included when used to verify\nsmart wallet based accounts (aka contract-based accounts).\n\n\n### Claims\n\na base64 encoded JSON object of\n\n```typescript\ninterface Claims {\n  app: string\n  exp: number\n  iat?: number\n  n?: number\n  typ?: string\n  ogn?: string\n}\n```\n\nFields:\n\n  * `app` (required) - App identifier requesting the issuance of the ethauth proof\n  * `exp` (required) - Expired at unix timestamp of when the ethauth proof is valid until\n  * `iat` (optonal) - Issued at unix timestamp of when the ethauth proof has been signed/issued\n  * `n` (optional) - Nonce value which can be used as a challenge number for added security\n  * `typ` (optional) - Type of authorization for this ethauth proof\n  * `ogn` (optional) - Domain origin requesting the issuance of the ethauth proof\n\n\n### Signature\n\nSignature value of the claims message payload. The signature is computed by the EIP712\neth_signTypedData call of the claims object. The signature may be recoverable with ECRecover to\ndetermine the EOA address, or you may have a different encoding such as one used with EIP-1271,\nto validate the contract-based account signature.\n\n\n\n## Example ETHAuth encoding / decoding\n\n### EOA account signature\n\nethauth-proof = `eth.0x89d9f8f31817badb5d718cd6fb483b71dbd2dfed.eyJhcHAiOiJFV1RUZXN0IiwiaWF0IjoxNTk1NTMwODQwLCJleHAiOjE1OTU1MzExNDB9.0x233ab9164a677a41acc8d52c9e1d1a621acebf9bc8d956c8474618b589acebe10cc350deb4b02bf6951cec8bd23507170f204ca326a5a264b8f6f67fa2619c251c`\n\ndecodes \u0026 verifies to:\n  * account address: `0x89D9F8f31817BAdb5D718CD6fb483b71DbD2dfeD`\n  * claims: `{\"app\":\"EWTTest\",\"iat\":1595530840,\"exp\":1595531140}`\n  * signature: `0x233ab9164a677a41acc8d52c9e1d1a621acebf9bc8d956c8474618b589acebe10cc350deb4b02bf6951cec8bd23507170f204ca326a5a264b8f6f67fa2619c251c`\n\n\n### Contract-based account signature (verifiable with EIP 1271)\n\nethauth-proof = `eth.0x9e63b5bf4b31a7f8d5d8b4f54cd361344eb744c5.eyJpYXQiOjE1OTQ3NDM4NDgsImV4cCI6MTYyNjI3OTg0OCwibiI6MTMzN30.0x000100012dd090aec5e4a9678f7968533c10fc42b07b9a23fa3b719f79a861adcfc7e1d958e3521bb061c34072f5435681390ccc9be19bf9da32320bd2356d0b4b4d316b1c02`\n\ndecodes \u0026 verifies to:\n  * account address: `0x9e63b5bf4b31a7f8d5d8b4f54cd361344eb744c5`\n  * message: `{\"iat\":1594743848,\"exp\":1626279848,\"n\":1337}`\n  * signature: `0x000100012dd090aec5e4a9678f7968533c10fc42b07b9a23fa3b719f79a861adcfc7e1d958e3521bb061c34072f5435681390ccc9be19bf9da32320bd2356d0b4b4d316b1c02`\n\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fethauth.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xsequence%2Fethauth.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fethauth.js/lists"}