x402 exact EIP-3009 nonce rules.
Native Payment-auth credentials use MPP.Methods.EVM.Authorization.challenge_hash/2
(keccak256(id <> realm)). x402 exact uses a random 32-byte nonce, or an
mppx extension-bound SHA-256 nonce when extensions.mppx is present
(refs/mppx/src/x402/client/Exact.ts and internal/RouteBinding.ts). The
two contracts must not accept each other's nonces.
Summary
Functions
Return true when nonce is the native challengeHash for id/realm.
Return the x402 exact nonce contract for this payload (:random or :extension_bound).
Compute the mppx extension-bound nonce.
Generate a random 32-byte 0x-prefixed EIP-3009 nonce.
Insert a fresh info.nonce salt under extensions.mppx for extension-bound signing.
Functions
Return true when nonce is the native challengeHash for id/realm.
Used to prove the shared signing primitive cannot satisfy the x402 contract by presenting a native nonce, and vice versa.
@spec contract(map() | nil) :: :random | :extension_bound
Return the x402 exact nonce contract for this payload (:random or :extension_bound).
Compute the mppx extension-bound nonce.
SHA-256 of serialize(accepted)|serialize(resource)|serialize(extensions)
where serialize is JCS then base64url (no padding), matching
refs/mppx/src/x402/internal/RouteBinding.ts.
@spec random() :: String.t()
Generate a random 32-byte 0x-prefixed EIP-3009 nonce.
Insert a fresh info.nonce salt under extensions.mppx for extension-bound signing.