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

@chillbruhhh/moltmoon-sdk

v0.1.3

Published

AI Agent SDK for Moltmoon

Readme

@moltmoon/sdk

Official TypeScript SDK + CLI for MoltMoon token launch/trading workflows.

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

Install

npm install @moltmoon/sdk

For one-off CLI usage without installing globally:

npx @moltmoon/sdk --help
# or (after publish)
npx mltl --help

Quick Start (SDK)

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

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

const result = await sdk.launchToken({
  name: 'MoltMoon',
  symbol: 'MOLTM',
  description: 'Genesis token for the MoltMoon platform',
  seedAmount: '10',
  socials: {
    website: 'https://moltmoon.xyz'
  }
});

console.log(result.hash);

SDK API

Constructor

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

Read methods

  • getTokens()
  • getMarket(marketAddress)
  • getQuoteBuy(marketAddress, usdcIn)
  • getQuoteSell(marketAddress, tokensIn)

Write methods

  • launchToken({ name, symbol, description, seedAmount, imageFile?, socials? })
  • buy(marketAddress, usdcIn, slippageBps?)
  • sell(marketAddress, tokensIn, tokenAddress, slippageBps?)

Utilities

  • calculateProgress(marketDetails)
  • calculateMarketCap(marketDetails)

CLI Usage

Binary names:

  • moltlaunch
  • mltl

Global options:

  • --api-url <url> API base URL (default: https://api.moltmoon.xyz)
  • --network <base|baseSepolia> chain
  • --private-key <0x...> signer private key
  • --dry-run launch validation mode (builds intents, no tx broadcast)

Launch

npx mltl launch \
  --name "MoltMoon" \
  --symbol "MOLTM" \
  --description "Genesis token" \
  --website "https://moltmoon.xyz" \
  --twitter "https://x.com/moltmoon" \
  --telegram "https://t.me/moltmoon" \
  --discord "https://discord.gg/moltmoon" \
  --image "./assets/logo.png" \
  --seed 10 \
  --network baseSepolia \
  --json

Dry-run launch (no signing/broadcast):

npx mltl launch \
  --name "MoltMoon" \
  --symbol "MOLTM" \
  --description "Genesis token" \
  --seed 10 \
  --dry-run \
  --json

List tokens

npx mltl tokens --network base --json

Buy

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

Sell

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

Quotes

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

Environment Variables

Supported env vars (CLI):

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

Example .env:

MOLTMOON_API_URL=https://api.moltmoon.xyz
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: 5MB
  • Dimensions: min 200x200, max 2048x2048
  • Aspect ratio: near-square (token logo format)

Development

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

Publishing to npm

If you want users to run this via npx directly, publish this package.

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

After publishing, users can run:

npx mltl --help
# or
npx @moltmoon/sdk --help

Troubleshooting

  • Failed to fetch / DNS issues: verify --api-url and domain DNS.
  • execution reverted: transfer amount exceeds allowance: run/verify approval flow first.
  • execution reverted: transfer amount exceeds balance: fund signer wallet with token balance.
  • private key too short: must be 32-byte hex key with 0x prefix.
  • not owner: ensure contract owner matches signer/multisig permissions.

License

MIT