Once installed, you can initialize the SDK in your TypeScript/JavaScript project like this:
Copy
Ask AI
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 poolconst poolAddress = new PublicKey( "G2MRSjNjCbFUmMf32Z1aXYhy6pc1ihLyYg6orKedyjJG");// Create a new instance of the Stake2Earnconst stake2earn = await Stake2Earn.create(connection, poolAddress);