{"_id":"standardwebhooks","_rev":"4-366eeca363e5802616c6ce058f08ed10","name":"standardwebhooks","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"standardwebhooks","version":"1.0.0","keywords":["webhooks","typescript"],"author":{"name":"Standard Webhooks"},"license":"MIT","_id":"standardwebhooks@1.0.0","maintainers":[{"name":"tasn","email":"npm@stosb.com"}],"homepage":"https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries/javascript","bugs":{"url":"https://github.com/standard-webhooks/standard-webhooks/issues"},"dist":{"shasum":"5faa23ceacbf9accd344361101d9e3033b64324f","tarball":"https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.0.0.tgz","fileCount":8,"integrity":"sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==","signatures":[{"sig":"MEUCIQCR8SIVfvbeRJu1pEoeqzGS9+15xeX4ogotSrrym3FkMQIgHO0sQFO9nseDIw4uiXMmZXmc4IbSheGB1AKhwJf58KI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12909},"main":"./dist/index.js","type":"commonjs","gitHead":"929bf0c1928b188287eaf88d0a9f0a4e87df6499","scripts":{"lint":"yarn run lint:prettier && yarn run lint:eslint --max-warnings=0","test":"jest","build":"tsc","prepare":"yarn run build","lint:fix":"yarn run lint:prettier --write && yarn run lint:eslint --fix","lint:eslint":"eslint --ignore-path .lintignore --ext .js,.jsx,.ts,.tsx src","lint:prettier":"prettier --ignore-path .lintignore --write src/**.ts","prepublishOnly":"yarn lint"},"typings":"./dist/index.d.ts","_npmUser":{"name":"tasn","email":"npm@stosb.com"},"repository":{"url":"git+https://github.com/standard-webhooks/standard-webhooks.git","type":"git"},"_npmVersion":"10.4.0","description":"Standard Webhooks for TypeScript","directories":{},"_nodeVersion":"21.6.1","dependencies":{"fast-sha256":"^1.3.0","@stablelib/base64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.1","prettier":"^3.2.2","typescript":"^5.3.3","@types/jest":"^29.5.11","@stablelib/utf8":"^1.0.2","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/typescript-estree":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/standardwebhooks_1.0.0_1709559580455_0.28878742514835953","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"standardwebhooks","version":"1.1.0","keywords":["webhooks","typescript"],"author":{"name":"Standard Webhooks"},"license":"MIT","_id":"standardwebhooks@1.1.0","maintainers":[{"name":"tasn","email":"npm@stosb.com"}],"homepage":"https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries/javascript","bugs":{"url":"https://github.com/standard-webhooks/standard-webhooks/issues"},"dist":{"shasum":"9d9c162b6c9afda3c4a2aa550def2ce62e128bbb","tarball":"https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.1.0.tgz","fileCount":8,"integrity":"sha512-NlZSZ26K+iZ5CsGlg6V3k0Uwr0Ot7GElGmxGjEdyiynPJ68Ao82HGYECzeemg8yvv8aZuxpv18z48Fni6/Y+cQ==","signatures":[{"sig":"MEQCIEYXfWBKVGhVK6Q46AvpUDSnm0ibjjTP93jzcIvO38ChAiAl58/qxKEoxQX0sGqt7i/Nc90uecIOsn7MzSoeAjWwiQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCMacct4F6GcC/QV1P4qfwG5pcmmxZvjgFHAYS/B4DbigIhAIZs1G2z0hScQHF7YTQYwVLwYzdCpLWzKO6X8wQqQDZ6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/standardwebhooks@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13402},"main":"./dist/index.js","type":"commonjs","gitHead":"d7a6f14576f79dfbcc65cc597162fbb01906720e","scripts":{"fmt":"biome format --write","test":"tsc && node --test dist/*.test.js","build":"tsc","check":"biome check","prepare":"npm run build","check:fix":"biome check --write","prepublishOnly":"biome check"},"typings":"./dist/index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d8d4fa18-82fe-4ae7-bc43-695276ab86f7"}},"repository":{"url":"git+https://github.com/standard-webhooks/standard-webhooks.git","type":"git"},"_npmVersion":"11.19.0","description":"Standard Webhooks for TypeScript","directories":{},"_nodeVersion":"26.8.1","dependencies":{"fast-sha256":"^1.3.0","@stablelib/base64":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^26.1.0","@biomejs/biome":"2.2.4","@stablelib/utf8":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/standardwebhooks_1.1.0_1787933658544_0.5186895662098208","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"standardwebhooks","version":"1.1.1","keywords":["webhooks","typescript"],"author":{"name":"Standard Webhooks"},"license":"MIT","_id":"standardwebhooks@1.1.1","maintainers":[{"name":"tasn","email":"npm@stosb.com"}],"homepage":"https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries/javascript","bugs":{"url":"https://github.com/standard-webhooks/standard-webhooks/issues"},"dist":{"shasum":"25b98fa2bbe4edad7b42778135c923563e3d5e2f","tarball":"https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.1.1.tgz","fileCount":8,"integrity":"sha512-bCbX9ZEyFkWPsRz7Bl3NuQUJohmwGSev/yhr7vhaGPlc4AfIrspIRa6cPTBuI1ItmrTDJ4d/S2hCsfe4+vQGnQ==","signatures":[{"sig":"MEYCIQCVzV4h+tDbIwBpI3U5ac2ruiGBspXtDpZ0v30fEIuxrwIhAOBaxkjPXFaLgUGB6XRAGBxaXoLHiD0uVwdgyrP6Rotz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQD7E8KvUUyfpEra9Yui+KoWG/WMkAgQXMmQmuoDqtmMLwIhAPU2OhXY8eHreTiEwyb9PB/9mgdcQHlykqjDddRVZY2P","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/standardwebhooks@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13402},"main":"./dist/index.js","type":"commonjs","gitHead":"b4d2c14fc5b4ccff3ff271e3b087dff812254c59","scripts":{"fmt":"biome format --write","test":"tsc && node --test dist/*.test.js","build":"tsc","check":"biome check","prepare":"npm run build","check:fix":"biome check --write","prepublishOnly":"biome check"},"typings":"./dist/index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d8d4fa18-82fe-4ae7-bc43-695276ab86f7"}},"repository":{"url":"git+https://github.com/standard-webhooks/standard-webhooks.git","type":"git"},"_npmVersion":"11.17.0","description":"Standard Webhooks for TypeScript","directories":{},"_nodeVersion":"24.19.0","dependencies":{"fast-sha256":"^1.3.0","@stablelib/base64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^26.1.0","@biomejs/biome":"2.2.4","@stablelib/utf8":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/standardwebhooks_1.1.1_1787949857796_0.5624990602932318","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"_id":"standardwebhooks@1.3.0","bugs":{"url":"https://github.com/standard-webhooks/standard-webhooks/issues"},"dist":{"shasum":"30478263f878357e0e36f5333ee9d1279639377c","tarball":"https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.3.0.tgz","fileCount":8,"integrity":"sha512-5W9skHjqAm2dlA9wWvglTP+oX47JX4lFXVk1aJV7+TG1snvTR4QXaVgPscEzvOw9GRreeavMwbqEeL+MGhZHCg==","signatures":[{"sig":"MEYCIQCxh9JXnDcPJcJO54gtFz5C+0BGbo1sdDVIX8eYgp7hiQIhAJ0LNpcQBeciYA/G1t67rQ//wfADZ9VytZUG8Cg+dAfP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGIXnqOp13gbOLgHCRIMIAAOITemQLzEVrLGoyrKmdGzAiAIf3tfDi56CP2XVB0Qwbf/Zv2vcOwPmaFhIkPttug63w=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/standardwebhooks@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16163},"main":"./dist/index.js","name":"standardwebhooks","type":"commonjs","author":{"name":"Standard Webhooks"},"gitHead":"daee8284cfe9d4e435ec16e3e68a8f30084d6aaf","license":"MIT","scripts":{"fmt":"biome format --write","test":"tsc && node --test dist/*.test.js","build":"tsc","check":"biome check","prepare":"npm run build","check:fix":"biome check --write","prepublishOnly":"biome check"},"typings":"./dist/index.d.ts","version":"1.3.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"d8d4fa18-82fe-4ae7-bc43-695276ab86f7"}},"homepage":"https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries/javascript","keywords":["webhooks","typescript"],"repository":{"url":"git+https://github.com/standard-webhooks/standard-webhooks.git","type":"git"},"_npmVersion":"11.19.1","description":"Standard Webhooks for TypeScript","directories":{},"maintainers":[{"name":"tasn","email":"npm@stosb.com"}],"_nodeVersion":"24.22.2","dependencies":{"fast-sha256":"^1.3.0","@stablelib/base64":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^26.1.0","@biomejs/biome":"2.2.4","@stablelib/utf8":"^2.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/standardwebhooks_1.3.0_1794950915234_0.0351126260756065"}}},"time":{"created":"2024-03-04T13:39:40.454Z","modified":"2026-11-17T21:28:35.669Z","1.0.0":"2024-03-04T13:39:40.614Z","1.1.0":"2026-08-28T16:14:18.648Z","1.1.1":"2026-08-28T20:44:17.913Z","1.3.0":"2026-11-17T21:28:35.320Z"},"bugs":{"url":"https://github.com/standard-webhooks/standard-webhooks/issues"},"author":{"name":"Standard Webhooks"},"license":"MIT","homepage":"https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries/javascript","keywords":["webhooks","typescript"],"repository":{"url":"git+https://github.com/standard-webhooks/standard-webhooks.git","type":"git"},"description":"Standard Webhooks for TypeScript","maintainers":[{"name":"tasn","email":"npm@stosb.com"}],"readme":"Typescript/Javascript library for Standard Webhooks \n\n# Example\n\nVerifying a webhook payload:\n\n```javascript\nimport { Webhook } from \"standardwebhooks\"\n\nconst wh = new Webhook(base64_secret);\nwh.verify(webhook_payload, webhook_headers);\n```\n\n`webhook_payload` must be the raw request body exactly as received, before any JSON parsing.\nPass it as a `Buffer` or `Uint8Array` to verify the bytes as sent, including bodies that aren't\nvalid UTF-8. A string is verified as its UTF-8 encoding.\n\nResponding to [endpoint verification](../../spec/extensions/endpoint-verification.md):\n\n```javascript\nconst challenge = webhook_headers[\"webhook-challenge\"];\nif (challenge) {\n  response_headers[\"webhook-challenge-response\"] = wh.endpointVerificationResponse(challenge);\n  // Not a webhook delivery: respond (e.g. with 204 No Content) without processing the body\n  return;\n}\n```\n\nVerifying the response as a producer (throws `WebhookVerificationError` if it doesn't match):\n\n```javascript\nwh.verifyEndpointVerificationResponse(challenge, response_headers[\"webhook-challenge-response\"]);\n```\n\n# Development\n\n## Requirements\n\n - node\n - npm\n\n## Building the library\n```sh\nnpm install\nnpm run build\n```\n\n## Contributing\n\nBefore opening a PR be sure to format your code!\n\n```sh\nnpm run check:fix\n```\n\n## Running Tests\n\nSimply run:\n\n```sh\nnpm test\n```\n","readmeFilename":"README.md"}