# Pump.Fun Launch Coin Tool

#### Pump.fun Launch Coin Tool (`pumpfun_launch_coin_tool`)

Launches a **brand new SPL token directly onto the Pump.fun platform**. This involves creating the token, setting its metadata (name, symbol, image, socials), and optionally making an initial SOL purchase. **This is an on-chain action with real costs and creates a publicly tradable token.**

{% hint style="info" %}
**Inputs:** Requires creator's wallet, new token details, and image URL. Social links and initial SOL buy-in are optional.
{% endhint %}

```python
class PumpFunLaunchCoinInput(BaseModel):
    agent_public: str     # Creator's public key
    agent_private: str    # Creator's ENCRYPTED private key
    token_name: str       # Name for the new token (e.g., "Lumo Test Coin")
    token_symbol: str     # Symbol for the new token (e.g., "LTC01")
    description: str      # Description of the new token
    image_url: str        # URL to the token's image (must be valid)
    twitter_url: Optional[str]  # Optional Twitter link
    telegram_url: Optional[str] # Optional Telegram link
    website: Optional[str]      # Optional website link
    amount: float = 0.0   # Optional SOL amount to buy into the new token
```

***

**Key Functionality:**

* Securely decrypts the creator's private key.
* Validates all provided token metadata and URLs.
* Uploads token metadata (name, symbol, description, image, socials) to IPFS via Pump.fun's API.
* Constructs and executes the on-chain transaction to create the new token and its bonding curve on Pump.fun, including any initial SOL investment specified.

***

**Sample Usage Queries (How an AI might use it):** *(These imply the agent has access to or will securely prompt for necessary wallet details)*

* "Launch a new token on Pump.fun named 'Awesome Token' with symbol 'AWSM', description 'An awesome new token!', and image `image_url_here`."
* "I want to create a coin called 'FARTCOIN' (FRT) on Pump.fun. Description: 'The next big thing'. Image: `url_to_fart_image`. Also add Twitter `twitter_link` and buy 0.1 SOL worth."
* "Help me launch 'GOAT Token' (GOAT) on Pump.fun with description 'Greatest Of All Tokens', image `goat_pic_url`, and Telegram `tg_link`."
* "Create a Pump.fun coin: Name 'Lumo Launcher', Symbol 'LLAUNCH', Desc 'Test launch by LumoKit', Image `lumo_logo_url`, Website `lumolabs.ai`."
* "Launch a token with these details: Name: ..., Symbol: ..., Description: ..., Image: ..., and invest 0.05 SOL."

***

**Quick Code Glance:**

```python
class PumpFunLaunchCoinTool(BaseTool):
    name: ClassVar[str] = "pumpfun_launch_coin_tool"
    description: ClassVar[str] = "Launch a new token on Pump.fun platform. Requires token details and agent wallet information."
    args_schema: ClassVar[Type[BaseModel]] = PumpFunLaunchCoinInput
```

***

**⚠️ CRITICAL INFORMATION / WARNINGS:**

* **Real Token Creation & Costs:** This tool launches a live SPL token on Pump.fun. This is an **irreversible on-chain action** and will incur Solana network fees and any fees associated with Pump.fun's service. The optional `amount` is real SOL spent.
* **Encrypted Private Key:** Requires the creator's **encrypted** private key. Secure handling is essential.
* **Metadata & Image:** All required metadata (name, symbol, description, image URL) must be valid and appropriate. The image URL must be publicly accessible.
* **Pump.fun Platform:** Relies on Pump.fun's APIs and platform rules.
* **Network Dependent:** Interacts with Solana RPC and Pump.fun's infrastructure.
* **Asynchronous:** Primarily designed for asynchronous execution (`_arun`).
