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

@steelswap/steelswap-sdk

v1.3.3

Published

SDK for the SteelSwap DEX Aggregator API on Cardano

Readme

@steelswap/steelswap-sdk

TypeScript SDK for the SteelSwap DEX Aggregator API on Cardano.

Installation

npm install @steelswap/steelswap-sdk

Quick Start

import { SteelSwapClient } from '@steelswap/steelswap-sdk'

const client = new SteelSwapClient({
  token: process.env.STEELSWAP_TOKEN,
  partner: 'examplepartner',
})

// Get available tokens
const tokens = await client.getTokens()

// Estimate a swap (ADA to token)
const estimate = await client.estimateSwap({
  tokenA: '', // Empty string = ADA
  tokenB: 'policyId.assetName',
  quantity: '10000000', // 10 ADA in lovelace
})

console.log('Expected output:', estimate.totalOutput)

Configuration

const client = new SteelSwapClient({
  // API URL (default: https://api.steelswap.io)
  baseUrl: process.env.STEELSWAP_API_URL,

  // Authentication token (sent as 'token' header)
  token: process.env.STEELSWAP_TOKEN,

  // Partner ID (auto-injected into swap requests)
  partner: 'examplepartner',

  // Output format for numeric values
  // 'string' (default) | 'number' | 'bigint' | 'Big'
  numericFormat: 'string',

  // Request timeout in ms (default: 30000)
  timeout: 30000,
})

API Methods

Swap Operations

// Estimate swap routing
const estimate = await client.estimateSwap({
  tokenA: '',
  tokenB: 'policy.asset',
  quantity: '10000000',
  hop: false, // Enable multi-hop routing
})

// Build unsigned transaction
const { tx } = await client.buildSwap({
  tokenA: '',
  tokenB: 'policy.asset',
  quantity: '10000000',
  address: 'addr1...',
  utxos: ['txhash#0', ...],
  slippage: '100', // 1% in basis points
})

// Cancel pending swap
const cancelTx = await client.cancelSwap({
  txList: [{ txHash: 'abc...', index: 0 }],
  ttl: 900,
})

Token Operations

const tokens = await client.getTokens()
const price = await client.getTokenPriceUsd('policy.asset')
const icon = await client.getTokenIcon('policy.asset')
const pairs = await client.findTradingPairs('policy.asset', ['dex-to-ignore'])
const orders = await client.getOrders({ tokenA: '', tokenB: 'policy.asset' })
const pools = await client.getPools({ tokenA: '', tokenB: 'policy.asset' })

Wallet Operations

const history = await client.getWalletHistory({
  addresses: ['addr1...'],
  page: 0,
  pageSize: 25,
})

const pending = await client.getWalletPending({
  addresses: ['addr1...'],
})

await client.notifySubmitted({ txHash: 'abc123...' })

Utility

const dexes = await client.getDexList()
const stats = await client.getStatistics()

Numeric Handling

Input: All numeric parameters accept string | number | bigint | Big

import Big from 'big.js'

// All valid
await client.estimateSwap({ ..., quantity: 10000000 })
await client.estimateSwap({ ..., quantity: '10000000' })
await client.estimateSwap({ ..., quantity: 10000000n })
await client.estimateSwap({ ..., quantity: new Big('10000000') })

Output: Controlled by numericFormat config

// Get Big.js instances for calculations
const client = new SteelSwapClient({ numericFormat: 'Big' })
const estimate = await client.estimateSwap({ ... })
const withFee = estimate.totalOutput.times('0.997')

API Environments

| Environment | URL | |-------------|-----| | Production | https://api.steelswap.io (default) | | Development | https://apidev.steelswap.io |

Documentation

Full documentation: https://github.com/SteelSwap/steelswap-sdk

License

MIT