Compute the payment reference, the last 8 bytes of a salted hash of the request ID.
last8Bytes(hash(lowercase(requestId + salt + address)))The payment reference is the parameter that ties the request to events emitted by on-chain payments via Request Network payment smart contracts.
import { PaymentReferenceCalculator } from "@requestnetwork/request-client.js";| Name | Type | Required | Description |
|---|---|---|---|
| requestId | string | true | The ID of the request |
| salt | string | true | The salt of the request |
| address | string | true | Payment recipient address |
string
{% @github-files/github-code-block url="https://github.com/RequestNetwork/requestNetwork/blob/master/packages/payment-detection/src/payment-reference-calculator.ts" %}