
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
P2P database for blind mirrors and relays, backed by RocksDB or an Hyperbee.
myDB = new MirrorDB(storage)storage is an Hypercore or a string with the path to where you want a RocksDB file to be created.
await myDB.insert(...records)Inserts the records inside the database. Records should have the following schema:
{
key, // a fixed32 hypercore key
type, // an unsigned integer indicating the type of the key
description // optional, a string describing the mirror
}
keyStream = myDB.list()The keyStream is a streamx readable stream that yields the records in the database, ordered by key.
A query is always running on a snapshot, meaning any inserts/deletes you do while this is running will not impact the query stream itself.
keyStream = myDB.listByType(type)Same as myDB.list(), but yields only elements of the selected key type. Example:
const keyStream = myDB.listByType(1)
all = await keyStream.toArray()Stream helper to simply get all the remaining entries in the stream.
record = await myDB.get(key)Get a record from the database.
randomRecord = await myDB.random()Get a random record from the database.
randomRecord = await myDB.randomByType(type)Like myDB.random(), but returns a random record of the selected key type. Example:
const randomRecord = await myDB.randomByType(0)
await myDB.delete(...keys)Delete the keys records from the database.
mirrors insert [flags] <key>Insert a key into the database
Flags:
--description | -d <description>
Add a description to the key
--type | -t <type>
Specify a type for the key, default is 0
mirrors get <key>Get info about a specific key from the database
mirrors random [flags]Get a random key from the database
Flags:
--type | -t <type>
Specify the type of the key to be randomly extracted
mirrors delete <key>Remove a key from the database
mirrors list [flags]Get a list of keys in the database
Flags:
--type | -t <type>
Show only keys of a specific type
mirrors replicate [key]Seeds the database and prints its public key to console. If a database key argument is provided, it will replicate that.
Apache-2.0
FAQs
DB for Hypercore mirror configs
We found that mirrordb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.