Documentation Index Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
Use this file to discover all available pages before exploring further.
The DAMM v1 TypeScript SDK is published as @meteora-ag/dynamic-amm-sdk. It wraps pool state reads, Dynamic Vault reads, quote math, transaction builders, pool creation helpers, config reads, and LP lock flows.
DAMM v1 SDK Repository Source for the TypeScript SDK, examples, Rust quote crate, Rust helpers, and CLI.
NPM Package Published @meteora-ag/dynamic-amm-sdk package.
Installation
Install the SDK with Solana Web3. The package uses bn.js amounts for token units.
npm install @meteora-ag/dynamic-amm-sdk @solana/web3.js bn.js
pnpm install @meteora-ag/dynamic-amm-sdk @solana/web3.js bn.js
yarn add @meteora-ag/dynamic-amm-sdk @solana/web3.js bn.js
Create A Pool Client
import AmmImpl from "@meteora-ag/dynamic-amm-sdk" ;
import { Connection , PublicKey } from "@solana/web3.js" ;
const connection = new Connection ( process . env . RPC_URL ! , "confirmed" );
const poolAddress = new PublicKey ( "..." );
const pool = await AmmImpl . create ( connection , poolAddress , {
cluster: "mainnet-beta" ,
});
console . log ({
lpMint: pool . getPoolTokenMint (). toBase58 (),
tokenA: pool . tokenAMint . address . toBase58 (),
tokenB: pool . tokenBMint . address . toBase58 (),
tokenAAmount: pool . poolInfo . tokenAAmount . toString (),
tokenBAmount: pool . poolInfo . tokenBAmount . toString (),
virtualPrice: pool . poolInfo . virtualPrice ,
});
Use cluster: "devnet" when working against devnet. The DAMM v1 program ID is the same on mainnet and devnet:
// Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB
Load Multiple Pools
createMultiple batches pool, vault, LP mint, token account, clock, and depeg account reads.
import AmmImpl from "@meteora-ag/dynamic-amm-sdk" ;
import { PublicKey } from "@solana/web3.js" ;
const pools = await AmmImpl . createMultiple (
connection ,
[
new PublicKey ( "..." ),
new PublicKey ( "..." ),
],
{ cluster: "mainnet-beta" },
);
for ( const pool of pools ) {
console . log ( pool . address . toBase58 (), pool . poolInfo . virtualPrice );
}
Transactions Are Unsigned
Most SDK methods return an unsigned Transaction or an array of unsigned transactions. Your wallet, backend signer, or transaction pipeline must sign and send them.
const tx = await pool . swap (
user . publicKey ,
pool . tokenAMint . address ,
inAmount ,
quote . minSwapOutAmount ,
);
tx . sign ( user );
const signature = await connection . sendRawTransaction ( tx . serialize ());
await connection . confirmTransaction ( signature , "confirmed" );
Development Commands
Task Command Install dependencies cd damm-v1-sdk/ts-client && pnpm installBuild SDK pnpm run buildRun SDK tests pnpm testRun one example tsx src/examples/<file-name>.ts
Some examples in the repository expect a local keypair and hard-coded devnet or mainnet pool addresses. Replace RPC URLs, pool addresses, mint addresses, and signer loading before reusing them in an application.
Next Steps
Examples Practical TypeScript patterns for pool reads, quotes, swaps, deposits, withdrawals, pool creation, and locks.
Reference SDK exports, constants, public methods, helper functions, types, and integration notes.