@warpfi/node is the server-side SDK for the Warp API. It wraps the /v1 endpoints with typed methods, maps errors to classes, retries safe requests, and verifies webhook signatures. It has no runtime dependencies and needs Node.js 18 or later.
npm · GitHub · Set up with examples
Install
Create a session
sk_test_ keys create testnet sessions and sk_live_ keys create mainnet sessions. warp.mode is 'test' or 'live'. CommonJS works too: const { Warp } = require('@warpfi/node').
To show the checkout on your own page instead of redirecting, return checkout_url to the browser and use the embedded checkout.
Retrieve and list sessions
Webhooks
Verify each delivery against the raw request body:constructEvent rejects a missing or malformed header, a signature mismatch, and timestamps more than 300 seconds from your clock (pass a fourth argument to change the tolerance). verifySignature and generateTestHeader are also exported standalone and do not need an API key. See Webhooks for events and retries.
ZK proofs
warp.zk.proofs.getInterface(proofId) returns the deployed verifier’s address, chain and ABI. warp.attestations.retrieve(id) calls the public attestation endpoint without your key.
Errors
Every error is aWarpError with message, status, code and requestId (the X-Request-Id header; include it when you contact support).
Configuration
Source: github.com/WarpCompany/warp-node. Package: npmjs.com/package/@warpfi/node.