hyperdrive
hyperdrive copied to clipboard
fix: Add missing options to storage constructor
The README says:
The
storageparameter defines how the contents of the drive will be stored....
name: the name of the file to be storedopts
key: the feed key of the underlying Hypercore instancediscoveryKey: the discovery key of the underlying Hypercore instancedrive: the current Hyperdrive instance
It wasn't clear to me if opts still has the feed key and discovery key, but I pass them along here anyway. If the README is out of date, I can update it too in this PR.
This feature /could be/(?) useful if you are creating a storage adapter that needs the drive/hypertrie, like files-as-files, although I haven't gone too far down that rabbithole yet.