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

megaswap-elizaos-plugin

v1.0.0

Published

MegaSwap plugin for elizaOS — swap tokens, manage liquidity, and query prices on MegaETH (10ms blockchain) with AI agents

Downloads

19

Readme

MegaSwap ElizaOS Plugin

Trade tokens on MegaETH via MegaSwap — the AI-native DEX with 10ms execution and sub-cent gas fees.

This plugin gives ElizaOS agents the ability to swap tokens, check prices, manage liquidity, and query balances on MegaETH using natural language.

Installation

npm install megaswap-elizaos-plugin

Setup

Add to your ElizaOS agent configuration:

import { megaswapPlugin } from "megaswap-elizaos-plugin";

const agent = new AgentRuntime({
  // ...
  plugins: [megaswapPlugin],
  settings: {
    MEGASWAP_PRIVATE_KEY: "your-private-key", // Only needed for swaps & liquidity
    // MEGASWAP_RPC_URL: "https://mainnet.megaeth.com/rpc", // Optional, defaults to mainnet
  },
});

Note: MEGASWAP_PRIVATE_KEY is only required for write operations (swaps, add/remove liquidity). Read-only operations (price quotes, pair info, token info, balances) work without a key.

Actions

| Action | What It Does | Needs Key? | |--------|-------------|------------| | GET_SWAP_QUOTE | Get a swap price quote | No | | SWAP_TOKENS | Execute a token swap | Yes | | GET_TRADING_PAIR | Pair reserves, price, TVL | No | | LIST_TRADING_PAIRS | Browse all trading pairs | No | | GET_TOKEN_BALANCE | Check ETH + token balance | No | | ADD_LIQUIDITY | Add liquidity to a pool | Yes | | REMOVE_LIQUIDITY | Remove liquidity from a pool | Yes | | LIST_MEGASWAP_TOKENS | List known tokens | No | | GET_TOKEN_INFO_MEGASWAP | Token name, symbol, supply | No |

Example Conversations

User: "How much MEGAS can I get for 1 ETH on MegaSwap?"
Agent: 1 ETH = 80,667 MEGAS (Price: 1 ETH = 80,667 MEGAS)

User: "Swap 0.1 ETH for MEGAS on MegaSwap"
Agent: Swap Executed — 0.1 ETH → ~8,066 MEGAS (TX: 0xabc...123)

User: "Show the ETH/MEGAS pair on MegaSwap"
Agent: WETH/MegaS — Reserves: 150.5 WETH, 12.15M MegaS — 1 WETH = 80,730 MegaS

User: "What tokens are available on MegaSwap?"
Agent: ETH/WETH, MEGAS, USDM, USDT0 — plus any ERC-20 by address

Supported Tokens

| Symbol | Token | Address | |--------|-------|---------| | ETH | Native Ether | — | | WETH | Wrapped Ether | 0x3B40...3849 | | MEGAS | MegaS | 0x3E96...FaF5 | | USDM | MegaUSD | 0xFAfD...79E7 | | USDT0 | USDT0 | 0xB8CE...9ebb |

Any ERC-20 token on MegaETH works too — just use the contract address.

Why MegaETH?

  • 10ms block times — instant swap execution
  • 100,000+ TPS — handles AI agent swarms
  • Sub-cent gas — viable for high-frequency micro-trades

Related

License

MIT