Skip to main content

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.

This guide shows how to install and initialize the official Alpha Vault TypeScript SDK, @meteora-ag/alpha-vault. Before you begin, here are the main resources:

TypeScript SDK

SDK source, IDL, transaction helpers, PDA helpers, Merkle tree helpers, and package metadata.

NPM Package

Published package for Alpha Vault TypeScript integrations.

Installation

Install the SDK and Solana dependencies:
npm install @meteora-ag/alpha-vault @solana/web3.js @solana/spl-token @coral-xyz/anchor bn.js

Initialization

Load an existing Alpha Vault from its vault address:
import AlphaVault, { VaultState } from "@meteora-ag/alpha-vault";
import { Connection, PublicKey } from "@solana/web3.js";

const connection = new Connection(process.env.RPC_URL!, "confirmed");
const vaultAddress = new PublicKey("ALPHA_VAULT_ADDRESS");

const alphaVault = await AlphaVault.create(connection, vaultAddress, {
  cluster: "mainnet-beta",
});

console.log(alphaVault.vaultState === VaultState.DEPOSITING);
console.log(alphaVault.vaultPoint);
The package default export is the AlphaVault client class. Named exports include enums, types, PDA helpers, Merkle tree helpers, fill helpers, constants, and the IDL.

Program ID

The SDK maps clusters to these Alpha Vault program IDs:
ClusterProgram ID
mainnet-betavaU6kP7iNEGkbmPkLmZfGwiGxd4Mob24QQCie5R9kd2
devnetvaU6kP7iNEGkbmPkLmZfGwiGxd4Mob24QQCie5R9kd2
localhostSNPmGgnywBvvrAKMLundzG6StojyHTHDLu7T4sdhP4k

First Reads

Use these methods and getters before building transactions:
APIUse
AlphaVault.create(connection, vaultAddress, opt?)Fetches vault, clock, mints, and connected pool timing into an AlphaVault instance.
alphaVault.vaultDecoded on-chain Vault account.
alphaVault.modeSDK VaultMode value derived from vault.vaultMode.
alphaVault.vaultPointFirst join, last join, last buying, start vesting, and end vesting points.
alphaVault.vaultStateCurrent lifecycle state from the clock and vault timing.
alphaVault.getEscrow(owner)Fetches the owner escrow PDA or returns null.
alphaVault.interactionState(escrow, merkleProof?)Computes UI-ready deposit, claim, withdrawal, and whitelist booleans.

Reference

SDK Examples

Explore transaction flows for deposits, claims, fills, Merkle proofs, and authority-created escrows.

SDK Reference

Access the SDK method map, PDA helpers, constants, enums, and exported types.

Testing The SDK

The local SDK package uses tsup for builds and Jest for tests.
cd alpha-vault-sdk/ts-client
npm install
npm run build
npm test
Some tests require local validator fixtures and launch-pool artifacts. For application integrations, simulate transactions and test the exact vault and pool configuration before mainnet use.

Faucets

Devnet Faucet

Request test SOL for devnet integration testing.