Skip to content

Function: requirementsHash() ​

ts
function requirementsHash(requirements): string;

Defined in: packages/x402-core/src/hashing.ts:26

requirementsHash — SHA-256 hex of the canonical PaymentRequirements: a stable id for this exact (resource, amount, payTo, …). The canonicalizer walks the whole object structurally, so it's scheme-agnostic in the asset/extra seams — hence the widened X402PaymentRequirements<unknown> parameter.

Parameters ​

requirements ​

X402PaymentRequirements<unknown>

Returns ​

string