From 781ac5c70a59579bad9158f56ef69566a92ad245 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Mon, 17 Feb 2025 04:55:37 -0500 Subject: [PATCH] add article --- markdown/The Bulding Blocks of Peer to Peer.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/markdown/The Bulding Blocks of Peer to Peer.md b/markdown/The Bulding Blocks of Peer to Peer.md index 394896b..2a1a6ba 100644 --- a/markdown/The Bulding Blocks of Peer to Peer.md +++ b/markdown/The Bulding Blocks of Peer to Peer.md @@ -83,9 +83,6 @@ Beneath HyperSwarm lies Hyper-DHT, the distributed hash table that enables decen - Public Key Identification: Unlike traditional DHTs that rely on IP addresses, Hyper-DHT identifies peers using public keys. This makes it easy to connect to peers regardless of network changes. - -- Bootstrapping and Discovery: - With a set of known bootstrap servers, a Hyper-DHT node can quickly join the network and start discovering peers. - Direct P2P Connections: You can both create P2P servers and initiate connections to remote servers using direct public keys. @@ -104,13 +101,7 @@ Below is a simple example that creates a new DHT node and demonstrates bootstrap const DHT = require('hyperdht') // Create a DHT node with default bootstrap servers -const node = new DHT({ - bootstrap: [ - 'node1.hyperdht.org:49737', - 'node2.hyperdht.org:49737', - 'node3.hyperdht.org:49737' - ] -}) +const node = new DHT() // Generate a key pair for the node (or use an existing one) const keyPair = DHT.keyPair()