kadence/rolodex~ RolodexPlugin

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

Constructor

new RolodexPlugin(node, peerCacheFilePath)

Parameters:
NameTypeDescription
nodeKademliaNode
peerCacheFilePathstring

Path to file to use for storing peers

Methods

getBootstrapCandidates() → {Array.<string>}

Returns a list of bootstrap nodes from local profiles

Returns:

urls

Type: 
Array.<string>

getExternalPeerInfo(identity) → {object}

Returns the external peer data for the given identity

Parameters:
NameTypeDescription
identitystring

Identity key for the peer

Returns:
Type: 
object

getInternalPeerInfo(identity) → {object}

Returns the internal peer data for the given identity

Parameters:
NameTypeDescription
identitystring

Identity key for the peer

Returns:
Type: 
object

setExternalPeerInfo(identity, data) → {object}

Returns the external peer data for the given identity

Parameters:
NameTypeDescription
identitystring

Identity key for the peer

dataobject

Peer's external contact information

Returns:
Type: 
object

setInternalPeerInfo(identity, data) → {object}

Returns the internal peer data for the given identity

Parameters:
NameTypeDescription
identitystring

Identity key for the peer

dataobject

Our own internal peer information

Returns:
Type: 
object