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

@moonpay/platform-protocol

v1.8.0

Published

Shared protocol types for the MoonPay Developer Platform

Readme

@moonpay/platform-protocol

Shared protocol and API types for the MoonPay Developer Platform SDKs. This package is the single source of truth for the contract between MoonPay frames and partner integrations: wire protocol primitives, per-frame message maps, domain models, REST API types, and the Result type all SDK methods return.

It contains types only, plus the tiny ok() / err() helpers for constructing Result values — there is no other runtime code.

Installation

This package ships as a dependency of the platform SDKs (@moonpay/platform-sdk-web, @moonpay/platform-sdk-react-native, @moonpay/platform-sdk-node), so most integrations don't install it directly. Install it standalone when you need the types on their own:

npm install @moonpay/platform-protocol

Usage

There is no barrel export — import from subpaths:

import type { Result } from '@moonpay/platform-protocol/result';
import type { Quote, Transaction } from '@moonpay/platform-protocol/api';
import { ConnectionStatus } from '@moonpay/platform-protocol/models/connection';
import type { Event as WidgetEvent } from '@moonpay/platform-protocol/sdks/widget';

Subpath exports

| Subpath | Contents | |---------|----------| | ./protocol | Wire format primitives: message envelope, handshake/ack, FrameError | | ./result | Result<T, E>, EmptyResult<E>, ok(), err() | | ./frames/* | Per-frame message maps (widget, apple-pay, google-pay, buy, buy-button, connect, auth, add-card, challenge, reset, customer-export) | | ./sdks/* | SDK-facing event and setup error types per frame | | ./models/* | Cross-frame domain models (connection, transaction, challenge) | | ./api | REST API types (quotes, transactions, payment methods) | | ./api/identity | Identity API types (deprecated — see ./api/customer) | | ./api/customer | Customer API types | | ./api/errors | API error types |

Documentation

Full guides and API reference: dev.moonpay.com

License

MIT