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

@silentswap/sdk

v2.3.0

Published

One RFQ-style TypeScript client for private SilentSwap orders and Simple Bridge.

Readme

@silentswap/sdk

One RFQ-style TypeScript client for private SilentSwap orders and Simple Bridge.

Install

pnpm add @silentswap/sdk viem

viem is a peer dependency.

Quick start

import { createSilentSwapClient, parseUsdc } from '@silentswap/sdk';
import { createWalletClient, custom } from 'viem';
import { mainnet } from 'viem/chains';

const transport = custom(window.ethereum);
const discoveryClient = createWalletClient({ chain: mainnet, transport });
const [account] = await discoveryClient.getAddresses();
const walletClient = createWalletClient({ account, chain: mainnet, transport });

const client = createSilentSwapClient({
  walletClient,
  // Registered integrations receive this from SilentSwap.
  // integratorId: 'int_0123456789abcdef01234567',
});

const quote = await client.quote({
  privacy: true,
  inputAddress: account,
  sourceChainId: 1,
  sourceAsset: 'USDC',
  outputs: [
    {
      address: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
      chainId: 8453,
      amount: parseUsdc('100'),
    },
  ],
});

// Display every output, fee, and the expiration before this call.
const order = await client.placeOrder(quote);
const stop = client.trackOrderViaWebSocket(order.reference, console.log, console.error);

Amounts

Private API USDC fields use the gateway chain's USDC precision. Never hardcode a decimals literal: use parseUsdc for requests, formatUsdc for responses, and USDC_DECIMALS when a numeric precision is required. Amount-range error bodies also include usdcDecimals.

Production defaults to https://api.silentswap.com. Set baseUrl only for tests or a self-hosted API. Browser applications must register their exact HTTPS production origin with SilentSwap support; server-side clients are unaffected by browser CORS. Registered integrators configure the issued integratorId on the client. Total fee, integrator/SilentSwap split, and payout address are controlled by SilentSwap and cannot be supplied per quote. Browser testing is enabled by default on http://localhost:3000 and http://127.0.0.1:3000; see testing and production access.

Main API

| Method | Purpose | | --- | --- | | quote(request) | Quote a private route (privacy: true) or Simple Bridge (privacy: false). | | placeOrder(quote) | Approve when needed and submit the wallet transaction, or return pay-in instructions. | | trackOrderViaWebSocket(reference, onState, onError?) | Track private SSE/polling or Simple Bridge polling through one status model. | | executeRefund(privateReference) | Refund an eligible expired private EVM-origin order. |

Non-EVM wallets are supplied through narrow capability adapters. The SDK never discovers injected wallets or chooses a wallet brand. Existing V2 orders must finish with the pinned 0.x SDK before an integration cuts over to 2.0.

See the documentation and V2 migration guide.

Private order access

Requires @silentswap/sdk 2.2.0 or later. A ticket is public on-chain and is not a read credential. Fresh private quotes include an accessToken; the SDK remembers it and carries it in the returned PrivateOrderReference. Keep the reference private and persist it securely if tracking must survive a reload, or provide orderAccessTokenStore in the SDK configuration. The application can track with that credential without another wallet signature.

Direct HTTP integrations must send Authorization: Bearer <accessToken> to GET /order/:ticket, GET /order/:ticket/events, and POST /order/:ticket/deposit-tx. Never put the token in a URL, log, analytics payload, public link or transaction calldata. Browser SSE uses fetch so this header can be sent; native EventSource cannot send it.

A missing or wrong credential returns HTTP 401 with order_access_required. For legacy orders, an authenticated Activity session belonging to the recorded EVM signer can recover access. A public ticket or a claimed sender address is insufficient. Old orders created with an ephemeral signer and no saved credential cannot recover tracking this way; this does not change processing or on-chain refund rights. Existing integrations must upgrade to 2.2.0+ or send the header from their HTTP calls.

The credential authorizes that order's reads and deposit-hash notification; it cannot sign or spend funds. It persists across wallet disconnects and expires on server secret rotation, not Activity sign-out. Treat a saved reference as private browser/app data. Clearing saved data loses access unless owner recovery is available.

License

MIT