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

aetherdex-sdk

v1.1.1

Published

AetherDex Aggregator SDK - Integrate cross-chain swaps into your app

Readme

AetherDex Partner SDK

Integrate AetherDex cross-chain swap aggregation into your application with partner volume tracked for reward distribution.

Installation

npm install @aetherdex/sdk
# or
yarn add @aetherdex/sdk

Quick Start

import { AetherDexSDK } from "@aetherdex/sdk";

// Initialize with your partner ID
const sdk = new AetherDexSDK({
  partnerId: "your-app-name",
  debug: true, // Optional: enable logging
});

// Get a quote for USDC → USDC cross-chain swap
const quote = await sdk.getQuote({
  fromChainId: 1, // Ethereum
  toChainId: 137, // Polygon
  fromToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC on ETH
  toToken: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", // USDC on Polygon
  fromAmount: "1000000000", // 1000 USDC (6 decimals)
  fromAddress: "0x...", // User's wallet
});

console.log(
  "You will receive:",
  AetherDexSDK.formatAmount(
    quote.estimate.toAmount,
    quote.action.toToken.decimals
  )
);

Execute Swap

import { ethers } from "ethers";

// Get transaction data
const txData = sdk.getSwapTransaction(quote);

if (txData) {
  // Execute with ethers.js
  const provider = new ethers.BrowserProvider(window.ethereum);
  const signer = await provider.getSigner();

  const tx = await signer.sendTransaction({
    to: txData.to,
    data: txData.data,
    value: txData.value,
    gasLimit: txData.gasLimit,
  });

  console.log("Swap tx:", tx.hash);
}

With Viem

import { createWalletClient, http } from "viem";
import { mainnet } from "viem/chains";

const client = createWalletClient({
  chain: mainnet,
  transport: http(),
});

const txData = sdk.getSwapTransaction(quote);

const hash = await client.sendTransaction({
  to: txData.to,
  data: txData.data,
  value: BigInt(txData.value),
});

API Reference

Constructor

new AetherDexSDK({
  partnerId: string, // Required: Your unique partner ID
  apiKey: string, // Optional: Custom API key
  debug: boolean, // Optional: Enable debug logging
});

Methods

| Method | Description | | ------------------------------- | ----------------------------------- | | getQuote(request) | Get best swap route with pricing | | getRoutes(request) | Get multiple route options | | getSwapTransaction(quote) | Extract transaction data from quote | | needsApproval(quote) | Check if token approval is needed | | getApprovalTransaction(...) | Get approval tx data | | getChains() | Get supported chain IDs | | getTokens() | Get all tokens organized by chain | | getTokensByChain(chainId) | Get tokens for specific chain | | getAllTokens() | Get all tokens as flat array | | searchToken(symbol, chainId?) | Search for token by symbol | | getSwapStatus(txHash, ...) | Check status of a swap transaction | | getWalletSwaps(address, ...) | Get recent swaps for a wallet | | getIntegrator() | Get your integrator tag |

Token Discovery Examples

// Get all tokens organized by chain
const tokens = await sdk.getTokens();
console.log(tokens[1]); // All Ethereum tokens
console.log(tokens[137]); // All Polygon tokens

// Get tokens for a specific chain
const ethTokens = await sdk.getTokensByChain(1);

// Get all tokens as flat array
const allTokens = await sdk.getAllTokens();

// Search for USDC across all chains
const usdcTokens = await sdk.searchToken("USDC");

// Search for USDC only on Ethereum
const ethUSDC = await sdk.searchToken("USDC", 1);

Static Helpers

// Format wei to human readable
AetherDexSDK.formatAmount("1000000000", 6); // "1000.000000"

// Parse human readable to wei
AetherDexSDK.parseAmount("1000", 6); // "1000000000"

Supported Chains

| Chain | ID | | --------- | ---------------- | | Ethereum | 1 | | Optimism | 10 | | BSC | 56 | | Polygon | 137 | | Fantom | 250 | | Arbitrum | 42161 | | Avalanche | 43114 | | Solana | 1151111081099710 |

Fee Structure

  • 2% fee on all swaps goes to AetherDex
  • Partner volume tracked via integrator tag: aetherDex-{partnerId}
  • Rewards distributed manually based on tracked volume

Support

  • Telegram: https://t.me/Devwhateley