Skip to main content
This guide provides instructions on how to get started with building on Meteora’s DAMM v1 Farming program using the Farming TypeScript SDK. Before you begin, here are some important resources:

Farming Typescript SDK

Meteora DAMM v1 Farming Typescript SDK

Farming NPM Package

Meteora DAMM v1 Farming NPM Package

Installation

To use the Farming SDK in your project, install it using your preferred package manager:
npm install @meteora-ag/dynamic-amm-sdk @meteora-ag/farming-sdk @solana/web3.js

Initialization

Once installed, you can initialize the Farming SDK in your TypeScript/JavaScript project like this:
import { PoolFarmImpl } from "@meteora-ag/farming-sdk";
import { Connection } from "@solana/web3.js";

// Connection, Wallet, and AnchorProvider to interact with the network
const mainnetConnection = new Connection("https://api.mainnet-beta.solana.com");

const farmingPools = await PoolFarmImpl.getFarmAddressesByPoolAddress(
  USDC_acUSDC_POOL
);
// farmingPools is an array (A pool can have multiple farms)
const farmingPool = farmingPools[0];
const farm = await PoolFarmImpl.create(
  mainnetConnection,
  farmingPool.farmAddress
);
You can also get the pool with farm address from the DAMM v1 Pool With Farms endpoint.

Development Resources

Faucets

Devnet Faucet

When working on devnet, you might need test tokens. Here is a helpful faucet.