lootably-postback-hash
Version:
A library for generating Lootably postback hashes
21 lines (20 loc) • 919 B
TypeScript
/**
* Generates a SHA256 postback hash for a Lootably postback.
*
* @param {Object} params - The parameters for generating the hash.
* @param {string} params.userID - The user's ID from the postback.
* @param {string} params.ip - The user's IP address from the postback.
* @param {string} params.revenue - The revenue amount from the postback.
* @param {string} params.currencyReward - The currency reward amount from the postback.
* @param {string} params.postbackSecret - The secret key for your Lootably placement.
* @param {boolean} [params.debug] - Optional. If true, logs debug information.
* @returns {string} The generated SHA256 hash.
*/
export declare function generateSHA256PostbackHash({ userID, ip, revenue, currencyReward, postbackSecret, debug, }: {
userID: string;
ip: string;
revenue: string;
currencyReward: string;
postbackSecret: string;
debug?: true;
}): string;