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

@open-rpc/extensions

v0.0.2

Published

@OpenRPC - extensions repository

Readme

OpenRPC Extensions

A collection of OpenRPC Specification Extensions that enhance and extend the functionality of OpenRPC documents.

Overview

This repository contains concrete implementations of OpenRPC extensions that follow the OpenRPC Specification Extension format. Extensions in this repository may eventually be adopted into the official OpenRPC specification after proving their usefulness and gaining community adoption.

Extensions are always prefixed with x- and allow developers to add features and functionality that aren't currently in the OpenRPC specification or fall outside of the specification context.

Purpose

The extensions repository serves several important purposes:

  • Centralized Collection: Provides a common place for useful OpenRPC extensions
  • Reusability: Makes it easy for developers to adopt existing extensions in their projects
  • Standardization: Encourages consistent extension patterns across the ecosystem
  • Incubation: Allows extensions to be tested and refined before potential inclusion in the official specification
  • Tooling Support: Enables OpenRPC tools to support these extensions consistently

Repository Structure

Extensions are organized in the following structure:

packages/extensions/
├── src/
│   ├── x-extension-name/
│   │   ├── README.md           # Documentation for the extension
│   │   ├── index.ts            # TypeScript exports and types
│   │   └── x-extension-name.json  # Extension definition
│   ├── x-another-extension/
│   │   └── ...
│   └── index.ts                # Exports all extensions
└── ...

Each extension must include:

  1. A README.md with documentation
  2. An index.ts file with TypeScript types and exports
  3. An x-extension-name.json file with the extension definition

The root index.ts file should export the JSON and types for all extensions to make them available to other projects.

Available Extensions

x-error-groups

Group, organize, and reuse JSON-RPC error definitions across OpenRPC methods via references. This extension allows defining reusable error collections that can be referenced across methods.

View Documentation

Using Extensions

To use an extension in your OpenRPC document, you must:

  1. Include the extension definition in the x-extensions array at the root of your OpenRPC document
  2. Use the extension in the appropriate location as specified by the extension's restricted field

Here's a complete example:

{
  "openrpc": "1.2.6",
  "info": {
    "title": "Example API",
    "version": "1.0.0"
  },
  "methods": [
    {
      "name": "exampleMethod",
      "x-error-group": [
        {
          "$ref": "#/components/x-error-group/CommonErrors"
        }
      ]
    }
  ],
  "components": {
    "x-error-group": {
      "CommonErrors": [
        {
          "code": -32000,
          "message": "Server error",
          "data": "An unexpected error occurred"
        }
      ]
    }
  },
  "x-extensions": [
    {
      "openrpcExtension": "0.0.0-development",
      "name": "x-error-group",
      "version": "0.0.1",
      "description": "Enables grouping and organization of JSON-RPC errors in OpenRPC methods.",
      "summary": "Group, organize, and reuse JSON-RPC error definitions across OpenRPC methods via references",
      "externalDocumentation": {
        "description": "github",
        "url": "https://github.com/open-rpc/tools/tree/main/packages/extensions/src/x-error-groups"
      },
      "restricted": ["methodObject"],
      "schema": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "integer",
                    "description": "The code of the error."
                  },
                  "message": {
                    "type": "string",
                    "description": "The message of the error."
                  },
                  "data": {
                    "description": "The data of the error."
                  }
                },
                "required": ["code", "message"]
              }
            },
            {
              "type": "object",
              "properties": {
                "$ref": {
                  "type": "string"
                }
              },
              "required": ["$ref"]
            }
          ]
        }
      }
    }
  ]
}

The x-extensions array contains the full definition of each extension used in your document, which allows tools to understand and validate your use of the extension.

Contributing New Extensions

To propose a new extension:

  1. Create a new folder in src/ with your extension name (prefixed with x-)
  2. Add the required files (README.md, index.ts, and x-extension-name.json)
  3. Update the root index.ts to export your extension
  4. Submit a Pull Request to this repository

New extensions should solve a common problem or provide functionality that would be useful across multiple OpenRPC documents.

Extension Lifecycle

Extensions in this repository follow a lifecycle:

  1. Proposal: Initial submission as a PR to this repository
  2. Incubation: Extension is used and refined in real-world applications
  3. Adoption: Extension gains support in OpenRPC tooling
  4. Standardization: If widely adopted, the extension may be proposed for inclusion in the official OpenRPC specification via the open-rpc/spec repository

Related Resources

License

Apache 2.0