Chains API
Is this compressed address still free, and what proves it
Says whether one address is still unused in a Solana ZK-compression address tree, and returns the non-inclusion proof — root, neighbours and Merkle path — a program needs to create it there.
/api/external/chain-analysis/compressed-address-proof/{chain}/{address}What it returns
Answers whether one address is still unused in a Solana ZK-compression address tree, and when it is, returns the non-inclusion proof a program needs to create it: the tree root and its sequence number, the two addresses the new one would sit between, their leaf indexes and the Merkle path. unused: false is a full answer, not an error — the tree already holds the address and nobody can create it again — and it carries no proof. Name a tree to ask about one address tree; with none, the default address tree is used and named back in tree. The answer is about that ONE tree: a compressed account's address does not have to live in the default tree, so unused: true there does not mean no account uses the address on Solana. The proof is read at the slot in slot and ages with the tree: every compressed address anyone creates moves the root, 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-address-proof/SOL/<address>"
| Parameter | Description |
|---|---|
treequery · string · optional | The address tree to ask about, base58. Omit it for the default address tree. An address that is not an indexed address tree returns 400. |
chainpath · string · required | SOL. Every other chain returns 400: compressed addresses live in an address tree, a Solana construct. |
addresspath · string · required | A base58 32-byte address in a ZK-compression address tree, typically derived from a seed before anything is created at it. Not a wallet or contract address in the ordinary account space: an address tree is its own namespace, and the same value in two trees is two addresses. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
address | string | The address asked about. |
tree | string | null | The address tree the answer is about. Null only when the address is already taken in the default tree: the answer to that is a refusal, which names no tree. |
unused | boolean | True when THIS tree does not hold the address yet, so a program can still create it in this tree. Says nothing about any other address tree: an address already used by a live account in another tree still reads true here. |
slot | integer | null | The slot the tree was read at; null on the refusal described under tree. |
proof | object | null | The non-inclusion proof. Null whenever unused is false: a taken address has nothing to prove. |
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.lowerRangeAddress | string | The largest address in the tree below the one asked about. |
proof.higherRangeAddress | string | The next address above it. The highest element's neighbour wraps to the all-zero address. |
proof.lowElementLeafIndex | integer | The leaf index of lowerRangeAddress. |
proof.nextIndex | integer | The next pointer stored on lowerRangeAddress: the leaf index of higherRangeAddress. Not the index the new address would take. |
proof.path | string[] | The sibling hashes from that 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