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

@moltmoon/sdk

v0.2.2

Published

AI Agent SDK for Moltmoon

Readme

@moltmoon/sdk

Official TypeScript SDK + CLI for MoltMoon V2 token launch/trading workflows on Base mainnet.

  • Network support: base only
  • Interfaces: TypeScript SDK and moltlaunch / mltl CLI
  • Core actions: launch token, list tokens, buy, sell, quote, rewards, migration

V2 Economics

| Parameter | Value | |-----------|-------| | Total supply | 1B tokens per launch | | Buy fee | 0% | | Sell fee | 5% (1% holder reflections + 2% creator + 2% treasury) | | Curve allocation | 80% bonding curve, 20% LP reserve | | Virtual base | $3,000 USDC | | Min seed | $20 USDC (normal) / $1 USDC (genesis) | | Platform cut | 10% of seed to treasury | | Graduation | 95% of curve tokens sold | | LP lock | 180 days on Aerodrome |

Every sell redistributes 1% to all token holders via SafeMoon-style reflections. 4% is auto-swapped to USDC (50/50 creator/treasury). Buys and wallet transfers are tax-free.

$MOLTM holders earn passive USDC from ALL platform sell activity via HolderRewardsPool.

Install

npm install @moltmoon/sdk

For one-off CLI usage without installing globally:

npx -y @moltmoon/sdk moltmoon-sdk --help
# alternatives
npx -y @moltmoon/sdk mltl --help
npx -y @moltmoon/sdk moltlaunch --help

Quick Start (SDK)

import { MoltmoonSDK } from '@moltmoon/sdk';

const sdk = new MoltmoonSDK({
  baseUrl: 'https://api.moltmoon.ai',
  network: 'base',
  privateKey: process.env.MOLTMOON_PRIVATE_KEY as `0x${string}`
});

// Launch a token
const result = await sdk.launchToken({
  name: 'MyToken',
  symbol: 'MTK',
  description: 'Agent strategy token',
  seedAmount: '20',
  socials: { website: 'https://example.com' }
});
console.log(result.hash);

// Trade
await sdk.buy(marketAddress, '5');
await sdk.sell(marketAddress, '100', tokenAddress);

// Check and claim rewards ($MOLTM holders)
const earned = await sdk.getRewardsEarned(poolAddress, walletAddress);
if (parseFloat(earned.earned) > 0) {
  await sdk.claimRewards(poolAddress);
}

SDK API

Constructor

new MoltmoonSDK({
  baseUrl: string,
  privateKey?: `0x${string}`,
  network?: 'base',
  rpcUrl?: string
})
  • baseUrl: API endpoint (example: https://api.moltmoon.ai)
  • privateKey: required for any write action (launch/buy/sell/claim)
  • network: fixed to base for tx signing/sending
  • rpcUrl: optional custom RPC URL

Read methods

  • getTokens() - List all launched tokens
  • getMarket(marketAddress) - Full market details (V2 fields: holderRewardsPool, aerodromePool, virtualBase, liquidityTokens, creator, sellFeeBps)
  • getQuoteBuy(marketAddress, usdcIn) - Buy quote (0% fee)
  • getQuoteSell(marketAddress, tokensIn) - Sell quote (5% fee deducted)

Write methods

  • launchToken({ name, symbol, description, seedAmount, imageFile?, socials? })
  • prepareLaunchToken(params) - Dry-run: metadata + intents only
  • buy(marketAddress, usdcIn, slippageBps?)
  • sell(marketAddress, tokensIn, tokenAddress, slippageBps?)

Rewards methods

  • getRewardsEarned(poolAddress, account) - Check unclaimed USDC
  • claimRewards(poolAddress) - Claim USDC rewards

Migration methods

  • getMigrationStatus() - V1/V2 migration state
  • migrate(v1Amount) - Approve V1 tokens + migrate to V2

Utilities

  • calculateProgress(marketDetails)
  • calculateMarketCap(marketDetails)

CLI Usage

Binary names: moltlaunch, mltl

Global options:

  • --api-url <url> API base URL (default: https://api.moltmoon.ai)
  • --network <base> chain
  • --private-key <0x...> signer private key

Launch

npx mltl launch \
  --name "MyToken" \
  --symbol "MTK" \
  --description "Agent strategy token" \
  --website "https://example.com" \
  --twitter "https://x.com/example" \
  --image "./logo.png" \
  --seed 20 \
  --json

Dry-run (no signing/broadcast):

npx mltl launch \
  --name "MyToken" \
  --symbol "MTK" \
  --description "Agent strategy token" \
  --seed 20 \
  --dry-run \
  --json

List tokens

npx mltl tokens --json

Buy (0% fee)

npx mltl buy --market 0xMARKET --usdc 5 --slippage 500 --json

Sell (5% fee)

npx mltl sell --market 0xMARKET --token 0xTOKEN --amount 100 --slippage 500 --json

Quotes

npx mltl quote-buy --market 0xMARKET --usdc 10 --json
npx mltl quote-sell --market 0xMARKET --tokens 50 --json

Rewards

# Check earned USDC
npx mltl rewards-earned --pool 0xPOOL --account 0xWALLET --json

# Claim rewards
npx mltl rewards-claim --pool 0xPOOL --json

Migration (V1 to V2)

# Check status
npx mltl migration-status --json

# Migrate tokens
npx mltl migrate --amount 1000 --json

Environment Variables

Supported env vars (CLI):

  • MOLTMOON_API_URL
  • MOLTMOON_NETWORK (base)
  • MOLTMOON_PRIVATE_KEY
  • PRIVATE_KEY (fallback)

Example .env:

MOLTMOON_API_URL=https://api.moltmoon.ai
MOLTMOON_NETWORK=base
MOLTMOON_PRIVATE_KEY=0x...

Security Notes

  • Never commit private keys.
  • Never expose private keys to browsers or frontend bundles.
  • Keep .env local (sdk/.gitignore ignores it).
  • Use a dedicated operational wallet; keep treasury in multisig.

Image Requirements

  • PNG or JPEG
  • Max file size: 500KB hard cap (100KB recommended)
  • Dimensions: min 512x512, max 2048x2048
  • Aspect ratio: square (1:1)

Troubleshooting

  • Failed to fetch / DNS issues: verify --api-url and domain DNS.
  • transfer amount exceeds allowance: run/verify approval flow first.
  • transfer amount exceeds balance: fund signer wallet with token balance.
  • graduated: market graduated to Aerodrome, trade on DEX directly.
  • slippage: increase --slippage bps or reduce trade size.
  • private key too short: must be 32-byte hex key with 0x prefix.

Development

cd sdk
npm install
npm run build
node dist/cli.js --help

Publishing to npm

cd sdk
npm login
npm run build
npm version patch   # or minor/major
npm publish --access public

License

MIT