A minimal Node.js server that verifies Ramp Network webhook signatures.
- Install dependencies:
npm install-
Place your Ramp Network public key in
ramp-network.public.pem -
Start the server:
npm start- Optional: tunnel requests through ngrok
- install ngrok and authenticate
- start the server with
npm start - run
ngrok http 3000
- Receives webhook POSTs on
/ - Verifies
X-Body-Signatureheader using secp256k1 ECDSA - Uses stable JSON stringify for consistent message formatting
- Returns 204 for valid signatures, 401 for invalid
express- Web serverfast-json-stable-stringify- Deterministic JSON serialization
index.js- Main server (~60 lines, super simple!)package.json- Dependenciesramp-network.public.pem- Your public key file