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.

GET/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>"
Parameters
ParameterDescription
hash

query · string · required

The compressed account's leaf hash, base58. Required.
chain

path · 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.

Response fields of The Merkle proof of one ZK-compressed account, Solana only
FieldTypeDescription
hashstringThe leaf hash asked about.
foundbooleanTrue when a leaf with this hash is in a state tree now.
slotinteger | nullThe slot the tree was read at; null when nothing was found.
proofobject | nullThe inclusion proof. Null whenever found is false.
proof.treestringThe state tree holding the leaf.
proof.rootstringThe tree root this proof verifies against.
proof.rootSeqintegerThat root's sequence number; it moves every time the tree changes.
proof.leafIndexintegerThe leaf's position in the state tree.
proof.pathstring[]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