UNPKG

@hookflo/tern

Version:

A robust, scalable webhook verification framework supporting multiple platforms and signature algorithms

7 lines (6 loc) 562 B
import { PlatformAlgorithmConfig, WebhookPlatform, SignatureConfig } from "../types"; export declare const platformAlgorithmConfigs: Record<WebhookPlatform, PlatformAlgorithmConfig>; export declare function getPlatformAlgorithmConfig(platform: WebhookPlatform): PlatformAlgorithmConfig; export declare function platformUsesAlgorithm(platform: WebhookPlatform, algorithm: string): boolean; export declare function getPlatformsUsingAlgorithm(algorithm: string): WebhookPlatform[]; export declare function validateSignatureConfig(config: SignatureConfig): boolean;