Skip to content

Instantly share code, notes, and snippets.

@andrewosh
Created June 12, 2016 17:45
Show Gist options
  • Save andrewosh/202f7f913eae0ce052904b02b0f0f3f8 to your computer and use it in GitHub Desktop.
Save andrewosh/202f7f913eae0ce052904b02b0f0f3f8 to your computer and use it in GitHub Desktop.
var memdb = require('memdb')
var crypto = require('crypto')
var hyperdrive = require('hyperdrive')
var drive = hyperdrive(memdb())
var archive = drive.createArchive('21db26992a79966fc3336a711122ba160910cc6ce24bd6552cb21949d6c9d1d5', { live: true })
console.log('key:', archive.key.toString('hex'))
archive.list(function (err, entries) {
console.log('err:', err)
console.log('entries:', entries)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment