npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pompafly/sdk

v0.1.4

Published

TypeScript SDK for the Pompafly token launchpad on Solana

Readme

@pompafly/sdk

TypeScript SDK for the Pompafly token launchpad on Solana.

Install

npm install @pompafly/sdk

Quick Start

Frontend (Next.js + Wallet Adapter)

import { PompaflyClient, PompaflyAPI, PompaflyStream, DEVNET_CONFIG } from "@pompafly/sdk";
import { useAnchorWallet } from "@solana/wallet-adapter-react";

// Transaction client
const wallet = useAnchorWallet();
const client = new PompaflyClient({ wallet, config: DEVNET_CONFIG });

// REST API
const api = new PompaflyAPI(DEVNET_CONFIG);

// Real-time stream
const stream = new PompaflyStream(DEVNET_CONFIG);

Backend (Node.js + Keypair)

import { PompaflyClient, DEVNET_CONFIG } from "@pompafly/sdk";
import { Keypair } from "@solana/web3.js";

const keypair = Keypair.fromSecretKey(/* your secret key */);
const client = new PompaflyClient({ keypair, config: DEVNET_CONFIG });

Usage

Browse Pools

// List trending pools
const { data: pools } = await api.getPools({ sort: "volume", status: "active" });

// Search by name
const { data: results } = await api.getPools({ search: "DOGE" });

// Get pool details
const { data: pool } = await api.getPool("mint_address_here");

// Get current price
const { data: price } = await api.getPoolPrice("mint_address_here");

Buy Tokens

// Buy 100 tokens with 1 SOL max slippage
const result = await client.buy("mint_address", 100, 1.0);
console.log("Signature:", result.signature);

// Priority buy (during 120s window, requires auth)
const { data: auth } = await api.getPriorityAuth("mint_address");
const result = await client.buy("mint_address", 100, 1.0, prioritySignerKeypair);

Sell Tokens

// Sell 50 tokens, accept any return
const result = await client.sell("mint_address", 50);

// Sell with minimum return of 0.5 SOL
const result = await client.sell("mint_address", 50, 0.5);

Create a Token

const result = await client.createPool(
  "My Token",           // name
  "MYTKN",              // symbol
  "https://meta.json",  // metadata URI
  "myxhandle",          // X handle
  authorityKeypair      // backend co-signer
);
console.log("Mint:", result.mint);
console.log("Pool:", result.pool);

Real-Time Price Feed

const stream = new PompaflyStream();
stream.connect();

// Subscribe to specific tokens
stream.subscribe(["mint1", "mint2"]);

// Listen for price updates
const unsub = stream.onPrice((event) => {
  console.log(`${event.mint}: ${event.data.currentPrice}`);
});

// Listen for trades
stream.onTrade((event) => {
  console.log(`${event.data.type}: ${event.data.tokenAmount} tokens`);
});

// Cleanup
unsub(); // remove listener
stream.unsubscribe(["mint1"]);
stream.disconnect();

Authentication Flow

// 1. Get nonce
const { data: { nonce, message } } = await api.getNonce(wallet.publicKey.toBase58());

// 2. Sign with wallet (frontend)
const signature = await wallet.signMessage(new TextEncoder().encode(message));

// 3. Verify and get JWT
const { data: { token, user } } = await api.verifyWallet(
  wallet.publicKey.toBase58(),
  bs58.encode(signature)
);
// JWT is automatically stored in the API client

// 4. Link X account (redirects to Twitter OAuth)
window.location.href = api.getXLoginUrl();

Charts

// Get 1-hour candles for the last 24 hours
const { data: candles } = await api.getCandles("mint_address", {
  interval: "1h",
  from: Math.floor(Date.now() / 1000) - 86400,
  limit: 24,
});

Platform Stats

const { data: stats } = await api.getStats();
console.log("Total pools:", stats.totalPoolsCreated);
console.log("Graduation rate:", stats.graduationRate);

const { data: trending } = await api.getTrending(10);

Utilities

import { solToLamports, lamportsToSol, tokensToBase, baseToTokens } from "@pompafly/sdk";

solToLamports(1.5);      // 1500000000
lamportsToSol(1500000000); // 1.5
tokensToBase(100);        // 100000000
baseToTokens(100000000);  // 100

Configuration

import { DEVNET_CONFIG, MAINNET_CONFIG } from "@pompafly/sdk";

// Or custom config
const config = {
  rpcUrl: "https://my-rpc.com",
  programId: "FnBDGeXKx3CsrFqxfKrLMsuNeUmMZPP19DbLbmqj8wCZ",
  apiUrl: "https://api.pompafly.fun",
  wsUrl: "wss://api.pompafly.fun/ws",
};

License

MIT