Chains API
The Merkle proof of one ZK-compressed account, Solana only
The inclusion proof of a Solana ZK-compressed account by leaf hash — state tree, root, sequence, leaf index and Merkle path — or that no leaf carries the hash now.
/api/external/chain-analysis/compressed-account-proof/{chain}What it returns
Returns the inclusion proof of one Solana ZK-compressed account, by its leaf hash: the state tree, the root the proof verifies against and its sequence number, the leaf index and the Merkle path. A program that reads or spends the account verifies this proof. found: false is a full answer, not an error: no leaf carries the hash now — the account was spent (every write replaces its leaf and hash) or never existed. The leaf hash of an account comes from compressed-accounts. The proof ages with the tree, so submit it promptly or ask again.
Chains
- Solana SOL
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/chain-analysis/compressed-account-proof/SOL?hash=<hash>"
| Parameter | Description |
|---|---|
hashquery · string · required | The compressed account's leaf hash, base58. Required. |
chainpath · string · required | SOL. Every other chain returns 400: compressed accounts live in Solana ZK-compression state trees. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
hash | string | The leaf hash asked about. |
found | boolean | True when a leaf with this hash is in a state tree now. |
slot | integer | null | The slot the tree was read at; null when nothing was found. |
proof | object | null | The inclusion proof. Null whenever found is false. |
proof.tree | string | The state tree holding the leaf. |
proof.root | string | The tree root this proof verifies against. |
proof.rootSeq | integer | That root's sequence number; it moves every time the tree changes. |
proof.leafIndex | integer | The leaf's position in the state tree. |
proof.path | string[] | The sibling hashes from the leaf up to the root, bottom first. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key