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

@nosana/localnet

v2.2.4

Published

Nosana localnet: Solana test validator with pre-baked Nosana programs + localnet test helpers

Downloads

447

Readme

@nosana/localnet

Docker-based Solana test validator with pre-baked Nosana programs. This package provides the Docker infrastructure only — for test helpers (getLocalnetClient, mintNosTo, vitest integration), see @nosana/scenario.

What's Inside

  • Docker image — a self-contained Solana validator with Nosana programs pre-loaded (no devnet fetching at startup)
  • Docker Compose — bundled compose file with healthcheck
  • Programmatic APIstartLocalnet() / stopLocalnet() to manage the container from code
  • Config constantsLOCALNET_RPC_ENDPOINT, KEYS_DIR, etc.

Quick Start

1. Install

npm install --save-dev @nosana/localnet

2. Start the Validator

Option A: Use the published Docker image

docker run -d --name nosana-localnet \
  -p 8899:8899 -p 8900:8900 -p 8001:8001 \
  nosana/localnet:latest

Nosana programs are pre-baked into the image — no network access needed at startup.

Option B: Use the bundled Docker Compose file

docker compose -f node_modules/@nosana/localnet/docker/docker-compose.yml up -d --wait

Option C: Use the programmatic API

import { startLocalnet, stopLocalnet } from '@nosana/localnet';

startLocalnet();
// ... run tests ...
stopLocalnet();

3. npm Scripts

{
  "scripts": {
    "localnet:up": "docker compose -f node_modules/@nosana/localnet/docker/docker-compose.yml up -d --wait --force-recreate",
    "localnet:down": "docker compose -f node_modules/@nosana/localnet/docker/docker-compose.yml down -v"
  }
}

API Reference

startLocalnet(options?): void

Start the localnet Docker container. Waits for healthcheck.

| Option | Type | Default | Description | |--------|------|---------|-------------| | composeFile | string | bundled compose file | Path to a custom docker-compose file | | containerName | string | nosana-localnet | Container name | | verbose | boolean | false | Print docker-compose output |

stopLocalnet(options?): void

Stop the localnet Docker container and clean up volumes.

Constants

| Export | Value | |--------|-------| | LOCALNET_RPC_ENDPOINT | http://127.0.0.1:8899 | | LOCALNET_WS_ENDPOINT | ws://127.0.0.1:8900 | | KEYS_DIR | Absolute path to bundled NOS mint keypairs | | FIXTURES_DIR | Absolute path to bundled account fixtures |

Docker Image

Nosana programs and accounts are pre-fetched from devnet during docker build and stored as fixtures inside the image. At startup the validator loads these fixtures via --bpf-program and --account flags — no network access is needed at runtime.

Build the image locally:

cd node_modules/@nosana/localnet
docker build -t nosana/localnet:latest .

The image exposes:

  • 8899 — Solana RPC
  • 8900 — Solana WebSocket
  • 8001 — Gossip

NOS Mint

The NOS mint (devr1BGQndEW5k5zfvG5FsLyZv1Ap73vNgAHcQ9sUVP) is pre-baked into the Docker image as a fixture with the bundled mint authority (dumQVNHZ1KNcLmzjMaDPEA5vFCzwHEEcQmZ8JHmmCNH). The authority private key ships with this package in keys/, so anyone can mint NOS tokens on localnet.

On devnet/mainnet, the real NOS token uses a different authority whose key is not public — that's why localnet uses its own mint authority.