Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sendai.fun/llms.txt

Use this file to discover all available pages before exploring further.

Create and launch tokens on Pump.fun with customizable metadata, social links, and initial liquidity pool settings.

Usage

const result = await agent.launchPumpFunToken(
  "Sample Token",             // Token name
  "SMPL",                    // Token ticker
  "A sample token",          // Description
  "https://example.com/img", // Image URL
  {
    twitter: "@sampletoken",
    telegram: "t.me/sampletoken",
    website: "https://sampletoken.com",
    initialLiquiditySOL: 0.1,
    slippageBps: 10,
    priorityFee: 0.0001
  }
);

Parameters

ParameterTypeRequiredDescription
tokenNamestringYesName of the token (max 32 chars)
tokenTickerstringYesToken symbol (2-10 chars)
descriptionstringYesToken description
imageUrlstringYesURL of token image
options.twitterstringNoTwitter handle
options.telegramstringNoTelegram group link
options.websitestringNoWebsite URL
options.initialLiquiditySOLnumberNoInitial liquidity (min 0.0001)
options.slippageBpsnumberNoSlippage tolerance (default: 5)
options.priorityFeenumberNoPriority fee (default: 0.00005)

Example Prompts

Natural Language Prompts

"Launch a new meme token called 'Rocket Dog' with the RDOG ticker"

"Create a token on Pump.fun with 0.1 SOL initial liquidity"

"Deploy a new token with Twitter and Telegram links"

"Launch token with custom image and description on Pump.fun"

LangChain Tool Prompts

// Basic token launch
{
  "tokenName": "Rocket Dog",
  "tokenTicker": "RDOG",
  "description": "To the moon with man's best friend!",
  "imageUrl": "https://example.com/rdog.png"
}

// Advanced launch with socials and liquidity
{
  "tokenName": "Sample Token",
  "tokenTicker": "SMPL",
  "description": "A sample token for demonstration",
  "imageUrl": "https://example.com/token.png",
  "twitter": "@sampletoken",
  "telegram": "t.me/sampletoken",
  "website": "https://sampletoken.com",
  "initialLiquiditySOL": 0.1
}

Example Implementation

import { SolanaAgentKit } from "solana-agent-kit";

async function launchToken(agent: SolanaAgentKit) {
  try {
    const result = await agent.launchPumpFunToken(
      "Rocket Dog",
      "RDOG",
      "The fastest dog-themed token on Solana!",
      "https://example.com/rdog.png",
      {
        twitter: "@rocketdogtoken",
        telegram: "t.me/rocketdog",
        website: "https://rocketdog.io",
        initialLiquiditySOL: 0.1,
        slippageBps: 10
      }
    );

    console.log("Token launched:", {
      mint: result.mint,
      metadata: result.metadataUri,
      tx: result.signature
    });

    return result;
  } catch (error) {
    console.error("Token launch failed:", error);
    throw error;
  }
}

Response Format

// Successful response
{
  status: "success",
  signature: "2ZE7Rz...",
  mint: "7nxQB...",
  metadataUri: "https://arweave.net/...",
  message: "Successfully launched token on Pump.fun"
}

// Error response
{
  status: "error",
  message: "Error message here",
  code: "ERROR_CODE"
}

Implementation Details

  • Uploads metadata to IPFS
  • Creates token mint account
  • Initializes liquidity pool
  • Configures trading parameters
  • Handles token metadata
  • Manages social links

Error Handling

try {
  const result = await agent.launchPumpFunToken(...);
} catch (error) {
  if (error.message.includes("metadata upload")) {
    // Handle metadata issues
  } else if (error.message.includes("liquidity")) {
    // Handle liquidity issues
  }
}

Best Practices

  1. Token Setup
    • Use clear, unique names
    • Prepare high-quality images
    • Write compelling descriptions
    • Verify social links
  2. Liquidity Management
    • Set appropriate initial liquidity
    • Consider trading volume
    • Monitor pool health
    • Plan liquidity strategy
  3. Transaction Handling
    • Use appropriate priority fees
    • Set realistic slippage
    • Monitor transaction status
    • Handle timeouts properly
  4. Metadata Management
    • Use permanent image storage
    • Format descriptions properly
    • Include all social links
    • Verify metadata accuracy

Common Issues

  1. Image Upload
    • Invalid image format
    • File too large
    • Temporary URLs
    • Missing content type
  2. Transaction Failures
    • Insufficient SOL
    • Network congestion
    • Invalid parameters
    • RPC timeouts
  3. Metadata Issues
    • Invalid social links
    • Description too long
    • Missing required fields
    • Format errors
  • getBalance: Check SOL balance
  • fetchMetadata: Get token metadata
  • trade: Swap tokens
  • getTokenData: Get token information