Class: Control

Control

The Kadence daemon can be controlled by another process on the same host or remotely via socket connection. By default, the daemon is configured to listen on a UNIX domain socket located at $HOME/.config/kadence/kadence.sock. Once connected to the daemon, you may send it control commands to build networks in other languages. The controller understands newline terminated JSON-RPC 2.0 payloads.

new Control(node)

Parameters:
Name Type Description
node KademliaNode
Source:

Methods


getProtocolInfo(callback)

Returns basic informations about the running node
Parameters:
Name Type Description
callback Control~getProtocolInfoCallback
Source:

listMethods(callback)

Returns a list of the support methods from the controller
Parameters:
Name Type Description
callback Control~listMethodsCallback
Source:

Type Definitions


getProtocolInfoCallback(error, info)

Parameters:
Name Type Description
error error | null
info object
Properties
Name Type Description
versions object
Properties
Name Type Description
software string
protocol string
identity string
contact object
peers Array.<array>
Source:

listMethodsCallback(error, methods)

Parameters:
Name Type Description
error error | null
methods Array.<object>
Properties
Name Type Description
method string
params Array.<string>
Source: