import crypto from "crypto";
function verify(request) {
const supahubNonce = request.headers["X-Supahub-Nonce"];
const supahubSignature = request.headers["X-Supahub-Signature"];
const APIKey = "YOUR_API_KEY";
const calculated = crypto
.createHmac("sha256", APIKey)
.update(supahubNonce)
.digest("base64");
return supahubSignature === calculated;
}