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

@swipelux/onramp-js

v1.0.6

Published

Vanilla JavaScript SDK for integrating the Swipelux On-Ramp Widget into any web application.

Readme

@swipelux/onramp-js

Vanilla JavaScript SDK for integrating the Swipelux On-Ramp Widget into any web application.

Installation

npm install @swipelux/onramp-js
# or
yarn add @swipelux/onramp-js
# or
pnpm add @swipelux/onramp-js

Usage

Web Component

The SDK provides a Web Component that you can use directly in your HTML:

<swipelux-widget
  api-key="your_api_key"
  widget-url="https://app.swipelux.com"
></swipelux-widget>

JavaScript API

You can also use the JavaScript API to programmatically control the widget:

import { SwipeluxWidget } from '@swipelux/onramp-js';

const widget = new SwipeluxWidget({
  apiKey: 'your_api_key',
  widgetUrl: 'https://app.swipelux.com', // optional
});

// Initialize the widget
sdk.mount(document.getElementById('swipelux-widget'));

// Unmount when done
sdk.unmount();

Configuration

Required Settings

  • apiKey: Your Swipelux API key in UUID format (e.g., "123e4567-e89b-12d3-a456-426655440000")

Optional Settings

  • widgetUrl: URL where the widget is hosted

    • Default: "https://app.swipelux.com"
    • Use "https://app.dev.swipelux.com" for development environment
  • orderToken: Order token for prepared orders (e.g., "ord_123xyz")

  • paymentChannel: Preferred payment method

    • Options: "CARD_PAYMENT" | "WIRE_TRANSFER" | "APPLE_PAY" | "SKRILL"
  • availablePayCurrency: Available payment currency code (e.g., "USD")

  • availableReceiveCurrency: Available receive currency configuration

    • Simple format: "BTC", "ETH", etc.
    • Extended format: { code: string, protocol?: string }
  • smartContractData: Smart contract configuration for NFT purchases

    • Properties:
      • imgUrl: Image URL for the smart contract
      • name: Name of the smart contract
      • Additional custom properties supported
  • defaultValues: Pre-filled form values with editability control

    • targetAddress: Crypto wallet address
    • phone: Phone number
    • email: Email address
    • fiatAmount: Initial fiat amount
  • colors: Theme color customization

    • main: Primary color
    • background: Background color
    • processing: Processing state color
    • warning: Warning state color
    • success: Success state color
    • link: Link color
  • externalId: External reference ID

    • String value or async function returning a string
  • signature: Branding signature configuration

    • text: Signature text
    • logoUrl: Logo image URL
    • href: Link URL
  • forceNewTransaction: Force creation of a new transaction

    • Default: false
  • closeOnSuccess: Automatically close widget after successful transaction

    • Default: false

Web Component Attributes

When using the web component, attributes should be in kebab-case:

<swipelux-widget
  api-key="your_api_key"
  widget-url="https://app.swipelux.com"
></swipelux-widget>

Browser Support

This SDK uses Web Components and requires modern browser support. It works in all major browsers:

  • Chrome/Chromium (and derivatives)
  • Firefox
  • Safari
  • Edge

Development

# Install dependencies
pnpm install

# Build the package
pnpm build

# Development with watch mode
pnpm dev

# Lint the code
pnpm lint

TypeScript Support

This package includes TypeScript definitions and can be used in TypeScript projects without additional configuration.

License

MIT


For more information, visit Swipelux Documentation.