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

@hop.ag/sdk

v4.1.9

Published

Official Hop SDK to access Hop Aggregator

Readme

Hop SDK

Use this library to interact with Hop Aggregator's swap. To request an api key, please email [email protected]. We do offer enterprise plans for specific traders and businesses.

npm install @hop.ag/sdk

Initialize

import { HopApi, HopApiOptions } from "@hop.ag/sdk";
import { getFullnodeUrl } from "@mysten/sui/client";

const rpc_url = getFullNodeUrl("mainnet");
const hop_api_options: HopApiOptions = {
  api_key: "",
  
  // 1bps = 0.01%. 10_000bps = 100%. 
  // max fee is 470bps (4.7%).
  fee_bps: 0,
  fee_wallet: "Enter your sui address here"
};

const sdk = new HopApi(rpc_url, hop_api_options);

1. Get a Swap Quote

Call this first to display the expected amount out.

const quote = await sdk.fetchQuote({
  token_in: "",
  token_out: "",
  amount_in: 0,
});

2. Get a Swap Transaction

Call this when a user clicks trade and wants to execute a transaction.

const tx = await sdk.fetchTx({
  trade: quote.trade,
  sui_address: "VALID_SUI_ADDRESS_HERE",

  gas_budget: 0.03e9, // optional default is 0.03 SUI
  max_slippage_bps: 100, // optional default is 1%

  return_output_coin_argument: false, // toggle to use the output coin in a ptb
});

3. Get the price of a Token

Return the real-time on-chain price of a token. This pricing API uses Defi pools. It will return two items: the price of the token in SUI as base units, and the price of SUI in USD.

const price = await sdk.fetchPrice({
  coin_type: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP"
});

const deep_price_in_sui = price.price_sui;
const deep_price_in_usd = price.price_usd;
const price_of_sui_in_usd = price.sui_price;

4. Get a list of Verified Tokens

We maintain a list of verified SUI ecosystem tokens and their metadata. This endpoint returns a curated list - with ordering - for your application.

const tokens = await sdk.fetchTokens();

Automatic Updates

As soon as new liquidity sources become available, your SDK will automatically aggregate them, without anything required on your end.

Attribution

Please link to and/or mention Powered by Hop if you are using this SDK.