Constructor
new RolodexPlugin(node, peerCacheFilePath)
Parameters:
Name | Type | Description |
---|---|---|
node | KademliaNode | |
peerCacheFilePath | string | Path to file to use for storing peers |
- Source
Methods
getBootstrapCandidates() → {Array.<string>}
Returns a list of bootstrap nodes from local profiles
- Source
Returns:
urls
- Type:
- Array.<string>
getExternalPeerInfo(identity) → {object}
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) → {object}
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) → {object}
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) → {object}
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