Pump.fun

Working with creator vaults directly.

The flow

  1. Token trades → fees go to Pump.fun vault

  2. Collection → fees move to Claimr PDA

  3. Withdrawal → funds go to user's wallet

Derive the vault

import { PublicKey } from '@solana/web3.js';

const PUMP = new PublicKey('6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P');

function getCreatorVault(creator: PublicKey): PublicKey {
  const [vault] = PublicKey.findProgramAddressSync(
    [Buffer.from('creator-vault'), creator.toBuffer()],
    PUMP
  );
  return vault;
}

// Get vault for a Claimr PDA
const pda = getClaimrAddress('44196397');
const vault = getCreatorVault(pda);

Check vault balance

Or just use the API which checks both:

Trigger collection

Easiest way:

Anyone can call this. Moves funds from vault → PDA.

Last updated