{"_id":"@signinwithethereum/siwe-parser","_rev":"9-bf66d235384877d87bb3c7be45532c7d","name":"@signinwithethereum/siwe-parser","dist-tags":{"latest":"4.2.1"},"versions":{"4.0.0":{"name":"@signinwithethereum/siwe-parser","version":"4.0.0","keywords":["ethereum","sign-in","sign-in-with-ethereum","siwe","siwe-parser","sign-in-with-ethereum-parser"],"author":{"name":"Ethereum Identity Foundation"},"license":"Apache-2.0","_id":"@signinwithethereum/siwe-parser@4.0.0","maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"homepage":"https://github.com/signinwithethereum/siwe","bugs":{"url":"https://github.com/signinwithethereum/siwe/issues"},"dist":{"shasum":"9673c33b937ba8702ddeb4ca219dd3bba7488a51","tarball":"https://registry.npmjs.org/@signinwithethereum/siwe-parser/-/siwe-parser-4.0.0.tgz","fileCount":5,"integrity":"sha512-LF9TAl5wYK/x4NIdPWhmLFa8fEQQey7Zh9ONCZuOsmeEw5627AbJYOKWCsAlOrtkyb5IerLysdOd+t+OWlq77g==","signatures":[{"sig":"MEUCIQCsLhwN2ScdETSuGxC3kY7aUQVwwbyxnoQtL15T0TbrkgIgC7iz/MPTBvZd4+ewf063svcbvgeZzKC1tCbDVcbtiBQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":123280},"main":"dist/parsers.cjs","type":"module","_from":"file:signinwithethereum-siwe-parser-4.0.0.tgz","types":"dist/parsers.d.ts","module":"dist/parsers.mjs","exports":{".":{"import":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.mjs"},"require":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.cjs"}}},"scripts":{"apg":"apg -i ./lib/siwe-abnf.txt -o ./lib/siwe-grammar --typescript","lint":"eslint .","test":"vitest run","build":"vite build","format":"prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\""},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/6b9b680cb17594e582a5b724914d2a66/signinwithethereum-siwe-parser-4.0.0.tgz","_integrity":"sha512-LF9TAl5wYK/x4NIdPWhmLFa8fEQQey7Zh9ONCZuOsmeEw5627AbJYOKWCsAlOrtkyb5IerLysdOd+t+OWlq77g==","repository":{"url":"git+https://github.com/signinwithethereum/siwe.git","type":"git"},"_npmVersion":"11.9.0","description":"Parse Messages that conform to EIP-4361: Sign in with Ethereum (SIWE)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"apg-js":"^4.4.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/siwe-parser_4.0.0_1774284370144_0.508952870078816","host":"s3://npm-registry-packages-npm-production"}},"4.0.1":{"name":"@signinwithethereum/siwe-parser","version":"4.0.1","keywords":["ethereum","sign-in","sign-in-with-ethereum","siwe","siwe-parser","sign-in-with-ethereum-parser"],"author":{"name":"Ethereum Identity Foundation"},"license":"Apache-2.0","_id":"@signinwithethereum/siwe-parser@4.0.1","maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"homepage":"https://github.com/signinwithethereum/siwe","bugs":{"url":"https://github.com/signinwithethereum/siwe/issues"},"dist":{"shasum":"8f5ad1890ce9cb984e7977324f11462d4296b7d8","tarball":"https://registry.npmjs.org/@signinwithethereum/siwe-parser/-/siwe-parser-4.0.1.tgz","fileCount":6,"integrity":"sha512-NT1cq5yaGnUc5Fsw2quqdw3zBMvU3yKlAvryuQ4BN0Mxvi4kwX12ahMpX7SZqOj3jrI2KQGZGNzKqZmQql5jcw==","signatures":[{"sig":"MEYCIQDBho02fFEF/1wr0nYPgrk+x2XNH1X525AmJp/pORunegIhALZbpfH6yeRjmx8fPKbKryhkNFjz69G52pt+ek7eWcys","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125272},"main":"dist/parsers.cjs","type":"module","_from":"file:signinwithethereum-siwe-parser-4.0.1.tgz","types":"dist/parsers.d.ts","module":"dist/parsers.mjs","exports":{".":{"import":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.mjs"},"require":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.cjs"}}},"scripts":{"apg":"apg -i ./lib/siwe-abnf.txt -o ./lib/siwe-grammar --typescript","lint":"eslint .","test":"vitest run","build":"vite build","format":"prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\""},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/d458edf6c1db6ca6ec23e0386832ae07/signinwithethereum-siwe-parser-4.0.1.tgz","_integrity":"sha512-NT1cq5yaGnUc5Fsw2quqdw3zBMvU3yKlAvryuQ4BN0Mxvi4kwX12ahMpX7SZqOj3jrI2KQGZGNzKqZmQql5jcw==","repository":{"url":"git+https://github.com/signinwithethereum/siwe.git","type":"git"},"_npmVersion":"11.9.0","description":"Parse Messages that conform to EIP-4361: Sign in with Ethereum (SIWE)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"apg-js":"^4.4.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/siwe-parser_4.0.1_1774290500279_0.06531516485397448","host":"s3://npm-registry-packages-npm-production"}},"4.0.2":{"name":"@signinwithethereum/siwe-parser","version":"4.0.2","keywords":["ethereum","sign-in","sign-in-with-ethereum","siwe","siwe-parser","sign-in-with-ethereum-parser"],"author":{"name":"Ethereum Identity Foundation"},"license":"Apache-2.0","_id":"@signinwithethereum/siwe-parser@4.0.2","maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"homepage":"https://github.com/signinwithethereum/siwe","bugs":{"url":"https://github.com/signinwithethereum/siwe/issues"},"dist":{"shasum":"6af84b3e47d90398d68f6385163c2960bec12875","tarball":"https://registry.npmjs.org/@signinwithethereum/siwe-parser/-/siwe-parser-4.0.2.tgz","fileCount":6,"integrity":"sha512-WLnqoJc00y/tcXZKn/1tNf3bFRFjKYTIpCfvUF6nm704ImlVRgghSZ88xrxPTYgeQsL9YNMgifTPXsVKDqMU3g==","signatures":[{"sig":"MEYCIQCQ8hnltd64dlJ70R6fEjHNwQfw1MBbhgSA7RFokmka7wIhAPlytnvBqc07cOBDDfVBQeW5zIpLs4dW5EJK18R7J7o6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":125503},"main":"dist/parsers.cjs","type":"module","_from":"file:signinwithethereum-siwe-parser-4.0.2.tgz","types":"dist/parsers.d.ts","module":"dist/parsers.mjs","exports":{".":{"import":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.mjs"},"require":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.cjs"}}},"scripts":{"apg":"apg -i ./lib/siwe-abnf.txt -o ./lib/siwe-grammar --typescript","lint":"eslint .","test":"vitest run","build":"vite build","format":"prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\""},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/6aa796d39e5356c4fe1b101e4e08ec25/signinwithethereum-siwe-parser-4.0.2.tgz","_integrity":"sha512-WLnqoJc00y/tcXZKn/1tNf3bFRFjKYTIpCfvUF6nm704ImlVRgghSZ88xrxPTYgeQsL9YNMgifTPXsVKDqMU3g==","repository":{"url":"git+https://github.com/signinwithethereum/siwe.git","type":"git"},"_npmVersion":"11.9.0","description":"Parse Messages that conform to EIP-4361: Sign in with Ethereum (SIWE)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"apg-js":"^4.4.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/siwe-parser_4.0.2_1774337960269_0.6108752445365886","host":"s3://npm-registry-packages-npm-production"}},"4.1.0":{"name":"@signinwithethereum/siwe-parser","version":"4.1.0","keywords":["ethereum","sign-in","sign-in-with-ethereum","siwe","siwe-parser","sign-in-with-ethereum-parser"],"author":{"name":"Ethereum Identity Foundation"},"license":"Apache-2.0","_id":"@signinwithethereum/siwe-parser@4.1.0","maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"homepage":"https://github.com/signinwithethereum/siwe","bugs":{"url":"https://github.com/signinwithethereum/siwe/issues"},"dist":{"shasum":"57e2bb7a441064af8c727fb3f6bdac1a4865b49d","tarball":"https://registry.npmjs.org/@signinwithethereum/siwe-parser/-/siwe-parser-4.1.0.tgz","fileCount":6,"integrity":"sha512-aS+bU5QpTQgMpC6HjQHuKJpltUrkyGUVNuhuBLARa39wF1B+m05/4bgnf2qrEcgQONfU36A2Nbn3ibmwhHkc2Q==","signatures":[{"sig":"MEQCIH8AEF/jHHc0qhiEf205oFcRDE6kLmPs46Qs63n+Eh8cAiAFczo3DUt9QYWtYO3OZXcv/A9bmGValAMSZngvF/7BJA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126179},"main":"dist/parsers.cjs","type":"module","_from":"file:signinwithethereum-siwe-parser-4.1.0.tgz","types":"dist/parsers.d.ts","module":"dist/parsers.mjs","exports":{".":{"import":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.mjs"},"require":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.cjs"}}},"scripts":{"apg":"apg -i ./lib/siwe-abnf.txt -o ./lib/siwe-grammar --typescript","lint":"eslint .","test":"vitest run","build":"vite build","format":"prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\""},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/f367c8e595e506cad08c79ebaf284d93/signinwithethereum-siwe-parser-4.1.0.tgz","_integrity":"sha512-aS+bU5QpTQgMpC6HjQHuKJpltUrkyGUVNuhuBLARa39wF1B+m05/4bgnf2qrEcgQONfU36A2Nbn3ibmwhHkc2Q==","repository":{"url":"git+https://github.com/signinwithethereum/siwe.git","type":"git"},"_npmVersion":"11.9.0","description":"Parse Messages that conform to EIP-4361: Sign in with Ethereum (SIWE)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"apg-js":"^4.4.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/siwe-parser_4.1.0_1774340295867_0.9492820880539656","host":"s3://npm-registry-packages-npm-production"}},"4.2.0":{"name":"@signinwithethereum/siwe-parser","version":"4.2.0","keywords":["ethereum","sign-in","sign-in-with-ethereum","siwe","siwe-parser","sign-in-with-ethereum-parser"],"author":{"name":"Ethereum Identity Foundation"},"license":"Apache-2.0","_id":"@signinwithethereum/siwe-parser@4.2.0","maintainers":[{"name":"brantlyefp","email":"brantly@ethfollow.xyz"},{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"homepage":"https://github.com/signinwithethereum/siwe","bugs":{"url":"https://github.com/signinwithethereum/siwe/issues"},"dist":{"shasum":"19f0aec8d850d16aadcbb03d47d6b04cdaa3029d","tarball":"https://registry.npmjs.org/@signinwithethereum/siwe-parser/-/siwe-parser-4.2.0.tgz","fileCount":6,"integrity":"sha512-e3edh8XpZrEjbzVYc0BZ4ySFOa8RKTZOQTafSf1E6ejCB5XcBH93jEpYmjzry1EEocgMNq4KlB3YunsFNCXakQ==","signatures":[{"sig":"MEYCIQDXQkcVAgMNmEqIOdwQam4WZ1btCCv2fviSAlBZ8PiAyQIhAKG2QFvkaP+scopPp/Sm+KIaCMUoQKkRYqVeOMDI8f3F","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":127572},"main":"dist/parsers.cjs","type":"module","_from":"file:signinwithethereum-siwe-parser-4.2.0.tgz","types":"dist/parsers.d.ts","module":"dist/parsers.mjs","exports":{".":{"import":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.mjs"},"require":{"types":"./dist/parsers.d.ts","default":"./dist/parsers.cjs"}}},"scripts":{"apg":"apg -i ./lib/siwe-abnf.txt -o ./lib/siwe-grammar --typescript","lint":"eslint .","test":"vitest run","build":"vite build","format":"prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\""},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/90382612d2217a87fb6a1a217a5a15eb/signinwithethereum-siwe-parser-4.2.0.tgz","_integrity":"sha512-e3edh8XpZrEjbzVYc0BZ4ySFOa8RKTZOQTafSf1E6ejCB5XcBH93jEpYmjzry1EEocgMNq4KlB3YunsFNCXakQ==","repository":{"url":"git+https://github.com/signinwithethereum/siwe.git","type":"git"},"_npmVersion":"11.11.0","description":"Parse Messages that conform to EIP-4361: Sign in with Ethereum (SIWE)","directories":{},"_nodeVersion":"24.14.1","dependencies":{"apg-js":"^4.4.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/siwe-parser_4.2.0_1776093175270_0.9765254563269727","host":"s3://npm-registry-packages-npm-production"}},"4.2.1":{"name":"@signinwithethereum/siwe-parser","version":"4.2.1","keywords":["ethereum","sign-in","sign-in-with-ethereum","siwe","siwe-parser","sign-in-with-ethereum-parser"],"author":{"name":"Ethereum Identity Foundation"},"license":"Apache-2.0","_id":"@signinwithethereum/siwe-parser@4.2.1","maintainers":[{"name":"brantlyefp","email":"brantly@ethfollow.xyz"},{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"homepage":"https://github.com/signinwithethereum/siwe","bugs":{"url":"https://github.com/signinwithethereum/siwe/issues"},"dist":{"shasum":"1ffc3df11c692606ebac3218b1ae3056df8c2a6c","tarball":"https://registry.npmjs.org/@signinwithethereum/siwe-parser/-/siwe-parser-4.2.1.tgz","fileCount":8,"integrity":"sha512-GAdwNiBaRpUMTiFfPrbQ3e/RBhPbEhRRN1sZmDMLgLEZuKqKwO7V0ksVzCerE9l8HFKTNw5R/q3kPDCWJRz4zA==","signatures":[{"sig":"MEYCIQCVeg6D4dKKYoP4PwiNs3JK/bKU42TfZiVZROsmXaHZRgIhANEfbbJ/leGsulMSfpb4nXlULOyORBYBQOX4Rkjh//4q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":131606},"main":"dist/parsers.cjs","type":"module","_from":"file:signinwithethereum-siwe-parser-4.2.1.tgz","types":"dist/parsers.d.ts","module":"dist/parsers.mjs","exports":{".":{"import":{"types":"./dist/parsers.d.mts","default":"./dist/parsers.mjs"},"require":{"types":"./dist/parsers.d.cts","default":"./dist/parsers.cjs"}}},"scripts":{"apg":"apg -i ./lib/siwe-abnf.txt -o ./lib/siwe-grammar --typescript","lint":"eslint .","test":"vitest run","build":"vite build","format":"prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\""},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/f9fa0f96784bf45c8a97abe4fdca2d9d/signinwithethereum-siwe-parser-4.2.1.tgz","_integrity":"sha512-GAdwNiBaRpUMTiFfPrbQ3e/RBhPbEhRRN1sZmDMLgLEZuKqKwO7V0ksVzCerE9l8HFKTNw5R/q3kPDCWJRz4zA==","repository":{"url":"git+https://github.com/signinwithethereum/siwe.git","type":"git"},"_npmVersion":"11.17.0","description":"Parse Messages that conform to EIP-4361: Sign in with Ethereum (SIWE)","directories":{},"_nodeVersion":"24.19.0","dependencies":{"apg-js":"^4.4.0","@noble/hashes":"^1.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/siwe-parser_4.2.1_1788281425665_0.9455455289683512","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-03-23T16:46:10.075Z","modified":"2026-09-01T16:55:40.180Z","4.0.0":"2026-03-23T16:46:10.293Z","4.0.1":"2026-03-23T18:28:20.418Z","4.0.2":"2026-03-24T07:39:20.418Z","4.1.0":"2026-03-24T08:18:16.046Z","4.2.0":"2026-04-13T15:12:55.411Z","4.2.1":"2026-09-01T16:50:25.814Z"},"bugs":{"url":"https://github.com/signinwithethereum/siwe/issues"},"author":{"name":"Ethereum Identity Foundation"},"license":"Apache-2.0","homepage":"https://github.com/signinwithethereum/siwe","keywords":["ethereum","sign-in","sign-in-with-ethereum","siwe","siwe-parser","sign-in-with-ethereum-parser"],"repository":{"url":"git+https://github.com/signinwithethereum/siwe.git","type":"git"},"description":"Parse Messages that conform to EIP-4361: Sign in with Ethereum (SIWE)","maintainers":[{"email":"jalil@1001.digital","name":"jwahdatehagh"},{"email":"aaron@1sat.io","name":"caveman_onchain"}],"readme":"# @signinwithethereum/siwe-parser\n\nA parser for [EIP-4361: Sign in with Ethereum](https://eips.ethereum.org/EIPS/eip-4361) messages, using an ABNF grammar for strict specification compliance.\n\n## Installation\n\n```bash\nnpm install @signinwithethereum/siwe-parser\n```\n\n## Usage\n\n### Parsing a SIWE message\n\n```typescript\nimport { ParsedMessage } from '@signinwithethereum/siwe-parser'\n\nconst message = new ParsedMessage(rawMessage)\n\nconsole.log(message.domain)\nconsole.log(message.address)\nconsole.log(message.uri)\nconsole.log(message.version)\nconsole.log(message.chainId)\nconsole.log(message.nonce)\nconsole.log(message.issuedAt)\n```\n\nThe constructor throws if the message does not conform to EIP-4361.\n\n### Validating a URI\n\n```typescript\nimport { isUri } from '@signinwithethereum/siwe-parser'\n\nisUri('https://example.com') // true\n```\n\n### Utilities\n\n```typescript\nimport {\n  isEIP55Address,\n  isValidISO8601Date,\n} from '@signinwithethereum/siwe-parser'\n\nisEIP55Address('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B') // true\nisValidISO8601Date('2024-01-01T00:00:00Z') // true\n```\n\n## Parsed Fields\n\n| Field            | Type       | Required |\n| ---------------- | ---------- | -------- |\n| `domain`         | `string`   | Yes      |\n| `address`        | `string`   | Yes      |\n| `uri`            | `string`   | Yes      |\n| `version`        | `string`   | Yes      |\n| `chainId`        | `number`   | Yes      |\n| `nonce`          | `string`   | Yes      |\n| `issuedAt`       | `string`   | Yes      |\n| `scheme`         | `string`   | No       |\n| `statement`      | `string`   | No       |\n| `expirationTime` | `string`   | No       |\n| `notBefore`      | `string`   | No       |\n| `requestId`      | `string`   | No       |\n| `resources`      | `string[]` | No       |\n\n## Related\n\nFor full SIWE message creation, signing, and verification (including ERC-1271 and EIP-6492 support), use [`@signinwithethereum/siwe`](https://www.npmjs.com/package/@signinwithethereum/siwe) which includes this parser.\n\n## Disclaimer\n\nOur TypeScript library for Sign In with Ethereum has not yet undergone a formal security\naudit. We welcome continued feedback on the usability, architecture, and security\nof this implementation.\n","readmeFilename":"README.md"}