This guide provides instructions on how to get started with the Alpha Vault TypeScript SDK.

Before you begin, here are some important resources:

Installation

To use the SDK in your project, install it using your preferred package manager:

npm install @meteora-ag/alpha-vault @solana/web3.js
# or
pnpm install @meteora-ag/alpha-vault @solana/web3.js
# or
yarn add @meteora-ag/alpha-vault @solana/web3.js

Initialization

Once installed, you can initialize the SDK in your TypeScript/JavaScript project like this:

import { Connection } from "@solana/web3.js";
import { AlphaVault } from "@meteora-ag/alpha-vault";

// Initialize a connection to the Solana network (e.g., Mainnet)
const connection = new Connection("https://api.mainnet-beta.solana.com");

// Intialize the Alpha Vault address
const vault = Keypair.generate();

// Create a new instance of the AlphaVault
const alphaVault = await AlphaVault.create(connection, vault.publicKey);

Testing the SDK (for contributors)

If you have cloned the SDK repository and want to run the built-in tests:

# Install dependencies
cd ts-client
bun install

# Run tests
bun test

Development Resources

Faucets