PaymentReferenceCalculator

Description

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.

Usage

import { PaymentReferenceCalculator } from "@requestnetwork/request-client.js";

Static method: calculate()

Parameters

Name
Type
Required
Description

requestId

string

The ID of the request

salt

string

The salt of the request

address

string

Payment recipient address

Returns

string

Implementation

Last updated

Was this helpful?