How to use the ssb-keys.isHash function in ssb-keys

To help you get started, we’ve selected a few ssb-keys 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 ssbc / ssb-server / plugins / blobs.js View on Github external
want: function (hash, cb) {
        if(!isHash(hash)) return cb(new Error('not a hash:' + hash))

        blobs.has(hash, function (_, has) {
          if(has) return cb()
          queue(hash, cb)
        })
      },
github ssbc / ssb-server / plugins / blobs.js View on Github external
pull.drain(function (data) {
        var hash = data.dest
        if(isHash(hash))
          blobs.has(hash, function (_, has) {
            if(!has) queue(hash)
          })
      })
    )