Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discv5-fork

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discv5-fork

Discovery V5 mega fork

  • 10.0.5-fake
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

discv5

ES Version Node Version

A TypeScript implementation of the DiscV5 protocol

Libp2p compatibility

Peer Discovery Compatible

Included is a libp2p peer-discovery compatibility module.

Example
import {Discv5Discovery} from "@chainsafe/discv5";
import {ENR, SignableENR} from "@chainsafe/enr";
import {createLibp2p} from "libp2p";
import PeerId from "peer-id";

const myPeerId: PeerId = ...;

const bootEnrs: ENR[] = [...];

const libp2p = createLibp2p({
  peerId: myPeerId,
  peerDiscovery: [() => new Discv5Discovery({
    enabled: true,
    enr: SignableENR.createFromPeerId(myPeerId),
    peerId: myPeerId,
    bindAddrs: {ip4: "/ip4/0.0.0.0/udp/9000"},
    bootEnrs,
    searchInterval: 30000, // wait 30s between searches
  })]
});

License

Apache-2.0

FAQs

Package last updated on 09 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc