# Installation

### Requirements

* Node.js 16.0 or higher
* npm, yarn, or pnpm package manager
* TypeScript 4.5+ (recommended)

### Install Package

#### Using npm

```bash
npm install @ferra-labs/dlmm
```

#### Using yarn

```bash
yarn add @ferra-labs/dlmm
```

#### Using pnpm

```bash
pnpm add @ferra-labs/dlmm
```

### TypeScript Configuration

For TypeScript projects, ensure your `tsconfig.json` includes:

```json
{
  "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:

```typescript
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:

```bash
npx ts-node test.ts
```

### Development Setup

For contributing or local development:

```bash
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](/integration/dlmm/typescript-sdk/getting-started/sdk-initialization.md) - Configure the SDK
* [Key Concepts](/integration/dlmm/typescript-sdk/getting-started/key-concepts.md) - Understand DLMM basics
* [Create Pair](/integration/dlmm/typescript-sdk/trading-pairs/create-lb-pair.md) - Deploy your first pair


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ferra.ag/integration/dlmm/typescript-sdk/getting-started/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
