Skip to main content
POST
/
merkle
/
validate
Validate a Merkle proof
curl --request POST \
  --url https://api.timelockdata.com/api/v1/merkle/validate \
  --header 'Content-Type: application/json' \
  --data '
{
  "txId": "<string>",
  "merkleRoot": "<string>",
  "proof": [
    {
      "hash": "<string>",
      "position": "left"
    }
  ]
}
'
{
  "status": "<string>",
  "valid": true,
  "computedRoot": "<string>",
  "expectedRoot": "<string>",
  "error": "<string>"
}
No authentication required. Submit a Merkle proof for server-side validation. The API recomputes the root from the provided proof path and compares it against the expected root.

Body

application/json
txId
string
required

Transaction ID to validate

merkleRoot
string
required

Merkle root to validate against

proof
object[]
required

Merkle proof path

Response

200 - application/json

Validation result

status
string
required

Response status

valid
boolean
required

Whether the proof is valid

computedRoot
string

Computed root from proof

expectedRoot
string

Expected root

error
string

Error message if applicable