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

@midnight-ntwrk/midnight-js-protocol

v4.1.1

Published

Protocol type re-exports for midnight-js framework

Readme

Protocol

Version-agnostic re-exports of Midnight protocol packages. Decouples framework consumers from specific protocol version numbers, so that protocol upgrades require changes only in this package.

Versioning Contract

This package must never include a protocol version number in its name. The package name @midnight-ntwrk/midnight-js-protocol is permanent. If the package were renamed to midnight-js-protocol-v2 or similar, every consumer import would need updating, defeating the purpose of this abstraction.

Protocol version changes are handled through:

  • semver (npm package version): major bump when underlying protocol packages change in a breaking way
  • internal re-exports: this package updates which concrete protocol packages it re-exports

Installation

yarn add @midnight-ntwrk/midnight-js-protocol

Usage

Import protocol types through version-agnostic subpaths:

import { type ContractAddress } from '@midnight-ntwrk/midnight-js-protocol/ledger';
import { type CompactRuntime } from '@midnight-ntwrk/midnight-js-protocol/compact-runtime';
import { Contract } from '@midnight-ntwrk/midnight-js-protocol/compact-js';
import { type OnChainRuntime } from '@midnight-ntwrk/midnight-js-protocol/onchain-runtime';
import { createPlatform } from '@midnight-ntwrk/midnight-js-protocol/platform-js';

Sub-path Exports

| Sub-path | Re-exports | Description | | -------- | ---------- | ----------- | | ./ledger | @midnight-ntwrk/ledger-v8 | Ledger types and transaction primitives | | ./compact-runtime | @midnight-ntwrk/compact-runtime | Compact contract runtime utilities | | ./compact-js | @midnight-ntwrk/compact-js | Compact JS bindings | | ./compact-js/effect | @midnight-ntwrk/compact-js/effect | Effect-based Compact bindings | | ./compact-js/effect/Contract | @midnight-ntwrk/compact-js/effect/Contract | Effect-based Contract module | | ./onchain-runtime | @midnight-ntwrk/onchain-runtime-v3 | On-chain runtime (Impact VM) | | ./platform-js | @midnight-ntwrk/platform-js | Platform services | | ./platform-js/effect/Configuration | @midnight-ntwrk/platform-js/effect/Configuration | Effect-based configuration | | ./platform-js/effect/ContractAddress | @midnight-ntwrk/platform-js/effect/ContractAddress | Effect-based contract address resolution |

ESLint Enforcement

An ESLint no-restricted-imports rule prevents direct imports of the underlying protocol packages outside of this package. If you see an error like:

Import from @midnight-ntwrk/midnight-js-protocol/ledger instead.

Replace the direct protocol import with the corresponding subpath from this package.

Resources

Terms & License

By using this package, you agree to Midnight's Terms and Conditions and Privacy Policy.

Licensed under Apache License 2.0.