# lootably-postback-hash

> A library for generating Lootably postback hashes

Latest version **2.0.0** (published 2024-10-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install lootably-postback-hash
pnpm add lootably-postback-hash
yarn add lootably-postback-hash
bun add lootably-postback-hash
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2024-10-04 |
| First published | 2021-03-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lootably, Inc. |
| Maintainers | joshverd |
| Keywords | typescript, types, lootably, postback, hash |

## Links

- npm: https://www.npmjs.com/package/lootably-postback-hash
- Repository: https://github.com/lootably/lootably-postback-hash
- Homepage: https://github.com/lootably/lootably-postback-hash#readme
- Issues: https://github.com/lootably/lootably-postback-hash/issues
- npm.io page: https://npm.io/package/lootably-postback-hash

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) ^22.7.4

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2024-10-04
- 1.0.2 — 2021-03-17
- 1.0.1 — 2021-03-16
- 1.0.0 — 2021-03-16

## README

# Lootably Postback Hash

A TypeScript library for generating Lootably SHA256 postback hashes.

## Installation

```bash
npm install lootably-postback-hash
```

## Usage

```typescript
import { generateSHA256PostbackHash } from 'lootably-postback-hash';

const hash = generateSHA256PostbackHash({
  userID: 'example_user_123',
  ip: '192.0.2.1',
  revenue: '0.5000',
  currencyReward: '100.00',
  postbackSecret: process.env.LOOTABLY_POSTBACK_SECRET,
});

console.log('Generated hash:', hash);
```

**Note:** Ensure that the environment variable `LOOTABLY_POSTBACK_SECRET` is set before running the script.

### Parameters

The `generateSHA256PostbackHash` function accepts an object with the following properties:

- `userID` (string): The user's ID from the postback.
- `ip` (string): The user's IP address from the postback.
- `revenue` (string): The revenue amount from the postback.
- `currencyReward` (string): The currency reward amount from the postback.
- `postbackSecret` (string): The secret key for your Lootably placement.
- `debug` (boolean, optional): If true, logs debug information.

## API Documentation

For detailed information about the Lootably API and postback system, please refer to the [Lootably Postback Documentation](https://documentation.lootably.com/docs/postbacks).

## Contact

If you have any questions or need assistance, please email us at [business@lootably.com](mailto:business@lootably.com) or reach out to your Lootably contact.

---
_Source: https://npm.io/package/lootably-postback-hash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
