# v3.1.0

### Quick Start

```bash
npm install clanker-sdk
```

### Basic Usage

```typescript
import { Clanker } from 'clanker-sdk';
import { createWalletClient, createPublicClient, http } from 'viem';

// Initialize SDK
const clanker = new Clanker({
  wallet: walletClient,
  publicClient,
  factoryAddress: FACTORY_ADDRESS
});

// Deploy a token
const tokenAddress = await clanker.deployToken({
  name: "MyToken",
  symbol: "TOKEN",
  image: "ipfs://...",
  metadata: {
    description: "My awesome token",
    socialMediaUrls: ["https://twitter.com/mytoken"],
    auditUrls: []
  },
  pool: {
    quoteToken: "0x4200000000000000000000000000000000000006", // WETH
    initialMarketCap: "1" // 1 WETH
  }
});
```

### Advanced Configuration

#### Vesting Vault

Add a vesting schedule for token distribution:

```typescript
const config = {
  // ... basic config ...
  vault: {
    percentage: 20, // 20% of tokens
    durationInDays: 90 // 90-day vesting
  }
};
```

#### Reward Distribution

Configure creator and interface rewards (Clanker retains 20%):

```typescript
const config = {
  // ... basic config ...
  rewardsConfig: {
    creatorReward: 80, // 80% max to creator, 0% to interface
    creatorAdmin: "0x...", // Optional: Custom admin address
    creatorRewardRecipient: "0x..." // Optional: Custom reward recipient
  }
};
```

#### Initial Dev Buy

Configure an initial buy to provide liquidity:

```typescript
const config = {
  // ... basic config ...
  devBuy: {
    ethAmount: "0.1", // Buy 0.1 ETH worth
    maxSlippage: 5 // 5% max slippage
  }
};
```

### Complete Example

```typescript
const tokenAddress = await clanker.deployToken({
  name: "Awesome Token",
  symbol: "AWESOME",
  image: "ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi",
  metadata: {
    description: "The most awesome token on Base",
    socialMediaUrls: [
      "https://twitter.com/awesome",
      "https://t.me/awesome"
    ],
    auditUrls: []
  },
  context: {
    interface: "My dApp",
    platform: "Awesome Platform",
    messageId: "deployment-1",
    id: "awesome-token-1"
  },
  vault: {
    percentage: 20,
    durationInDays: 90
  },
  pool: {
    quoteToken: "0x4200000000000000000000000000000000000006",
    initialMarketCap: "1"
  },
  devBuy: {
    ethAmount: "0.1",
    maxSlippage: 5
  },
  rewardsConfig: {
    creatorReward: 80,
    creatorAdmin: "0x...",
    creatorRewardRecipient: "0x..."
  }
});

console.log(`Token deployed at: ${tokenAddress}`);
console.log(`View on Clanker World: https://clanker.world/clanker/${tokenAddress}`);
```


---

# 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://clanker.gitbook.io/documentation/sdk/v3.1.0.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.
