npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

hypercore-proof-queue

2.0.2

@mafintosh

npmSnykSocket
Downloads:116
$ npm install hypercore-proof-queue
DailyWeeklyMonthlyYearly

hypercore-proof-queue

First install it

npm install hypercore-proof-queue

API

Then in one process

const HPQ = require('hypercore-proof-queue')
const q = new HPQ('/tmp/my-queue') // which file to use

q.push({
  discoveryKey, // which core
  // add the proof below
  fork: 0,
  block: {
    index: 10,
    value: Buffer.from('hello'),
    nodes: []
  }
})

And simply in another one, at any future or concurrent point

const q = new HPQ('/tmp/my-queue', async function (proofs) {
  console.log('incoming proofs', proofs)
})

That is it

License

Apache-2.0