• Validates a payload from Discord against its signature and key.

    Parameters

    • rawBody: string | ArrayBuffer | Uint8Array | Buffer

      The raw payload data

    • signature: string | ArrayBuffer | Uint8Array | Buffer

      The signature from the X-Signature-Ed25519 header

    • timestamp: string | ArrayBuffer | Uint8Array | Buffer

      The timestamp from the X-Signature-Timestamp header

    • clientPublicKey: string | ArrayBuffer | Uint8Array | Buffer

      The public key from the Discord developer dashboard

    Returns boolean

    Whether or not validation was successful

Generated using TypeDoc