This is a simple KV merkle proof hosting service used to serve Meteora Alpha Vault merkle proofs permissionlessly by using Cloudflare KV.
- Node.js
- A registered cloudflare account
git clone https://github.com/MeteoraAg/cloudflare-kv-merkle-proof
npm install --save-dev
npx wrangler kv namespace create <BINDING_NAME>
Example
npx wrangler kv namespace create alpha-vault-merkle-proof
Then, should should get a response like below
🌀 Creating namespace with title "alpha-vault-merkle-proof"
✨ Success!
Add the following to your configuration file in your kv_namespaces array:
{
"kv_namespaces": [
{
"binding": "alpha_vault_merkle_proof",
"id": "<namespace_id>"
}
]
}
Copy the output from step 2 and paste it into wrangler.jsonc file
Example
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "kv-merkle-proof",
"main": "src/index.ts",
"compatibility_date": "2025-06-12",
"observability": {
"enabled": true
},
"kv_namespaces": [
{
"binding": "alpha_vault_merkle_proof",
"id": "<namespace_id>"
}
]
}
Run
npx wrangler types
Run
npm run deploy
You should get a response like below
Total Upload: 51.51 KiB / gzip: 12.41 KiB
Your Worker has access to the following bindings:
Binding Resource
env.alpha_vault_merkle_proof (<namespace_id>) KV Namespace
Uploaded kv-merkle-proof (4.30 sec)
Deployed kv-merkle-proof triggers (2.97 sec)
<URL>
Current Version ID: <VERSION_ID>
Copy the worker URL for creation of MerkleProofMetadata account and automatic merkle proof uploading from meteora-pool-setup
If you wish to serve the merkle proofs without using Cloudflare KV, please make sure you follow the following API specification.
Note: Make sure cors is enabled on your server
| Method | Endpoint | Description | Example | Note |
|---|---|---|---|---|
| GET | /{vault_address}/{wallet_address} | Return merkle proof for the given vault address and wallet address | https://worker.meteora.ag/merkle-root-config-proof/FJVRfGznTvNGYHkrk7jWRneAtSyNFabbwgW3tfJDgAQH/5unTfT2kssBuNvHPY6LbJfJpLqEcdMxGYLWHwShaeTLi | The base URL https://worker.meteora.ag/merkle-root-config-proof need to be stored in AlphaVault contract MerkleProofMetadata PDA account |
| Code | Type | Schema | Example |
|---|---|---|---|
| 200 | application/json | { merkle_root_config: string, max_cap: number, proof: number[][] } |
{"merkle_root_config":"6p97ZXYJn76jJqpsjWM8gQUJjx1BPbzVW7g4tpkV27FY","max_cap":50000000000,"proof":[[92,238,252,175,113,225,88,203,116,137,193,239,99,36,202,36,59,188,185,87,44,218,247,74,206,43,106,122,84,65,50,34]]} |