What causes an intent hash mismatch?
Theintent_hash_mismatch error occurs during raw validation (POST /api/validate/raw) when the intentHash submitted by the client does not match the server’s recomputation from the same transaction parameters. The server computes its own hash from the parameters you send and compares it to your submitted hash. Any difference in formatting, casing, or value causes a mismatch.
This error only applies to raw validation. Action-based validation (
POST /validate) does not use intent hashes. If you are building a new integration, use action-based validation and skip this page entirely.The canonical hash format
The intent hash is computed as:Debugging checklist
Work through these 7 checks in order. Most mismatches are caused by items 1 through 3.1. Verify the nonce is current
The nonce must be the next unused nonce for the sending address. If you fetched the nonce earlier and another transaction was sent in between, your nonce is stale. Fetch the nonce immediately before computing the hash.2. Lowercase all addresses
Theto field must be lowercase in the hash computation. The most common mistake is using a checksummed (mixed-case) address.
3. Gas estimation may differ
If you estimate gas, then compute the hash, then re-estimate gas, the values may change. Use fixed gas values during testing. In production, estimate once and use the same values for both the hash and the transaction.4. accessList must be an empty array
TheaccessList field must be [] (an empty JSON array), not undefined, null, or omitted. The server serializes it as "[]" in the canonical string.
5. txType must be 2
ThetxType field must be 2 (EIP-1559). Type 0 (legacy) and type 1 (EIP-2930) transactions are not supported.
6. Calldata must include 0x prefix and be lowercase
Thecalldata field must start with 0x and use lowercase hex characters.
7. valueWei must be a string
ThevalueWei field must be a string, not a BigInt or number. JavaScript’s BigInt does not serialize to JSON the same way as a string.
Use the SDK function
The safest approach is to use the SDK’scomputeIntentHash() function. It handles all formatting, casing, and serialization automatically.
computeIntentHash(), mismatches should not occur unless the nonce is stale.
Still getting mismatches?
If you have verified all 7 items and the error persists, log the canonical string before hashing and compare it character by character with the expected format:Next Steps
Intent Hash Concepts
How the intent hash binds validation to execution.
SDK computeIntentHash
SDK function reference for hash computation.
Common Errors
Solutions for other frequent Mandate errors.