Express middleware for validating GitHub webhook payloads using GitToken's Ethereum-based token system (v0.2.x). Provides HMAC signature verification with the webhook secret stored on-chain via ERC20 tokens. Key differentiator: integrates blockchain-based authorization directly into webhook handling, enabling token-gated CI/CD pipelines. Compatible with Express 4.x. Not suitable for non-GitHub webhooks or stateless applications. Release cadence: monthly updates.
npm install gittoken-api-middlewareVerified import paths — ran on the pinned version, not inferred.
Sets up Express server with GitToken middleware validating GitHub webhooks using on-chain secret.
Use express.raw() or body-parser with verify option to keep raw buffer
Pin exact version in package.json
Use const { default: gittokenApiMiddleware } = require('gittoken-api-middleware');Ensure express.raw() is used before middleware and body is JSON