hyperdrive
hyperdrive copied to clipboard
Transactional writes
We need a transaction API
var archive = hyperdrive(...)
// optionally pass in a random-access-storage for storing the transaction data
var fs = archive.batch()
fs.writeFile(...)
fs.createWriteStream(...)
// will sign the log. if it fails, it'll roll it back
fs.commit(function (err) {
})
We should implement this by simply commit everything to the log but dont sign it (need hypercore option needed.