Socket
Book a DemoInstallSign in
Socket

hypercore-proof-queue

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypercore-proof-queue

Store a bunch of Hypercore proofs to a file and consume them later

latest
npmnpm
Version
2.0.2
Version published
Maintainers
0
Created
Source

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

FAQs

Package last updated on 04 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts