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-wallet-cli

v0.1.11

Published

Git-style CLI wallet for the Midnight blockchain

Downloads

1,104

Readme

midnight-wallet-cli

npm version npm downloads License TypeScript CI

A standalone CLI wallet for the Midnight blockchain. Manage wallets, check balances, transfer NIGHT tokens, and run a local network — all from the terminal.

Install

npm install -g midnight-wallet-cli

This installs two commands: midnight (or mn for short) and midnight-wallet-mcp.

Commands

| Command | Description | |---------|-------------| | midnight generate | Generate a new wallet or restore from seed/mnemonic | | midnight info | Display wallet address, network, creation date | | midnight balance [address] | Check unshielded NIGHT balance | | midnight transfer <to> <amount> | Send NIGHT tokens to another address | | midnight airdrop <amount> | Fund wallet from genesis (undeployed network only) | | midnight dust register | Register NIGHT UTXOs for dust (fee token) generation | | midnight dust status | Check dust registration status and balance | | midnight address --seed <hex> | Derive an address from a seed | | midnight genesis-address | Show the genesis wallet address | | midnight inspect-cost | Display current block cost limits | | midnight config get/set | Manage persistent config (default network, etc.) | | midnight localnet up/stop/down/status | Manage a local Midnight network via Docker | | midnight help [command] | Show usage for all or a specific command |

Quick Start

# Start local network
midnight localnet up

# Generate a wallet
midnight generate --network undeployed

# Airdrop tokens and register dust
midnight airdrop 1000
midnight dust register

# Check balance
midnight balance

# Transfer NIGHT
midnight transfer mn_addr_undeployed1... 100

Supported Networks

| Network | Description | |---------|-------------| | undeployed | Local network via Docker (midnight localnet up) |

JSON Output for Automation

Every command supports --json for structured output:

midnight balance --json
# → {"address":"mn_addr_...","network":"undeployed","balances":{"NIGHT":"504.850000"},"utxoCount":2,"txCount":8}

midnight transfer mn_addr_... 100 --json
# → {"txHash":"00ab...","amount":100,"recipient":"mn_addr_...","network":"undeployed"}

When --json is active:

  • stdout receives a single line of JSON
  • stderr is fully suppressed (no spinners, no formatting)
  • Errors produce: {"error":true,"code":"...","message":"...","exitCode":N}

Run midnight help --json for a full capability manifest, or midnight help --agent for a comprehensive AI agent reference.

MCP Server for AI Agents

The package includes an MCP (Model Context Protocol) server that exposes all wallet operations as typed tools. AI agents call them directly via JSON-RPC over stdio — no shell spawning or output parsing needed.

Claude Code

Create .mcp.json in your project root:

{
  "mcpServers": {
    "midnight-wallet": {
      "command": "midnight-wallet-mcp"
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "midnight-wallet": {
      "command": "midnight-wallet-mcp"
    }
  }
}

Cursor

Create .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "midnight-wallet": {
      "command": "midnight-wallet-mcp"
    }
  }
}

VS Code (GitHub Copilot)

Create .vscode/mcp.json in your project root:

{
  "servers": {
    "midnight-wallet": {
      "type": "stdio",
      "command": "midnight-wallet-mcp"
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "midnight-wallet": {
      "command": "midnight-wallet-mcp"
    }
  }
}

Tip: If you haven't installed globally, use "command": "npx" with "args": ["-y", "midnight-wallet-cli@latest", "--mcp"] instead.

Available MCP Tools

Once connected, your AI agent gets access to 17 tools:

| Tool | Description | |------|-------------| | midnight_generate | Generate or restore a wallet | | midnight_info | Show wallet info (no secrets) | | midnight_balance | Check NIGHT balance | | midnight_address | Derive address from seed | | midnight_genesis_address | Show genesis wallet address | | midnight_inspect_cost | Show block cost limits | | midnight_airdrop | Fund wallet from genesis | | midnight_transfer | Send NIGHT tokens | | midnight_dust_register | Register UTXOs for dust generation | | midnight_dust_status | Check dust status | | midnight_config_get | Read config value | | midnight_config_set | Write config value | | midnight_localnet_up | Start local network | | midnight_localnet_stop | Stop local network | | midnight_localnet_down | Remove local network | | midnight_localnet_status | Show service status | | midnight_localnet_clean | Remove conflicting containers |

Issues & Feedback

Found a bug or have a feature request? Open an issue on the public hub repo.

For documentation, guides, and more: midnight-wallet-cli-hub

Requirements

  • Node.js >= 20
  • Docker (for midnight localnet commands)
  • A running proof server on localhost:6300 (for transactions on undeployed network)