holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

Changes for Hyperspace #287

Closed andrewosh closed 4 years ago

andrewosh commented 4 years ago

This PR contains a handful of changes to make it easier to work with Hyperspace.

Most importantly, it introduces a Promises API that can be accessed through drive.promises (similar to the fs module).

It also asyncifies a handful of Hypercore methods that were previously assumed to be sync. These were updated to be optionally-async in Hypercore, so as to be compatible with Hyperspace's RemoteHypercores.