
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@paimaexample/npm-midnight-indexer
Advanced tools
Downloads and runs the Midnight Indexer. It needs a running Midnight Node
A Node.js package that downloads and runs the Midnight Indexer. The indexer requires a running Midnight Node to function properly.
This package provides flexible execution options for the Midnight Indexer:
| Platform | Docker | Binary |
|---|---|---|
| macOS | ✅ Yes | ✅ Yes |
| Linux | ✅ Yes | ✅ Yes |
| Windows | ❌ No | ✅ Yes |
npm install npm-midnight-indexer
APP__INFRA__SECRET environment variable (required)APP__INFRA__SECRET environment variable (required)node index.js [options] [args...]
Options:
--docker - Force Docker execution--binary - Force binary execution (available on Linux, Windows, macOS arm64)--help - Show help informationExamples:
# Force Docker usage
APP__INFRA__SECRET=mysecret node index.js --docker
# Force binary usage (Linux/Windows/macOS arm64)
APP__INFRA__SECRET=mysecret node index.js --binary
# Interactive mode - prompts for Docker vs binary choice
APP__INFRA__SECRET=mysecret node index.js
# Show help
node index.js --help
The indexer supports several environment variables with different defaults based on execution mode:
| Variable | Required | Docker Default | Binary Default | Description |
|---|---|---|---|---|
APP__INFRA__SECRET | Yes | - | - | Secret key for the application |
LEDGER_NETWORK_ID | No | Undeployed | Undeployed | Ledger network identifier |
SUBSTRATE_NODE_WS_URL | No | ws://node:9944 | ws://localhost:9944 | Substrate node WebSocket URL |
FEATURES_WALLET_ENABLED | No | true | true | Enable wallet features |
APP__INFRA__PROOF_SERVER__URL | No | http://proof-server:6300 | http://localhost:6300 | Proof server URL |
APP__INFRA__NODE__URL | No | ws://node:9944 | ws://localhost:9944 | Node WebSocket URL |
# Minimal Docker setup
APP__INFRA__SECRET=A5F07FCAC914A181EC0998CCCA68312DA5F07FCAC914A181EC0998CCCA68312D \
node index.js --docker
# Custom configuration
APP__INFRA__SECRET=mysecret \
LEDGER_NETWORK_ID=CustomNetwork \
SUBSTRATE_NODE_WS_URL=ws://localhost:9944 \
APP__INFRA__PROOF_SERVER__URL=http://localhost:6300 \
node index.js --docker
# Binary mode (uses localhost defaults automatically)
APP__INFRA__SECRET=mysecret node index.js --binary
When using Docker mode, the indexer:
midnightntwrk/indexer-standaloneThe package generates Docker commands similar to:
docker run --rm --name midnight-local-indexer \
-p 8088:8088 \
-e LEDGER_NETWORK_ID=Undeployed \
-e SUBSTRATE_NODE_WS_URL=ws://node:9944 \
-e APP__INFRA__SECRET=A5F07FCAC914A181EC0998CCCA68312DA5F07FCAC914A181EC0998CCCA68312D \
-e FEATURES_WALLET_ENABLED=true \
-e APP__INFRA__PROOF_SERVER__URL=http://proof-server:6300 \
-e APP__INFRA__NODE__URL=ws://node:9944 \
midnightntwrk/indexer-standalone
When using binary mode, the indexer:
The indexer relies on two user-supplied file paths and both are interpreted relative to the process’s current working directory (CWD) when they are not absolute:
| Configuration location | Purpose | If relative, resolved against |
|---|---|---|
CONFIG_FILE environment variable | Location of the YAML config file | The directory you launch node index.js … from (or the Docker WORKDIR) |
infra.storage.cnn_url in YAML | SQLite database used by the standalone build | The CWD at runtime of the indexer process |
indexer-standalone folder, so a default cnn_url: "./indexer.sqlite" ends
up next to the binary.WORKDIR is /opt/indexer-standalone.
Bind-mount volumes accordingly if you want the database file somewhere else.linux-arm64)linux-amd64)macos-arm64)"Docker is not installed or not available"
docker --version"APP__INFRA__SECRET environment variable is required"
export APP__INFRA__SECRET=your_secret_hereAPP__INFRA__SECRET=your_secret node index.js --docker"Binary execution is only supported on macOS ARM64"
--docker flag or run without flags to use Docker automatically"Failed to start midnight-indexer"
The indexer outputs detailed logs including:
npm-midnight-indexer/
├── index.js # Main entry point
├── binary.js # Binary download logic
├── docker.js # Docker execution logic
├── run_midnight_indexer.js # Binary execution logic
├── package.json # Package configuration
└── README.md # This file
# Test Docker detection
node -e "const { checkIfDockerExists } = require('./docker.js'); checkIfDockerExists().then(console.log)"
# Test help
node index.js --help
# Test platform detection
node -e "console.log('Platform:', require('os').platform())"
ISC
For issues related to:
FAQs
Downloads and runs the Midnight Indexer. It needs a running Midnight Node
The npm package @paimaexample/npm-midnight-indexer receives a total of 435 weekly downloads. As such, @paimaexample/npm-midnight-indexer popularity was classified as not popular.
We found that @paimaexample/npm-midnight-indexer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.