How to use the merkle-patricia-tree.prove function in merkle-patricia-tree

To help you get started, we’ve selected a few merkle-patricia-tree 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 inblocks / precedence / core / src / blocks.js View on Github external
return new Promise((resolve, reject) => {
    Trie.prove(trie, key, (e, prove) => {
      try {
        if (e) {
          return reject(e)
        }
        resolve(prove.map(o => o.toString('hex')))
      } catch (e) {
        reject(e)
      }
    })
  })
}