First install it
npm install hypercore-proof-queue
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
Apache-2.0