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

@openpets/bags-fm

v1.0.3

Published

Plugin for Bags.FM API - Create and launch Solana tokens, manage fee sharing configurations, get trade quotes, and claim fees from token positions.

Readme

Bags.FM Pet

OpenPets plugin for the Bags.FM API - a Solana token launch and fee sharing platform.

Features

  • Get trade quotes for token swaps
  • Create swap transactions
  • Query token analytics (lifetime fees, creators, claim stats)
  • Get claimable fee positions for wallets
  • Generate claim transactions
  • Create and launch new tokens
  • Configure fee sharing among multiple claimers

Setup

1. Get API Key

Visit https://dev.bags.fm to create an account and generate your API key.

2. Configure Environment

Add to your .env file:

BAGS_FM_API_KEY=your_api_key_here

3. Test Connection

opencode run "test bags-fm connection"

Available Tools

Core Tools (Always Loaded)

| Tool | Description | |------|-------------| | bags-fm-test-connection | Test API connection and credentials | | bags-fm-get-trade-quote | Get a swap quote with price impact | | bags-fm-create-swap-transaction | Create a swap transaction from a quote | | bags-fm-get-token-lifetime-fees | Get total fees collected for a token | | bags-fm-get-token-launch-creators | Get token creators/deployers | | bags-fm-get-token-claim-stats | Get claim statistics for a token | | bags-fm-get-claimable-positions | Get claimable fee positions for a wallet | | bags-fm-get-claim-transactions | Generate claim transactions |

Optional Tool Groups

Enable additional tools by setting environment variables:

# Token Launch tools
BAGS_FM_LOAD_TOKEN_LAUNCH_TOOLS=true
# - bags-fm-create-token-info
# - bags-fm-create-launch-transaction

# Fee Share tools
BAGS_FM_LOAD_FEE_SHARE_TOOLS=true
# - bags-fm-get-fee-share-wallet-bulk
# - bags-fm-create-fee-share-config

# Partner tools
BAGS_FM_LOAD_PARTNER_TOOLS=true
# - bags-fm-get-partner-stats

Example Queries

# Get a swap quote
opencode run "get a bags-fm trade quote for swapping 1 SOL to token mint ABC123"

# Get lifetime fees for a token
opencode run "get bags-fm lifetime fees for token mint ABC123"

# Get claimable positions
opencode run "get bags-fm claimable positions for wallet XYZ789"

# Get token creators
opencode run "who are the bags-fm creators for token mint ABC123"

Key Concepts

Lamports

A lamport is the smallest unit of SOL. 1 SOL = 1,000,000,000 lamports (10^9).

Basis Points (bps)

Basis points are used for fee sharing percentages. 100 bps = 1%, 10,000 bps = 100%.

Token Mints

All tokens are identified by their mint public key (Base58 encoded Solana address).

Rate Limits

The API has a limit of 1,000 requests per hour per user. Monitor the X-RateLimit-Remaining and X-RateLimit-Reset headers in responses.

Read-Only Mode

Enable read-only mode to disable write operations:

pets read-only bags-fm on

This filters out tools like create-swap-transaction, create-token-info, etc.

Regenerating Tools

If the API spec changes, regenerate the tools:

cd pets/bags-fm
pets generate-openapi --verbose

Note: Bags.FM does not expose a public OpenAPI spec URL. The openapi-spec.json file was manually created from their documentation at https://docs.bags.fm. If they add new endpoints, update the local spec file and regenerate.

Documentation