|
| 1 | +'\" t |
| 2 | +.\" Title: lightning-connect |
| 3 | +.\" Author: [see the "AUTHOR" section] |
| 4 | +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> |
| 5 | +.\" Date: 04/26/2018 |
| 6 | +.\" Manual: \ \& |
| 7 | +.\" Source: \ \& |
| 8 | +.\" Language: English |
| 9 | +.\" |
| 10 | +.TH "LIGHTNING\-CONNECT" "7" "04/26/2018" "\ \&" "\ \&" |
| 11 | +.\" ----------------------------------------------------------------- |
| 12 | +.\" * Define some portability stuff |
| 13 | +.\" ----------------------------------------------------------------- |
| 14 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 | +.\" http://bugs.debian.org/507673 |
| 16 | +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 | +.ie \n(.g .ds Aq \(aq |
| 19 | +.el .ds Aq ' |
| 20 | +.\" ----------------------------------------------------------------- |
| 21 | +.\" * set default formatting |
| 22 | +.\" ----------------------------------------------------------------- |
| 23 | +.\" disable hyphenation |
| 24 | +.nh |
| 25 | +.\" disable justification (adjust text to left margin only) |
| 26 | +.ad l |
| 27 | +.\" ----------------------------------------------------------------- |
| 28 | +.\" * MAIN CONTENT STARTS HERE * |
| 29 | +.\" ----------------------------------------------------------------- |
| 30 | +.SH "NAME" |
| 31 | +lightning-connect \- Command for connecting to another lightning node\&. |
| 32 | +.SH "SYNOPSIS" |
| 33 | +.sp |
| 34 | +\fBconnect\fR \fInode_id\fR[@(\fIip_addr\fR|\fIhostname\fR)[:\*(Aqport\*(Aq]] |
| 35 | +.sp |
| 36 | +or |
| 37 | +.sp |
| 38 | +\fBconnect\fR \fInode_id\fR[ (\fIip_addr\fR|\fIhostname\fR)[:\*(Aqport\*(Aq]] |
| 39 | +.SH "DESCRIPTION" |
| 40 | +.sp |
| 41 | +The \fBconnect\fR RPC command establishes a new connection with another node in the Lightning Network\&. |
| 42 | +.sp |
| 43 | +\fInode_id\fR represents the target node\(cqs public key and \fIip_addr\fR can be either IPv4 or IPv6\&. |
| 44 | +.sp |
| 45 | +If not specified the \fIport\fR is assumed to be 9375 (default lightning port)\&. |
| 46 | +.sp |
| 47 | +If neither \fIip_addr\fR or \fIhostname\fR is specified, connection will be attempted to an IP belonging to \fInode_id\fR learned through gossip with other already connected peers |
| 48 | +.sp |
| 49 | +Connecting to a node is just the first step in opening a channel with another node, once the peer is connected a channel can be opened with lightning\-fundchannel(7) |
| 50 | +.SH "RETURN VALUE" |
| 51 | +.sp |
| 52 | +On success the response will include just the peer id (peer\(cqs public key) |
| 53 | +.SH "ERRORS" |
| 54 | +.sp |
| 55 | +If \fInode_id\fR or \fIip_addr\fR are invalid or if \fIhostname\fR can\(cqt be resolved to a valid IP address an error message will be returned\&. An error will also be returned if the simplified version (only \fInode_id\fR) is used and there\(cqs no published IP for the peer\&. \fBconnect\fR will make up to 10(?) attempts to connect to the peer before giving up |
| 56 | +.SH "AUTHOR" |
| 57 | +.sp |
| 58 | +Felix <fixone@gmail\&.com> is mainly responsible\&. |
| 59 | +.SH "SEE ALSO" |
| 60 | +.sp |
| 61 | +lightning\-fundchannel(7), lightning\-listpeers(7), lightning\-listchannels(7), lightning\-disconnect(7) |
| 62 | +.SH "RESOURCES" |
| 63 | +.sp |
| 64 | +Main web site: https://github\&.com/ElementsProject/lightning |
0 commit comments