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

@sirosfoundation/wmp-js

v0.2.0

Published

Wallet Messaging Protocol (WMP) client library — JSON-RPC 2.0 over WebSocket and HTTP+SSE

Downloads

23

Readme

@sirosfoundation/wmp-js

CI License

TypeScript implementation of the Wallet Messaging Protocol (WMP) — a JSON-RPC 2.0 protocol for bidirectional communication between wallet frontends and backend services.

Features

  • JSON-RPC 2.0 request/response and notification handling
  • Bidirectional peer with concurrent request tracking and timeout support
  • Pluggable transports — WebSocket and HTTP+SSE included
  • Flow profile for orchestrating multi-step wallet flows (issuance, presentation, etc.)
  • Zero runtime dependencies, ESM-only
  • Fully tested — 38 tests

Install

npm install @sirosfoundation/wmp-js

Quick Start

import { Peer, HttpSseTransport } from "@sirosfoundation/wmp-js";

const transport = new HttpSseTransport({
  rpcUrl: "https://wallet-backend.example.com/wmp/rpc",
  eventsUrl: "https://wallet-backend.example.com/wmp/events",
});

const peer = new Peer(transport, {
  // Handle incoming notifications
  onNotification: (method, params) => {
    console.log("notification:", method, params);
  },
});

await peer.connect();

// Create a session
const session = await peer.request("wmp.session.create", {
  wmp: { version: "0.1", session_id: "" },
  auth: { token: "bearer-token" },
});

// Start a flow
const flow = await peer.request("wmp.flow.start", {
  wmp: { version: "0.1", session_id: session.session_id },
  flow_type: "issuance",
  flow_id: "flow-1",
});

API

Transport

interface Transport {
  send(data: string): Promise<void>;
  onMessage(handler: (data: string) => void): void;
  connect(): Promise<void>;
  close(): void;
}

Built-in transports:

  • WebSocketTransport — full-duplex WebSocket
  • HttpSseTransport — HTTP POST for requests, SSE for server notifications

Peer

Bidirectional JSON-RPC 2.0 peer over any Transport.

const peer = new Peer(transport, options);

// Send request and wait for response
const result = await peer.request("method.name", params);

// Send notification (no response expected)
peer.notify("method.name", params);

Flow Profile

Higher-level abstraction for wallet flows.

import { Registry } from "@sirosfoundation/wmp-js";

const registry = new Registry();

registry.register("issuance", {
  onStart: async (ctx, params) => { /* ... */ },
  onProgress: async (ctx, params) => { /* ... */ },
  onComplete: async (ctx, params) => { /* ... */ },
});

Development

npm install
npm test          # run tests
npm run test:watch # watch mode
npm run build     # compile TypeScript
npm run lint      # type-check

License

BSD-2-Clause — Copyright (c) 2026, SIROS Foundation