Connect to Lightning Node
API-v2lightning::nodes::connect_to_node
The lightning::nodes::connect_to_node
method allows you to connect to a Lightning node.
Parameter | Type | Required | Description |
---|---|---|---|
coin | string | ✓ | The coin ticker you would like to connect to a node on. |
node_address | string | ✓ | Lightning node addresses always have a format of node_pubkey @ip_address :port . |
Parameter | Type | Description |
---|---|---|
result | string | Connection result message (e.g., success, already connected, etc.) |
id | int or null | Request identifier, or null. |
lightning::nodes::connect_to_node
POST
lightning::nodes::connect_to_node{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "lightning::nodes::connect_to_node",
"params": {
"coin": "tBTC-lightning",
"node_address": "038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9@203.132.94.196:9735"
},
"id": 1
}
The node address in the above request is for the WalletOfSatoshi lightning node, which is one of the most connected lightning nodes. Other node addresses can be retrieved from any lightning explorer, such as: