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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@transak/ui-js-sdk

v1.0.0

Published

A JavaScript SDK for decentralized applications to onboard their global user base with fiat currency

Readme

Transak SDK

A JavaScript SDK for decentralized applications to onboard their global user base with fiat currency.

Installation

npm i @transak/ui-js-sdk

Example usage

<div id="transakMount"></div>
import { TransakConfig, Transak } from '@transak/ui-js-sdk';

// Complete example with session URL
const initializeTransak = async () => {
  const transakConfig: TransakConfig = {
    widgetUrl: 'api-generated-widgetUrl', // Required
    containerId: 'transakMount', // Id of the element where you want to initialize the iframe
    widgetWidth: '100%', // Optional widget dimensions
    widgetHeight: '600px',
  };

  let transak = new Transak(transakConfig);
  transak.init();

  return transak;
};

// Initialize the widget
const transak = await initializeTransak();

// This will trigger when the user closed the widget
Transak.on(Transak.EVENTS.TRANSAK_WIDGET_CLOSE, () => {
  console.log('Transak SDK closed!');
});

/*
 * This will trigger when the user has confirmed the order
 * This doesn't guarantee that payment has completed in all scenarios
 * If you want to close/navigate away, use the TRANSAK_ORDER_SUCCESSFUL event
 */
Transak.on(Transak.EVENTS.TRANSAK_ORDER_CREATED, (orderData) => {
  console.log(orderData);
});

/*
 * This will trigger when the user marks payment is made
 * You can close/navigate away at this event
 */
Transak.on(Transak.EVENTS.TRANSAK_ORDER_SUCCESSFUL, (orderData) => {
  console.log(orderData);
  transak.cleanup();
});

TransakConfig

| Property | Type | Required | Description | | :----------- | :----- | :------- | :----------------------------------------------------------------------------------------------------------------------- | | widgetUrl | string | Yes | API generated widgetUrl | | containerId | string | No | HTML element ID to mount the widget (omit for modal) | | widgetWidth | string | No | Widget width (e.g., '100%', '400px') | | widgetHeight | string | No | Widget height (e.g., '600px', '100vh') |

Using Modal UI

If you want to use our modal UI, do not pass the containerId and use transak.close() instead of transak.cleanup()

React Gotchas

Remember to clean up by using the transak.cleanup() or transak.close()

useEffect(() => {
  return () => {
    transak.cleanup();
  };
}, []);

License

ISC Licensed. Copyright (c) Transak Inc.