Default storage provider for Hypercore, using random-access-file for persistent storage of hypercore feeds. Version 1.1.1 is the latest stable release. This package provides a simple storage factory function that creates random-access-storage instances for Hypercore, handling file locking for bitfield files to prevent parallel writers. It is a small, focused utility specific to the Hypercore ecosystem, commonly used in Hypercore-based applications like Dat-Protocol archives. Release cadence is low as it is a stable dependency.
npm install hypercore-default-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a Hypercore feed with defaultStorage as the storage provider, append data, and read it back.
Ensure the callback provided to hypercore returns the result of calling defaultStorage synchronously.
Always specify a dedicated directory option.
Use separate directories for each process.
Run npm install random-access-file alongside hypercore-default-storage.
Ensure you use require('hypercore-default-storage') correctly.