Class: RolodexPlugin

kadence/rolodex~ RolodexPlugin

Keeps track of seen contacts in a compact file so they can be used as bootstrap nodes

new RolodexPlugin(node, peerCacheFilePath)

Parameters:
Name Type Description
node KademliaNode
peerCacheFilePath string Path to file to use for storing peers
Source:

Methods


getBootstrapCandidates()

Returns a list of bootstrap nodes from local profiles
Source:
Returns:
urls
Type
Array.<string>

getExternalPeerInfo(identity)

Returns the external peer data for the given identity
Parameters:
Name Type Description
identity string Identity key for the peer
Source:
Returns:
Type
object

getInternalPeerInfo(identity)

Returns the internal peer data for the given identity
Parameters:
Name Type Description
identity string Identity key for the peer
Source:
Returns:
Type
object

setExternalPeerInfo(identity, data)

Returns the external peer data for the given identity
Parameters:
Name Type Description
identity string Identity key for the peer
data object Peer's external contact information
Source:
Returns:
Type
object

setInternalPeerInfo(identity, data)

Returns the internal peer data for the given identity
Parameters:
Name Type Description
identity string Identity key for the peer
data object Our own internal peer information
Source:
Returns:
Type
object