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

@steerprotocol/app-loader

v3.0.6

Published

App Loader for Steer Protocol

Readme

Steer Protocol App Loader

Load and execute Steer wasm bundles in Node.js and browser environments.

Node 18+ is required.

Install

npm install @steerprotocol/app-loader

Runtime Support

  • Root import @steerprotocol/app-loader
    • Node: resolves to the Node entrypoint
    • Browser bundlers: resolves to the browser entrypoint through the browser export condition
  • Explicit browser import: @steerprotocol/app-loader/browser
  • Explicit Node import: @steerprotocol/app-loader/node

Usage

Node

Use the root import for typical Node usage.

import { loadWasm } from '@steerprotocol/app-loader';
import type { WasmModule } from '@steerprotocol/app-loader';

const bundle: WasmModule = await loadWasm('/absolute/path/to/bundle.wasm');
bundle.initialize('{"example":true}');

Node supports:

  • filesystem paths
  • ArrayBuffer
  • remote URLs

Node runtime note:

  • native fetch is required
  • Node 18+ is the supported baseline

If you want an explicit Node-only import:

import { loadWasm } from '@steerprotocol/app-loader/node';
import type { WasmModule } from '@steerprotocol/app-loader/node';

const bundle: WasmModule = await loadWasm('/absolute/path/to/bundle.wasm');

Browser

The browser entry supports ArrayBuffer and remote URL loading.

import { loadWasm } from '@steerprotocol/app-loader';
import type { WasmModule } from '@steerprotocol/app-loader';

const response = await fetch('/bundle.wasm');
const bundle: WasmModule = await loadWasm(await response.arrayBuffer());
bundle.initialize('{"example":true}');

If you want to pin the browser-specific entrypoint:

import { loadWasm } from '@steerprotocol/app-loader/browser';
import type { WasmModule } from '@steerprotocol/app-loader/browser';

const response = await fetch('/bundle.wasm');
const bundle: WasmModule = await loadWasm(await response.arrayBuffer());

Browser ccxt

In browsers, ccxt is expected on globalThis.ccxt.

If you load ccxt from a CDN or hosted bundle, make sure it is available before executing wasm that depends on it.

<script src="https://unpkg.com/[email protected]/dist/ccxt.browser.min.js"></script>

The hosted browser build is covered by the default test suite with a live network smoke test against the same unpkg URL.

Node ccxt

In Node, ccxt is loaded from the installed module automatically.

API

Main exports:

  • loadWasm(input, imports?)
  • loadWasmSync(input, imports?)
  • WasmModule (type-only export)
  • Candle
  • RawTradeData

WasmModule is a type-only export. Strict TypeScript consumers, including projects using moduleResolution: "NodeNext", module: "NodeNext", and verbatimModuleSyntax: true, must import it with import type:

import { loadWasm } from '@steerprotocol/app-loader';
import type { WasmModule } from '@steerprotocol/app-loader';

The same rule applies to @steerprotocol/app-loader/node and @steerprotocol/app-loader/browser.

The non-type-only form is not the supported pattern for strict TS consumers:

import { WasmModule, loadWasm } from '@steerprotocol/app-loader';

The returned wasm wrapper exposes the module surface when available, including:

  • initialize(config)
  • execute(...args)
  • config()
  • transform()
  • reset()

Development

Build

npm run build

Unit And Integration Tests

npm test

An env-gated live repro for the deprecated Sushi Polygon v2 connector is enabled when STEER_SUBGRAPH_STUDIO_KEY is set (or STEER_SUBGRAPH_GATEWAY_KEY for local debugging). This connector is kept as historical evidence of a known-broken path and is not part of the supported execution contract.

Packed Consumer Checks

These checks validate the packed artifact in consumer fixtures for:

  • Node ESM
  • Node CJS
  • Strict TypeScript NodeNext consumers
  • Vite browser bundler builds
  • Next.js browser bundler builds
npm run test:consumers

This command builds the package, packs it, installs the tarball into fixture apps, validates the packed export artifacts, and runs each fixture check.

Migration Notes

Version 2 changes the package runtime contract.

  • Browser consumers should rely on the root import only when their bundler honors the browser export condition.
  • Browser ccxt integration now expects the hosted browser build on globalThis.ccxt.
  • Node consumers should use the root import or @steerprotocol/app-loader/node.
  • Browser consumers can use @steerprotocol/app-loader/browser to pin the browser-safe entrypoint explicitly.