How to use the hyperdrive/lib/messages.Index function in hyperdrive

To help you get started, we’ve selected a few hyperdrive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github okdistribute / hyperhealth / cli.js View on Github external
function get () {
    debug('getting index message')
    core.get(0, {valueEncoding: messages.Index}, async (err, index) => {
      if (err) return cb()
      if (index && index.type === 'hyperdrive') {
        var contentKey = index.content.toString('hex')
        debug('contentKey', contentKey)
        return cb(contentKey)
      }
      debug('calling back')
      return cb()
    })
  }
}

hyperdrive

Hyperdrive is a secure, real-time distributed file system

Apache-2.0
Latest version published 2 days ago

Package Health Score

74 / 100
Full package analysis