This guide provides instructions on how to get started with building on Meteora’s Alpha Vault program using the Alpha Vault TypeScript SDK.Before you begin, here are some important resources:
Once installed, you can initialize the SDK in your TypeScript/JavaScript project like this:
Copy
Ask AI
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 addressconst vault = new PublicKey("H5g71iFUErXyF5D2NcDxP2bJuhdrPBjnDtrVMuPBtnWz");// Create a new instance of the AlphaVaultconst alphaVault = await AlphaVault.create(connection, vault.publicKey);