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

@sun-protocol/wallet-cli-sunswap-plugin

v0.1.0-next.1

Published

SunSwap commands for wallet-cli

Readme

@sun-protocol/wallet-cli-sunswap-plugin

sunswap is a plugin for wallet-cli. SunSwap is a decentralized exchange (DEX) on TRON. The plugin swaps tokens, adds and removes SunSwap liquidity and collects its fees, and looks up pools, positions, tokens and prices.

It needs wallet-cli with plugin support (Requirements) and a TRON network. With the built-in configuration the market queries and swap run on mainnet, the liquidity commands and position-info on mainnet and Nile; a network's settings change that. No credentials; the settings are in Credentials and settings.

Requirements

  • wallet-cli with plugin support and a plugin SDK of version 1.0 or a later 1.x (this package declares sdkVersion ^1.0.0). Plugin support is on wallet-cli's feat/plugin-architecture branch and not yet in a release.
  • Node.js 22.23.4+, 24.22.1+ or 26.12.1+.

Install

wallet-cli installs a plugin only by its npm package name. This package is not on npm yet; until it is, publish it to a private or local npm registry and set pluginRegistry to it, as the wallet-cli plugins guide describes.

wallet-cli plugin install @sun-protocol/wallet-cli-sunswap-plugin
wallet-cli plugin list

Commands

| Command | What it does | |---|---| | sunswap add-liquidity | Add liquidity to a pool | | sunswap remove-liquidity | Withdraw liquidity from a pool | | sunswap collect-fees | Collect a position's earned fees | | sunswap swap | Swap tokens through SunSwap or a SunPump curve | | sunswap position-list | List the liquidity positions held by an address | | sunswap position-info | Show one SunSwap V3 or V4 position | | sunswap pool-list | List pools, ranked by TVL, volume, fees or APR | | sunswap pool-search | Search pools by token symbol or pool address | | sunswap token-list | List the tokens traded on SunSwap | | sunswap token-search | Search the tokens traded on SunSwap by symbol | | sunswap price | Show the USD price of one or more tokens |

wallet-cli sunswap <command> --help shows the options of each command. What the plugin adds to wallet-cli's JSON output and error codes is in machine-interface.md.

Credentials and settings

No credentials. The plugin reads the sunswap block of a network in wallet-cli's config.yaml, merged over the builtin defaults field by field, so an explicit false turns a default off:

networks:
  nile:
    sunswap:
      marketApiBaseUrl: https://example.test # http(s) URL; the market API and price source
      routerApiBaseUrl: https://example.test # http(s) URL; the swap route service
      liquidity: true # contract-backed liquidity
    sunpump:
      curve: true # bonding-curve trades

swap also reads curve from the sunpump block, which turns on trades on the bonding curve of a SunPump token; the separate sunpump plugin need not be installed. Mainnet has every service by default; Nile has liquidity only. An invalid sunswap or sunpump block fails the commands with invalid_value.

License

MIT. The licences of the third-party packages bundled into dist/index.mjs are in dist/THIRD_PARTY_LICENSES.txt.