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

Before you begin, here are some important resources:

  • Program ID (Mainnet & Devnet): FEESngU3neckdwib9X3KWqdL7Mjmqk9XNp3uh5JbP4KP
  • TypeScript SDK Repository: @meteora-ag/m3m3

Installation

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

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

Initialization

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

import StakeForFee from "@meteora-ag/m3m3";
import { PublicKey } from "@solana/web3.js";

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

// Intialize the DAMM v1 pool
const poolAddress = new PublicKey(
  "G2MRSjNjCbFUmMf32Z1aXYhy6pc1ihLyYg6orKedyjJG"
);

// Create a new instance of the Stake2Earn
const stake2earn = await Stake2Earn.create(connection, poolAddress);

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