> ## 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.

# Presale Vault Developer Guide

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

Presale Vault is Meteora's presale program on Solana. It lets creators run a token presale where buyers deposit a quote token and later claim allocated base tokens after the presale completes. For concepts such as vault modes, configuration, Token 2022 support, access states, and formulas, you can read the following documentations.

<CardGroup cols={2}>
  <Card title="Learn more about Presale Vault" icon="book-open" iconType="solid" href="/helper-products/presale-vault/what-is-presale-vault">
    Overview of Presale Vault modes, access controls, lifecycle states, and token support.
  </Card>

  <Card title="Presale Vault Formulas" icon="calculator" iconType="solid" href="/helper-products/presale-vault/formulas">
    Formulas and definitions for allocation, caps, refunds, fees, and vesting behavior.
  </Card>
</CardGroup>

## Integration

<CardGroup cols={2}>
  <Card title="Program Accounts" icon="table-cells" iconType="solid" href="/developer-guides/presale-vault/program/accounts">
    Account model for presales, registries, escrows, Merkle roots, operators, fixed-price params, and permissioned metadata.
  </Card>

  <Card title="Program Instructions" icon="list" iconType="solid" href="/developer-guides/presale-vault/program/instructions">
    Instruction families for initialization, escrow creation, deposits, withdrawals, claims, creator actions, and metadata.
  </Card>

  <Card title="Program Events" icon="list" iconType="solid" href="/developer-guides/presale-vault/program/events">
    Event payloads emitted by presale creation, escrow actions, deposits, claims, refunds, and creator actions.
  </Card>

  <Card title="Program Errors" icon="triangle-exclamation" iconType="solid" href="/developer-guides/presale-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/presale-vault/typescript-sdk/getting-started">
    TypeScript SDK for creating presales, escrows, deposits, claims, refunds, metadata, and state readers.
  </Card>

  <Card title="Rust Integration" icon="terminal" iconType="solid" href="/developer-guides/presale-vault/rust-integration/cpi">
    Rust integration notes for the CPI feature, generated clients, and tests.
  </Card>
</CardGroup>

## Program IDs

The `presale` program ID is the same on mainnet and devnet:

| Network      | Program ID                                    |
| ------------ | --------------------------------------------- |
| Mainnet Beta | `presSVxnf9UU8jMxhgSMqaRwNiT36qeBdNeTRKjTdbj` |
| Devnet       | `presSVxnf9UU8jMxhgSMqaRwNiT36qeBdNeTRKjTdbj` |

The program authority PDA used by vault transfers is:

| Authority         | Address                                        |
| ----------------- | ---------------------------------------------- |
| Presale Authority | `4Xgt6XKZiowAGNdPWngVAwpYbSwAmbBnRBPtCFXhrypc` |

<CardGroup cols={2}>
  <Card title="Presale Vault Program" icon="code" href="https://github.com/MeteoraAg/presale/tree/main/programs/presale">
    Public Anchor program source for Presale Vault.
  </Card>

  <Card title="Presale Vault IDL" icon="file-code" href="https://github.com/MeteoraAg/presale-sdk/blob/main/src/idl/presale.json">
    Published Anchor IDL used by generated clients and the TypeScript SDK.
  </Card>
</CardGroup>

<CardGroup cols={1}>
  <Card title="TypeScript SDK" icon="node-js" iconType="solid" href="https://github.com/MeteoraAg/presale-sdk">
    Public SDK for transactions, PDA derivation, account wrappers, math helpers, and examples.
  </Card>
</CardGroup>

<Note>
  The program does not deploy liquidity with raised capital. Creators withdraw completed presale funds and handle downstream liquidity deployment themselves.
</Note>

## Commands

| Task                                | Command                                              |
| ----------------------------------- | ---------------------------------------------------- |
| Install TypeScript SDK dependencies | `cd presale-sdk && pnpm install`                     |
| Build TypeScript SDK                | `cd presale-sdk && pnpm run build`                   |
| Run TypeScript SDK tests            | `cd presale-sdk && pnpm test`                        |
| Build `presale` program             | `cd presale && anchor build`                         |
| Run Rust program tests              | `cd presale && cargo test -p presale -- --nocapture` |

## Stay Updated

<CardGroup cols={1}>
  <Card title="Presale Vault Changelog" icon="newspaper" iconType="solid" href="/developer-guides/presale-vault/changelog">
    Program and SDK changes for integration planning.
  </Card>
</CardGroup>
