Documentation

Build with Pumptom

Comprehensive guides and API references to integrate Pumptom Wallet into your Solana dApp.

Installation

Install the Pumptom SDK via npm or yarn:

npm install @pumptom/sdk

Connect Wallet

Initialize the Pumptom wallet and prompt users to connect:

import { PumptomWallet } from '@pumptom/sdk';

const wallet = new PumptomWallet();

// Connect wallet
const publicKey = await wallet.connect();
console.log('Connected:', publicKey.toBase58());

Launch a Token

Deploy a new token to Pump.fun with custom metadata:

import { launchToken } from '@pumptom/sdk';

const token = await launchToken({
  name: 'My Token',
  symbol: 'MTK',
  description: 'The next big thing',
  image: tokenImage,
  initialBuy: 0.05 // SOL
});

console.log('Token launched:', token.mint);

Swap Tokens

Use Jupiter aggregator to get the best swap rates:

import { getQuote, executeSwap } from '@pumptom/sdk';

// Get best quote
const quote = await getQuote({
  inputMint: 'So11111111...', // SOL
  outputMint: 'EPjFWdd5...', // USDC
  amount: 1000000000 // 1 SOL in lamports
});

// Execute swap
const tx = await executeSwap(quote);
console.log('Swap complete:', tx);

Security Best Practices

  • Never store private keys or recovery phrases in your code
  • Always verify transaction details before signing
  • Use environment variables for API keys
  • Implement proper error handling for all wallet operations