> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
> Use this file to discover all available pages before exploring further.

# Alpha Vault Developer Guide

> Learn how to build Alpha Vault integrations with the Anchor program, TypeScript SDK, Rust CPI notes, account reference, events, errors, and release notes.

Alpha Vault is Meteora's pre-launch allocation program for DLMM, DAMM v1, and DAMM v2 Launch Pools. Users deposit the pool quote token into a vault before public trading starts; the vault buys the launch token from the connected pool during the protected pre-activation window, then users claim bought tokens and withdraw unused quote according to the vault configuration.

For product and economic concepts, you can read the following documentations.

<CardGroup cols={2}>
  <Card title="Learn more about Alpha Vault" icon="book-open" iconType="solid" href="/helper-products/alpha-vault/what-is-alpha-vault">
    Overview of the Alpha Vault lifecycle, pool linkage, deposit window, purchase window, and claim flow.
  </Card>

  <Card title="Alpha Vault Formulas" icon="calculator" iconType="solid" href="/helper-products/alpha-vault/formulas">
    Formulas and definitions for allocation, refund, vesting, and rounding.
  </Card>
</CardGroup>

## Integration

<CardGroup cols={2}>
  <Card title="Program Accounts" icon="table-cells" iconType="solid" href="/developer-guides/alpha-vault/program/accounts">
    Account model for vaults, escrows, configs, Merkle roots, Merkle proof metadata, crank fee whitelists, PDAs, enums, and constants.
  </Card>

  <Card title="Program Instructions" icon="list" iconType="solid" href="/developer-guides/alpha-vault/program/instructions">
    Instruction families for vault creation, escrow creation, deposits, withdrawals, claims, fills, metadata, authority, and admin config.
  </Card>

  <Card title="Program Events" icon="list" iconType="solid" href="/developer-guides/alpha-vault/program/events">
    Event payloads emitted by vault creation, escrow actions, fills, claims, refunds, Merkle metadata, and crank fee whitelist changes.
  </Card>

  <Card title="Program Errors" icon="triangle-exclamation" iconType="solid" href="/developer-guides/alpha-vault/program/errors">
    Anchor custom error codes, enum names, messages, and common integration causes.
  </Card>

  <Card title="TypeScript SDK" icon="code" iconType="solid" href="/developer-guides/alpha-vault/typescript-sdk/getting-started">
    TypeScript SDK for reading vault state, creating vaults and escrows, deposits, withdrawals, claims, fills, and Merkle helpers.
  </Card>

  <Card title="Rust Integration" icon="terminal" iconType="solid" href="/developer-guides/alpha-vault/rust-integration/cpi">
    Rust integration notes for the Anchor crate, `cpi` feature, account types, and CPI call patterns.
  </Card>
</CardGroup>

## Program IDs

The public Alpha Vault program ID is the same on mainnet and devnet:

| Network          | Program ID                                    |
| ---------------- | --------------------------------------------- |
| Mainnet Beta     | `vaU6kP7iNEGkbmPkLmZfGwiGxd4Mob24QQCie5R9kd2` |
| Devnet           | `vaU6kP7iNEGkbmPkLmZfGwiGxd4Mob24QQCie5R9kd2` |
| Localnet feature | `SNPmGgnywBvvrAKMLundzG6StojyHTHDLu7T4sdhP4k` |

The program treasury used for escrow fees and crank fees is:

| Account              | Address                                        |
| -------------------- | ---------------------------------------------- |
| Alpha Vault treasury | `BJQbRiRWhJCyTYZcAuAL3ngDCx3AyFQGKDq8zhiZAKUw` |

<CardGroup cols={2}>
  <Card title="Alpha Vault IDL" icon="file-code" href="https://github.com/MeteoraAg/alpha-vault-sdk/blob/main/ts-client/src/alpha-vault/alpha_vault.json">
    Anchor IDL used by the TypeScript SDK.
  </Card>

  <Card title="TypeScript SDK" icon="node-js" iconType="solid" href="https://github.com/MeteoraAg/alpha-vault-sdk">
    Public SDK for transactions, PDA derivation, account wrappers, Merkle helpers, and examples in tests.
  </Card>
</CardGroup>

<Note>
  Alpha Vault must be connected to a launch pool whose state points back to the vault address. The vault does not price swaps itself; fills call into the connected DLMM, DAMM v1, or DAMM v2 pool.
</Note>

## Commands

| Task                                | Command                                         |
| ----------------------------------- | ----------------------------------------------- |
| Install TypeScript SDK dependencies | `cd alpha-vault-sdk/ts-client && npm install`   |
| Build TypeScript SDK                | `cd alpha-vault-sdk/ts-client && npm run build` |
| Run TypeScript SDK tests            | `cd alpha-vault-sdk/ts-client && npm test`      |
| Build `alpha_vault` program         | `cd alpha-vault && anchor build`                |
| Run Anchor program tests            | `cd alpha-vault && anchor test`                 |

## Stay Updated

<CardGroup cols={1}>
  <Card title="Alpha Vault Changelog" icon="newspaper" iconType="solid" href="/developer-guides/alpha-vault/changelog">
    Program, SDK, event, and integration notes for release planning.
  </Card>
</CardGroup>
