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

@slopz/sdk

v0.2.0

Published

Browser SDK for Slopz identity, community leaderboards, and safe banner delivery

Readme

@slopz/sdk

Browser SDK for games embedded on Slopz. It supports Universal Profile player context, community leaderboards, and safe scheduled banner delivery through a private channel to the Slopz parent.

The game SDK does not connect to the Slopz API or receive a platform session. Slopz injects its parent origin into the iframe URL, establishes the nonce-bound MessageChannel, and brokers SDK requests.

Authenticated players and leaderboard entries include a cached public LSP3 profile when one is available. Platform code using SlopzApiClient can enrich other public addresses, such as coin trade history, in batches of up to 50:

const profiles = await api.resolveUniversalProfiles(addresses)

The returned array preserves address order and uses null for addresses that are not Universal Profiles. The backend refreshes each cached result after 24 hours.

Render a banner

Add a container owned by the game:

<div id="slopz-banner"></div>

Then let the SDK populate it:

import { createSlopzGame } from '@slopz/sdk'

const slopz = createSlopzGame({
  gameId: 'game_123',
  clientId: 'slopz_pk_123',
})

const banner = await slopz.mountAd({
  slotKey: 'banner',
  container: '#slopz-banner',
})

// Optional when the game's screen changes.
await banner.refresh()

// On teardown.
banner.destroy()
slopz.dispose()

The stable banner key is implemented by the game and declared in the repository's slopz.slots.json. An authenticated developer or developer agent runs slopz slots sync; runtime game code cannot mutate the platform inventory. Placement metadata and rental policy are separate sections of that manifest, so changing a price does not require changing the game bundle.

When the game is embedded by Slopz, the host injects the canonical game and client IDs into the runtime URL. Games that only run through Slopz can use createSlopzGame() without hardcoding either identifier. Standalone localhost builds remain playable, but hosted identity, leaderboard, and ad calls are unavailable until the build is opened through its Slopz draft page.

The SDK inserts only an HTTPS link and an image. It sets target="_blank" and rel="noopener noreferrer sponsored", never executes advertiser markup, and refreshes the scheduled creative every 30 seconds. Games remain responsible for sizing and styling the container and the emitted .slopz-sdk-ad-link and .slopz-sdk-ad-image elements.

For custom rendering, call await slopz.getAd('banner'). This returns the currently scheduled creative or null; it does not report impressions, clicks, conversions, or player targeting data.

Three.js, Phaser, Unity WebGL, and other engine-style integrations can subscribe without creating DOM:

const watch = await slopz.watchAd({
  slotKey: 'banner',
  onChange: (ad) => updateBillboardTexture(ad?.imageUrl ?? fallbackTexture),
})

Package validation

Run the complete SDK gate from the repository root:

pnpm ci:sdk

The gate builds the SDK, runs unit and host-protocol fixtures, creates the real npm tarball, enforces its file allowlist, installs it into a temporary standalone game, verifies the public runtime exports, and compiles that game against the installed package.

Changes under packages/sdk are released from the private staging branch through the allowlisted public package mirror. SDK changes rebuild downstream web consumers, while the unrelated CLI package remains skipped.