View as Markdown

SDK reference · Rails

verifyIpCommitment

verifyIpCommitment in @provenanceauth/rails/checkout, Rails. Check that the approving device's IP you received with a checkout approval (signals.browser.ip and ip_nonce) is the one Provenance saw: commitment (from the decision record, the receipt or an evidence pack) is the hex SHA-256 of the IP's UTF-8 bytes followed by the 16 nonce bytes (base64url).

Signature

verifyIpCommitment(ip: string, nonce: string, commitment: string): Promise<boolean>

Parameters

ipstringRequired
noncestringRequired
commitmentstringRequired

Returns

Promise<boolean>

HTTP operation

Runs locally, with no request to the API.

Was this page helpful? Send us feedback

LLM? Read llms.txt.