{
"repo": "hypercore-storage",
"timestamp": "2026-01-16T23:55:45.520Z",
"entryPoint": "index.js",
"exports": {
"packageJson": {
"main": "index.js"
}
},
"api": {
"file": "index.js",
"exports": [
{
"type": "default",
"name": "CorestoreStorage"
}
],
"classes": [
{
"name": "Atom"
},
{
"name": "HypercoreStorage"
},
{
"name": "CorestoreStorage"
}
],
"functions": [
{
"name": "initStoreHead"
},
{
"name": "getBatch"
},
{
"name": "isCorestoreStorage"
},
{
"name": "createColumnFamily"
},
{
"name": "tmpFixStorage"
},
{
"name": "exportData"
},
{
"name": "toArray"
},
{
"name": "noop"
},
{
"name": "getInfoFromBatch"
}
]
},
"readme": {
"content": "# hypercore-storage\n\nThe storage engine for Hypercore. Built on RocksDB.\n\n```\nnpm install hypercore-storage\n```\n\n## API\n\nThe following API is what Hypercore 11 binds to to do I/O.\n\n```js\nconst Storage = require('hypercore-storage')\n```\n\n#### `store = new Storage(dbOrPath)`\n\nMake a new storage engine.\n\n#### `core = await store.createCore({ key, discoveyKey, manifest?, keyPair?, encryptionKey?, userData? })`\n\nCreate a new core, returns a storage instance for that core.\n\n#### `core = await store.resumeCore(discoveryKey)`\n\nResume a previously make core. If it doesn't exist it returns `null`.\n\n#### `atom = store.createAtom()`\n\nPrimitive for making atomic batches across ops. See below for `core.atomize` on how to use it.\nWhen you wanna flush your changes to the underlying storage, use `await atom.flush()`.\n\nInternally to \"listen\" for when that happens you can add an sync hook with `atom.onflush(fn)`\n\n#### `bool = await store.hasCore(discoveryKey)`\n\nCheck if a core exists.\n\n#### `stream = sto",
"sections": [
"intro",
"api",
"license"
],
"hasApi": true,
"hasExamples": true,
"exampleCount": 3,
"examples": [
"npm install hypercore-storage",
"const Storage = require('hypercore-storage')",
"{\n gt: 'only return keys > than this', // Not currently supported\n gte: 'only return keys >= than this',\n lt: 'only return keys < than this',\n lte: 'only return keys <= than this', // Not currently supported\n reverse: false // reverse results. Not currently supported\n}"
]
},
"patterns": [
"append-only-log",
"binary-encoding",
"streaming"
]
}