@libp2p/bootstrap
Advanced tools
import { EventEmitter } from '@libp2p/interfaces/events'; | ||
import type { PeerDiscovery, PeerDiscoveryEvents } from '@libp2p/interfaces/peer-discovery'; | ||
import { symbol } from '@libp2p/interfaces/peer-discovery'; | ||
export interface BootstrapOptions { | ||
@@ -22,2 +23,4 @@ /** | ||
constructor(options?: BootstrapOptions); | ||
get [symbol](): true; | ||
get [Symbol.toStringTag](): string; | ||
isStarted(): boolean; | ||
@@ -24,0 +27,0 @@ /** |
@@ -6,2 +6,3 @@ import { Multiaddr } from '@multiformats/multiaddr'; | ||
import { peerIdFromString } from '@libp2p/peer-id'; | ||
import { symbol } from '@libp2p/interfaces/peer-discovery'; | ||
const log = logger('libp2p:bootstrap'); | ||
@@ -38,2 +39,8 @@ /** | ||
} | ||
get [symbol]() { | ||
return true; | ||
} | ||
get [Symbol.toStringTag]() { | ||
return '@libp2p/bootstrap'; | ||
} | ||
isStarted() { | ||
@@ -40,0 +47,0 @@ return Boolean(this.timer); |
{ | ||
"name": "@libp2p/bootstrap", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Node.js IPFS Implementation of the railing process of a Node through a bootstrap peer list", | ||
@@ -136,3 +136,3 @@ "license": "Apache-2.0 OR MIT", | ||
"dependencies": { | ||
"@libp2p/interfaces": "^1.3.31", | ||
"@libp2p/interfaces": "^1.3.32", | ||
"@libp2p/logger": "^1.1.3", | ||
@@ -139,0 +139,0 @@ "@libp2p/peer-id": "^1.1.9", |
@@ -8,2 +8,3 @@ import { Multiaddr } from '@multiformats/multiaddr' | ||
import { peerIdFromString } from '@libp2p/peer-id' | ||
import { symbol } from '@libp2p/interfaces/peer-discovery' | ||
@@ -67,2 +68,10 @@ const log = logger('libp2p:bootstrap') | ||
get [symbol] (): true { | ||
return true | ||
} | ||
get [Symbol.toStringTag] () { | ||
return '@libp2p/bootstrap' | ||
} | ||
isStarted () { | ||
@@ -69,0 +78,0 @@ return Boolean(this.timer) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16422
4.95%211
8.76%