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

@provable-games/on-ramp-sdk

v0.1.2

Published

A slim wrapper over Swapper Finance's deposit widget for funding Starknet wallets (USDC) with a card.

Downloads

566

Readme

@provable-games/on-ramp-sdk

A slim wrapper over Swapper Finance's deposit widget for funding Starknet wallets with a card. Users buy USDC with a debit/credit card, Apple Pay, or a crypto transfer, delivered to their Starknet address — Swapper handles the on-ramp providers, cross-chain routing, and compliance.

The wrapper fills in the Starknet defaults (dstChainId, USDC token) and your integrator config, so an integration is a couple of lines.

Install

pnpm add @provable-games/on-ramp-sdk @swapper-finance/deposit-sdk

@swapper-finance/deposit-sdk is a peer dependency (it renders the widget).

Quick start

import { createSwapperDeposit } from "@provable-games/on-ramp-sdk";

const deposit = createSwapperDeposit({ integratorId: "YOUR_INTEGRATOR_ID" });

// In a click handler — opens the widget in a modal, USDC on Starknet by default:
const modal = deposit.openModal({
  depositWalletAddress: player.address, // the connected Starknet wallet
  onEvent: (e) => console.log("swapper event", e),
});
// modal.close();

// Or embed it inline in a container element:
deposit.mount("#deposit-container", { depositWalletAddress: player.address });

The integratorId is issued by the Swapper team and is a public (client-side) identifier — there's no separate API key.

Config

createSwapperDeposit(config):

| Field | Default | Notes | | --- | --- | --- | | integratorId | — (required) | Your Swapper integrator id | | chainId | "starknet" | Swapper destination chain id | | tokenAddresses | Starknet USDC/STRK/ETH | Override the per-asset dstTokenAddr | | styles | — | Widget theming (themeMode + componentStyles) | | minDepositUsd / maxDepositUsd | — | Deposit limits | | supportedDepositOptions | — | card / crypto transfer / wallet | | webhookUrl | — | Called on transaction.completed |

openModal(params) / mount(container, params):

| Field | Default | Notes | | --- | --- | --- | | depositWalletAddress | — (required) | Destination Starknet address | | asset | "USDC" | USDC / STRK / ETH | | customContractCalls | — | Post-swap contract calls | | onEvent | — | transaction_success / close_request |

Styling

createSwapperDeposit({
  integratorId,
  styles: {
    themeMode: "dark",
    componentStyles: {
      primaryColor: "#92FF66",
      primaryButtonTextColor: "#0F190D",
      accentColor: "#80E0A9",
      sphereColor: "#15EB17",
    },
  },
});

Note: the SDK's ComponentStyles (v0.2.x) uses primaryButtonTextColor, not primaryTextColor.

Starknet tokens

STARKNET_TOKEN_ADDRESSES holds the defaults used for dstTokenAddr. USDC is the token Swapper delivers on Starknet (0x033068…35fb, symbol "USDC", 6 decimals). The separate older "USD Coin" deployment (0x053c91…368a8) is exported as STARKNET_USD_COIN for reference — make sure your vault / liquidity references the same USDC you deposit in.

Example app

A runnable Vite + React demo lives in examples/react-vite: connect a Cartridge Controller, then fund it via Swapper. Set VITE_SWAPPER_INTEGRATOR_ID to enable the widget.

cd examples/react-vite
pnpm install
pnpm dev

Development

pnpm install
pnpm build       # tsup → dist (ESM + CJS + d.ts)
pnpm test        # vitest
pnpm typecheck   # tsc --noEmit

License

MIT