dex-skills v0.1.0

launch()

Launch a new token on a supported DEX launchpad platform. This method handles token creation, metadata upload, and the initial on-chain transaction in a single call.

Signature

// Get a platform skill, then call launch()
const skill = getSkill(skills, "pumpfun");
const result: LaunchResult = await skill.launch(params);

Parameters

First, use getSkill(skills, platform) to obtain a skill instance for the desired platform (e.g. "pumpfun", "letsbonk", "zora", etc.). Then call skill.launch(params) with an object containing the following fields:

Parameter Type Description
name * string Token name displayed on the platform and block explorer.
symbol * string Token symbol or ticker (e.g. MTK, DOGE).
description string Human-readable description of the token. Displayed on the platform page.
imageUrl string URL to the token image. Must be publicly accessible. Some platforms also accept IPFS URIs.
bannerUrl string URL to a banner image. Currently supported by Moonshot only (max 5MB). Ignored by other platforms.
initialBuyAmount string Amount of native currency (SOL, ETH, BNB, or TRX) to spend on an initial buy immediately after launch.
links object Social and external links to associate with the token. Supported keys: twitter, telegram, website, discord, github.
extra Record<string, unknown> Platform-specific extra parameters. Passed through to the underlying platform SDK without modification.
Social link support
Not every platform supports all link types. For example, some platforms only accept twitter and website. Unsupported links are silently ignored rather than causing an error.

Return Value

Returns a Promise<LaunchResult> with the following shape:

LaunchResult
interface LaunchResult {
  platform: Platform;
  chain: Chain;
  tokenAddress: string;
  txHash: string;
  tokenName: string;
  tokenSymbol: string;
  creatorAddress: string;
  timestamp: string;
}

Example

launch-token.ts
import { createSkills, getSkill } from "dex-skills";

const skills = createSkills({
  wallets: {
    solana: {
      privateKey: process.env.SOLANA_PRIVATE_KEY,
      rpcUrl: "https://api.mainnet-beta.solana.com",
    },
  },
});

const pumpfun = getSkill(skills, "pumpfun");

const result = await pumpfun.launch({
  name: "My Token",
  symbol: "MTK",
  description: "A community token launched via dex-skills.",
  imageUrl: "https://example.com/token-logo.png",
  initialBuyAmount: "0.1",
  links: {
    twitter: "https://twitter.com/mytoken",
    website: "https://mytoken.xyz",
    telegram: "https://t.me/mytoken",
  },
});

console.log("Token address:", result.tokenAddress);
console.log("Transaction:", result.txHash);
Private key required
Launching a token requires a private key for the target chain, configured in the wallets object passed to createSkills(). The key is used to sign the creation transaction and is never stored or transmitted beyond the RPC call.