Installation
Install and set up the Ferra DLMM SDK in your project.
Requirements
Node.js 16.0 or higher
npm, yarn, or pnpm package manager
TypeScript 4.5+ (recommended)
Install Package
Using npm
npm install @ferra-labs/dlmm
Using yarn
yarn add @ferra-labs/dlmm
Using pnpm
pnpm add @ferra-labs/dlmm
TypeScript Configuration
For TypeScript projects, ensure your tsconfig.json
includes:
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"lib": ["ES2020"],
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true
}
}
Verify Installation
Create a test file to verify the installation:
import { FerraDlmmSDK, BinMath } from '@ferra-labs/dlmm'
// Should print the SDK version
console.log('DLMM SDK imported successfully')
// Test BinMath utility
const price = BinMath.getPriceFromId(8388608, 10, 9, 6)
console.log('Price at bin 8388608:', price)
Run the test:
npx ts-node test.ts
Development Setup
For contributing or local development:
git clone https://github.com/ferra-labs/dlmm-sdk.git
cd dlmm-sdk
npm install
npm run build
Next Steps
Installation complete! Continue to:
SDK Initialization - Configure the SDK
Key Concepts - Understand DLMM basics
Create Pair - Deploy your first pair
Last updated