> ## 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.

# DBC TS SDK Getting Started

> Learn how to install @meteora-ag/dynamic-bonding-curve-sdk, initialize the DBC client, read standard and transfer-hook pool state, quote swaps, and test the SDK.

This guide shows how to install and initialize the official DBC TypeScript SDK, `@meteora-ag/dynamic-bonding-curve-sdk`.

Before you begin, here are the main resources:

<CardGroup cols={2}>
  <Card title="TypeScript SDK" icon="node-js" iconType="solid" href="https://github.com/MeteoraAg/dynamic-bonding-curve-sdk/tree/main/packages/dynamic-bonding-curve">
    SDK source, tests, IDLs, services, math helpers, and package metadata.
  </Card>

  <Card title="NPM Package" icon="npm" iconType="solid" href="https://www.npmjs.com/package/@meteora-ag/dynamic-bonding-curve-sdk">
    Published package for DBC TypeScript integrations.
  </Card>
</CardGroup>

## Installation

Install the SDK and its Solana dependencies:

<Tabs>
  <Tab title="npm">
    ```bash theme={"system"}
    npm install @meteora-ag/dynamic-bonding-curve-sdk @solana/web3.js @solana/spl-token bn.js
    ```
  </Tab>

  <Tab title="pnpm">
    ```bash theme={"system"}
    pnpm install @meteora-ag/dynamic-bonding-curve-sdk @solana/web3.js @solana/spl-token bn.js
    ```
  </Tab>

  <Tab title="yarn">
    ```bash theme={"system"}
    yarn add @meteora-ag/dynamic-bonding-curve-sdk @solana/web3.js @solana/spl-token bn.js
    ```
  </Tab>

  <Tab title="bun">
    ```bash theme={"system"}
    bun add @meteora-ag/dynamic-bonding-curve-sdk @solana/web3.js @solana/spl-token bn.js
    ```
  </Tab>
</Tabs>

## Initialization

Create a client from a Solana connection and commitment:

```typescript theme={"system"}
import { Connection } from "@solana/web3.js";
import { DynamicBondingCurveClient } from "@meteora-ag/dynamic-bonding-curve-sdk";

const connection = new Connection(process.env.RPC_URL!, "confirmed");
const client = DynamicBondingCurveClient.create(connection, "confirmed");
```

The constructor is also public:

```typescript theme={"system"}
const client = new DynamicBondingCurveClient(connection, "confirmed");
```

## Program ID

The SDK defaults to the public DBC program ID on both mainnet and devnet:

```text theme={"system"}
dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN
```

## Reference

<CardGroup cols={2}>
  <Card title="SDK Examples" icon="bolt" iconType="solid" href="/developer-guides/dbc/typescript-sdk/examples">
    Explore full transaction flows, including pool initialization, swaps, liquidity, and more.
  </Card>

  <Card title="SDK Reference" icon="code" iconType="solid" href="/developer-guides/dbc/typescript-sdk/reference">
    Access the full method map, PDA helpers, and fee helpers for DBC.
  </Card>

  <Card title="Transfer Hooks" icon="code-branch" iconType="solid" href="/developer-guides/dbc/typescript-sdk/transfer-hooks">
    Build Token 2022 transfer-hook configs, pools, swaps, claims, and state reads.
  </Card>
</CardGroup>

## Testing The SDK

The local package scripts use `pnpm` in the repository root and package scripts in `packages/dynamic-bonding-curve`.

```bash theme={"system"}
cd packages/dynamic-bonding-curve
pnpm install
pnpm run build
pnpm run check-types
pnpm test
```

Some tests depend on local validator fixtures and deployed program artifacts. For application integrations, simulate transactions and test on devnet before mainnet.

## Faucets

<CardGroup cols={1}>
  <Card title="Devnet Faucet" icon="faucet" href="https://faucet.solana.com/">
    Request test SOL for devnet integration testing.
  </Card>
</CardGroup>
