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

@yuno-payments/sdk-web

v7.12.2

Published

Wrapper to install sdk-web and types

Downloads

15,103

Readme

SDK Web (v1.9)

This package provides a wrapper to easily load and use the Yuno SDK in your web applications.

Installation

npm install @yuno-payments/sdk-web

Basic Usage

import { loadScript } from '@yuno-payments/sdk-web'

// Load the SDK with default settings (production environment)
const sdkPayments = await loadScript()

// Initialize with your public API key
sdkPayments.initialize('your-public-api-key')

Note: The SDK version loaded by this package is v1.9. When SRI is enabled, the version used is v1.9.19.

Advanced Usage

The loadScript function accepts optional configuration props, primarily for testing and development purposes:

import { loadScript } from '@yuno-payments/sdk-web'

// Load SDK from a specific environment
const sdkPayments = await loadScript({
  env: 'sandbox'  // Options: 'dev', 'staging', 'sandbox', 'prod'
})

sdkPayments.initialize('your-public-api-key')

Subresource Integrity (SRI)

You can enable SRI to ensure the SDK script has not been tampered with. When sri is set to true, the script tag will include an integrity attribute and crossorigin="anonymous". SRI is supported for sandbox and prod environments, default to prod.

import { loadScript } from '@yuno-payments/sdk-web'

const sdkPayments = await loadScript({
  sri: true
})

Note: When sri is enabled, the SDK is loaded from a static bundle URL. SRI is only available for sandbox and prod environments. For dev and staging, the sri option is ignored and the regular URL is used.

Custom Base URL

You can override the domain (and optionally a base path) the SDK script is loaded from with the baseUrl option. The version path is appended to it, and env no longer affects the host:

import { loadScript } from '@yuno-payments/sdk-web'

// Loads https://some.domain/v1.9/main.js
const sdkPayments = await loadScript({ baseUrl: 'https://some.domain' })

// Loads https://some.domain/any/path/v1.9/main.js
const sdkPayments = await loadScript({ baseUrl: 'https://some.domain/any/path' })

Note: baseUrl also applies when sri is enabled — the static bundle path (/sdk-static-bundles-ms/sdk-web/v1.9.19/main.js) is appended to your base URL. Since the integrity hash is pinned, the file served from your domain must be byte-identical to the official bundle.

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | env | 'dev' \| 'staging' \| 'sandbox' \| 'prod' | 'prod' | Environment to load the SDK from. Use different environments for testing. | | sri | boolean | false | Enable Subresource Integrity. Only supported for sandbox and prod. | | baseUrl | string | — | Custom origin (and optional base path) to load the SDK from, e.g. https://some.domain/any/path. Overrides the host derived from env. |

TypeScript Support

This package includes TypeScript definitions. The loadScript function returns a Promise that resolves to the SDK instance (typed as SdkPayments) with full type support.

import { loadScript } from '@yuno-payments/sdk-web'

const sdkPayments = await loadScript({ env: 'sandbox' })

Types come from @yuno-payments/sdk-web-types. The public surface uses the whitelabel-neutral names (SdkPayments, SdkPaymentsInstance, SdkPaymentsConfig). At runtime loadScript reads the window.SdkPayments global (requires SDK v1.9.0+).