diff --git a/doc/Makefile b/doc/Makefile
index 9acb59785079..2ab6cd55b3dc 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -7,18 +7,23 @@ doc-wrongdir:
MANPAGES := doc/lightning-cli.1 \
doc/lightning-autocleaninvoice.7 \
doc/lightning-close.7 \
+ doc/lightning-connect.7 \
doc/lightning-decodepay.7 \
doc/lightning-delexpiredinvoice.7 \
doc/lightning-delinvoice.7 \
doc/lightning-getroute.7 \
doc/lightning-invoice.7 \
+ doc/lightning-listfunds.7 \
doc/lightning-listinvoices.7 \
doc/lightning-listpayments.7 \
+ doc/lightning-newaddr.7 \
doc/lightning-pay.7 \
doc/lightning-sendpay.7 \
doc/lightning-waitinvoice.7 \
doc/lightning-waitanyinvoice.7 \
- doc/lightning-waitsendpay.7
+ doc/lightning-waitsendpay.7 \
+ doc/lightning-withdraw.7
+
doc-all: $(MANPAGES)
diff --git a/doc/lightning-close.7 b/doc/lightning-close.7
index 275f1107416d..a73594afe0a0 100644
--- a/doc/lightning-close.7
+++ b/doc/lightning-close.7
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-close \- Protocol for closing channels with direct peers
+lightning-close \- Command for closing channels with direct peers
.SH "SYNOPSIS"
.sp
\fBclose\fR \fIid\fR [\fIforce\fR] [\fItimeout\fR]
diff --git a/doc/lightning-close.7.txt b/doc/lightning-close.7.txt
index a3ef5170e417..7c6dd4d145be 100644
--- a/doc/lightning-close.7.txt
+++ b/doc/lightning-close.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-CLOSE(7)
NAME
----
-lightning-close - Protocol for closing channels with direct peers
+lightning-close - Command for closing channels with direct peers
SYNOPSIS
--------
diff --git a/doc/lightning-connect.7 b/doc/lightning-connect.7
new file mode 100644
index 000000000000..89191df0e868
--- /dev/null
+++ b/doc/lightning-connect.7
@@ -0,0 +1,64 @@
+'\" t
+.\" Title: lightning-connect
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 04/26/2018
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "LIGHTNING\-CONNECT" "7" "04/26/2018" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+lightning-connect \- Command for connecting to another lightning node\&.
+.SH "SYNOPSIS"
+.sp
+\fBconnect\fR \fInode_id\fR[@(\fIip_addr\fR|\fIhostname\fR)[:\*(Aqport\*(Aq]]
+.sp
+or
+.sp
+\fBconnect\fR \fInode_id\fR[ (\fIip_addr\fR|\fIhostname\fR)[:\*(Aqport\*(Aq]]
+.SH "DESCRIPTION"
+.sp
+The \fBconnect\fR RPC command establishes a new connection with another node in the Lightning Network\&.
+.sp
+\fInode_id\fR represents the target node\(cqs public key and \fIip_addr\fR can be either IPv4 or IPv6\&.
+.sp
+If not specified the \fIport\fR is assumed to be 9375 (default lightning port)\&.
+.sp
+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
+.sp
+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)
+.SH "RETURN VALUE"
+.sp
+On success the response will include just the peer id (peer\(cqs public key)
+.SH "ERRORS"
+.sp
+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
+.SH "AUTHOR"
+.sp
+Felix is mainly responsible\&.
+.SH "SEE ALSO"
+.sp
+lightning\-fundchannel(7), lightning\-listpeers(7), lightning\-listchannels(7), lightning\-disconnect(7)
+.SH "RESOURCES"
+.sp
+Main web site: https://github\&.com/ElementsProject/lightning
diff --git a/doc/lightning-connect.7.txt b/doc/lightning-connect.7.txt
new file mode 100644
index 000000000000..e82f612858ad
--- /dev/null
+++ b/doc/lightning-connect.7.txt
@@ -0,0 +1,64 @@
+LIGHTNING-CONNECT(7)
+====================
+:doctype: manpage
+
+NAME
+----
+lightning-connect - Command for connecting to another
+lightning node.
+
+SYNOPSIS
+--------
+*connect* 'node_id'[@('ip_addr'|'hostname')[:'port']]
+
+or
+
+*connect* 'node_id'[ ('ip_addr'|'hostname')[:'port']]
+
+DESCRIPTION
+-----------
+The *connect* RPC command establishes a new connection
+with another node in the Lightning Network.
+
+'node_id' represents the target node's public key and
+'ip_addr' can be either IPv4 or IPv6.
+
+If not specified the 'port' is assumed to be 9375
+(default lightning port).
+
+If neither 'ip_addr' or 'hostname' is specified,
+connection will be attempted to an IP belonging to
+'node_id' learned through gossip with other already
+connected peers
+
+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)
+
+
+RETURN VALUE
+------------
+On success the response will include just the peer id
+(peer's public key)
+
+ERRORS
+------
+If 'node_id' or 'ip_addr' are invalid or if 'hostname'
+can't be resolved to a valid IP address an error message
+will be returned. An error will also be returned if the
+simplified version (only 'node_id') is used and there's
+no published IP for the peer. *connect* will make up to
+10(?) attempts to connect to the peer before giving up
+
+AUTHOR
+------
+Felix is mainly responsible.
+
+SEE ALSO
+--------
+lightning-fundchannel(7), lightning-listpeers(7),
+lightning-listchannels(7), lightning-disconnect(7)
+
+RESOURCES
+---------
+Main web site: https://github.com/ElementsProject/lightning
diff --git a/doc/lightning-decodepay.7 b/doc/lightning-decodepay.7
index 77fcde74bb73..badec11b57d3 100644
--- a/doc/lightning-decodepay.7
+++ b/doc/lightning-decodepay.7
@@ -2,12 +2,12 @@
.\" Title: lightning-decodepay
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 04/05/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-DECODEPAY" "7" "04/05/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-DECODEPAY" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-decodepay \- Protocol for decoding a bolt11 string (low\-level)
+lightning-decodepay \- Command for decoding a bolt11 string (low\-level)
.SH "SYNOPSIS"
.sp
\fBdecodepay\fR \fIbolt11\fR [\fIdescription\fR]
diff --git a/doc/lightning-decodepay.7.txt b/doc/lightning-decodepay.7.txt
index c867a1bd71e3..b6c338fd3b20 100644
--- a/doc/lightning-decodepay.7.txt
+++ b/doc/lightning-decodepay.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-DECODEPAY(7)
NAME
----
-lightning-decodepay - Protocol for decoding a bolt11 string (low-level)
+lightning-decodepay - Command for decoding a bolt11 string (low-level)
SYNOPSIS
diff --git a/doc/lightning-delexpiredinvoice.7 b/doc/lightning-delexpiredinvoice.7
index d5f99e6c17e8..bbfb6de6a17f 100644
--- a/doc/lightning-delexpiredinvoice.7
+++ b/doc/lightning-delexpiredinvoice.7
@@ -2,12 +2,12 @@
.\" Title: lightning-delexpiredinvoice
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 03/17/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-DELEXPIRE" "7" "03/17/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-DELEXPIRE" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-delexpiredinvoice \- Protocol for removing expired invoices\&.
+lightning-delexpiredinvoice \- Command for removing expired invoices\&.
.SH "SYNOPSIS"
.sp
\fBdelexpiredinvoice\fR [\fImaxexpirytime\fR]
diff --git a/doc/lightning-delexpiredinvoice.7.txt b/doc/lightning-delexpiredinvoice.7.txt
index 521e77b58962..de8b7b8324c8 100644
--- a/doc/lightning-delexpiredinvoice.7.txt
+++ b/doc/lightning-delexpiredinvoice.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-DELEXPIREDINVOICE(7)
NAME
----
-lightning-delexpiredinvoice - Protocol for removing expired invoices.
+lightning-delexpiredinvoice - Command for removing expired invoices.
SYNOPSIS
--------
diff --git a/doc/lightning-delinvoice.7 b/doc/lightning-delinvoice.7
index 775e47527afb..050ab1aafa98 100644
--- a/doc/lightning-delinvoice.7
+++ b/doc/lightning-delinvoice.7
@@ -2,12 +2,12 @@
.\" Title: lightning-delinvoice
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 03/17/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-DELINVOIC" "7" "03/17/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-DELINVOIC" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-delinvoice \- Protocol for removing an invoice\&.
+lightning-delinvoice \- Command for removing an invoice\&.
.SH "SYNOPSIS"
.sp
\fBdelinvoice\fR \fIlabel\fR \fIstatus\fR
diff --git a/doc/lightning-delinvoice.7.txt b/doc/lightning-delinvoice.7.txt
index 50dca972d7ab..06f0b2917baa 100644
--- a/doc/lightning-delinvoice.7.txt
+++ b/doc/lightning-delinvoice.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-DELINVOICE(7)
NAME
----
-lightning-delinvoice - Protocol for removing an invoice.
+lightning-delinvoice - Command for removing an invoice.
SYNOPSIS
--------
diff --git a/doc/lightning-getroute.7 b/doc/lightning-getroute.7
index e26a7b0604a1..28565c536be3 100644
--- a/doc/lightning-getroute.7
+++ b/doc/lightning-getroute.7
@@ -2,12 +2,12 @@
.\" Title: lightning-getroute
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 02/19/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-GETROUTE" "7" "02/19/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-GETROUTE" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-getroute \- Protocol for routing a payment (low\-level)\&.
+lightning-getroute \- Command for routing a payment (low\-level)\&.
.SH "SYNOPSIS"
.sp
\fBgetroute\fR \fIid\fR \fImsatoshi\fR \fIriskfactor\fR [\fIcltv\fR] [\fIfuzzpercent\fR] [\fIseed\fR]
diff --git a/doc/lightning-getroute.7.txt b/doc/lightning-getroute.7.txt
index 8cdd6fadc238..3bd7f5f5bc89 100644
--- a/doc/lightning-getroute.7.txt
+++ b/doc/lightning-getroute.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-GETROUTE(7)
NAME
----
-lightning-getroute - Protocol for routing a payment (low-level).
+lightning-getroute - Command for routing a payment (low-level).
SYNOPSIS
diff --git a/doc/lightning-invoice.7 b/doc/lightning-invoice.7
index 7979f64e28f6..1b8e1f3fe411 100644
--- a/doc/lightning-invoice.7
+++ b/doc/lightning-invoice.7
@@ -2,12 +2,12 @@
.\" Title: lightning-invoice
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 04/23/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-INVOICE" "7" "04/23/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-INVOICE" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-invoice \- Protocol for accepting payments\&.
+lightning-invoice \- Command for accepting payments\&.
.SH "SYNOPSIS"
.sp
\fBinvoice\fR \fImsatoshi\fR \fIlabel\fR \fIdescription\fR [\fIexpiry\fR] [\fIfallbacks\fR] [\fIpreimage\fR]
diff --git a/doc/lightning-invoice.7.txt b/doc/lightning-invoice.7.txt
index e64e540aba9a..d2363cdadda3 100644
--- a/doc/lightning-invoice.7.txt
+++ b/doc/lightning-invoice.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-INVOICE(7)
NAME
----
-lightning-invoice - Protocol for accepting payments.
+lightning-invoice - Command for accepting payments.
SYNOPSIS
--------
diff --git a/doc/lightning-listfunds.7 b/doc/lightning-listfunds.7
new file mode 100644
index 000000000000..3c43140f473b
--- /dev/null
+++ b/doc/lightning-listfunds.7
@@ -0,0 +1,168 @@
+'\" t
+.\" Title: lightning-listfunds
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 04/26/2018
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "LIGHTNING\-LISTFUNDS" "7" "04/26/2018" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+lightning-listfunds \- Command showing all funds currently managed by the c\-lightning node\&.
+.SH "SYNOPSIS"
+.sp
+\fBlistfunds\fR
+.SH "DESCRIPTION"
+.sp
+The \fBlistfunds\fR RPC command displays all funds available, either in unspent outputs (UTXOs) in the internal wallet or funds locked in currently open channels\&.
+.SH "RETURN VALUE"
+.sp
+On success two arrays will be returned: \fIoutputs\fR with funds currently locked onchain in UTXOs and \fIchannels\fR with funds readily spendable in channels\&.
+.sp
+Each entry in \fIoutputs\fR will include:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fItxid\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIaddress\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIoutput\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIvalue\fR
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIstatus\fR
+.RE
+.sp
+Each entry in \fIchannels\fR will include:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIpeer_id\fR
+\- the peer with which the channel is opened\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIshort_channel_id\fR
+\- as per BOLT 7 (representing the block, transaction number and output index of the channel funding transaction)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIchannel_sat\fR
+\- available satoshis on our node\(cqs end of the channel (values rounded to the nearest satoshi as internal storage is in milisatoshi)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIchannel_total_sat\fR
+\- total channel value in satoshi (values rounded to the nearest satoshi as internal storage is in milisatoshi)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fIfunding_txid\fR
+\- funding transaction id\&.
+.RE
+.SH "AUTHOR"
+.sp
+Felix is mainly responsible\&.
+.SH "SEE ALSO"
+.sp
+lightning\-newaddr(7), lightning\-fundchannel(7), lightning\-withdraw(7)
+.SH "RESOURCES"
+.sp
+Main web site: https://github\&.com/ElementsProject/lightning
diff --git a/doc/lightning-listfunds.7.txt b/doc/lightning-listfunds.7.txt
new file mode 100644
index 000000000000..ddd55aa8006a
--- /dev/null
+++ b/doc/lightning-listfunds.7.txt
@@ -0,0 +1,63 @@
+LIGHTNING-LISTFUNDS(7)
+======================
+:doctype: manpage
+
+NAME
+----
+lightning-listfunds - Command showing all funds currently managed by
+the c-lightning node.
+
+SYNOPSIS
+--------
+*listfunds*
+
+DESCRIPTION
+-----------
+The *listfunds* RPC command displays all funds available, either in
+unspent outputs (UTXOs) in the internal wallet or funds locked in
+currently open channels.
+
+RETURN VALUE
+------------
+On success two arrays will be returned: 'outputs' with funds
+currently locked onchain in UTXOs and 'channels' with funds
+readily spendable in channels.
+
+Each entry in 'outputs' will include:
+
+- 'txid'
+
+- 'address'
+
+- 'output'
+
+- 'value'
+
+- 'status'
+
+Each entry in 'channels' will include:
+
+- 'peer_id' - the peer with which the channel is opened.
+
+- 'short_channel_id' - as per BOLT 7 (representing the block, transaction
+number and output index of the channel funding transaction).
+
+- 'channel_sat' - available satoshis on our node's end of the channel
+(values rounded to the nearest satoshi as internal storage is in milisatoshi).
+
+- 'channel_total_sat' - total channel value in satoshi
+(values rounded to the nearest satoshi as internal storage is in milisatoshi).
+
+- 'funding_txid' - funding transaction id.
+
+AUTHOR
+------
+Felix is mainly responsible.
+
+SEE ALSO
+--------
+lightning-newaddr(7), lightning-fundchannel(7), lightning-withdraw(7)
+
+RESOURCES
+---------
+Main web site: https://github.com/ElementsProject/lightning
diff --git a/doc/lightning-listinvoices.7 b/doc/lightning-listinvoices.7
index ce7b90a4e7fa..15fbb8664d1d 100644
--- a/doc/lightning-listinvoices.7
+++ b/doc/lightning-listinvoices.7
@@ -2,12 +2,12 @@
.\" Title: lightning-listinvoices
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 01/18/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-LISTINVOI" "7" "01/18/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-LISTINVOI" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-listinvoices \- Protocol for querying invoice status
+lightning-listinvoices \- Command for querying invoice status
.SH "SYNOPSIS"
.sp
\fBlistinvoices\fR [\fIlabel\fR]
diff --git a/doc/lightning-listinvoices.7.txt b/doc/lightning-listinvoices.7.txt
index 4579a1c66019..83cd18c63781 100644
--- a/doc/lightning-listinvoices.7.txt
+++ b/doc/lightning-listinvoices.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-LISTINVOICES(7)
NAME
----
-lightning-listinvoices - Protocol for querying invoice status
+lightning-listinvoices - Command for querying invoice status
SYNOPSIS
--------
diff --git a/doc/lightning-listpayments.7 b/doc/lightning-listpayments.7
index fd41ed47ff04..cf63dca0d636 100644
--- a/doc/lightning-listpayments.7
+++ b/doc/lightning-listpayments.7
@@ -2,12 +2,12 @@
.\" Title: lightning-listpayments
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 01/18/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-LISTPAYME" "7" "01/18/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-LISTPAYME" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-listpayments \- Protocol for querying payment status
+lightning-listpayments \- Command for querying payment status
.SH "SYNOPSIS"
.sp
\fBlistpayments\fR
diff --git a/doc/lightning-listpayments.7.txt b/doc/lightning-listpayments.7.txt
index 9afccd8dbb76..2bbe534701a9 100644
--- a/doc/lightning-listpayments.7.txt
+++ b/doc/lightning-listpayments.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-LISTPAYMENTS(7)
NAME
----
-lightning-listpayments - Protocol for querying payment status
+lightning-listpayments - Command for querying payment status
SYNOPSIS
--------
diff --git a/doc/lightning-newaddr.7 b/doc/lightning-newaddr.7
new file mode 100644
index 000000000000..28fa937d6d3f
--- /dev/null
+++ b/doc/lightning-newaddr.7
@@ -0,0 +1,58 @@
+'\" t
+.\" Title: lightning-newaddr
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 04/26/2018
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "LIGHTNING\-NEWADDR" "7" "04/26/2018" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+lightning-newaddr \- Command for generating a new address to be used by c\-lightning\&.
+.SH "SYNOPSIS"
+.sp
+\fBnewaddr\fR [ \fIp2sh\-segwit\fR | \fIbech32\fR ]
+.SH "DESCRIPTION"
+.sp
+The \fBnewaddr\fR RPC command generates a new address which can subsequently be used to fund channels managed by the c\-lightning node\&.
+.sp
+The funding transaction needs to be confirmed before funds can be used\&.
+.sp
+The optional parameter specifies the type of address wanted i\&.e\&. p2sh\-segwit (e\&.g\&. 2MxaozoqWwiUcuD9KKgUSrLFDafLqimT9Ta on bitcoin testnet or 3MZxzq3jBSKNQ2e7dzneo9hy4FvNzmMmt3 on bitcoin mainnet) or bech32 (e\&.g\&. tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg on bitcoin testnet or bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej on bitcoin mainnet)\&.
+.sp
+If not specified the address generated is p2sh\-segwit\&.
+.SH "RETURN VALUE"
+.sp
+On success, a new address will be returned\&.
+.SH "ERRORS"
+.sp
+If a non recognized address type is requested an error message will be returned
+.SH "AUTHOR"
+.sp
+Felix is mainly responsible\&.
+.SH "SEE ALSO"
+.sp
+lightning\-listfunds(7), lightning\-fundchannel(7), lightning\-withdraw(7)
+.SH "RESOURCES"
+.sp
+Main web site: https://github\&.com/ElementsProject/lightning
diff --git a/doc/lightning-newaddr.7.txt b/doc/lightning-newaddr.7.txt
new file mode 100644
index 000000000000..b72be9dc1a6d
--- /dev/null
+++ b/doc/lightning-newaddr.7.txt
@@ -0,0 +1,47 @@
+LIGHTNING-NEWADDR(7)
+====================
+:doctype: manpage
+
+NAME
+----
+lightning-newaddr - Command for generating a new address to
+be used by c-lightning.
+
+SYNOPSIS
+--------
+*newaddr* [ 'p2sh-segwit' | 'bech32' ]
+
+DESCRIPTION
+-----------
+The *newaddr* RPC command generates a new address which can
+subsequently be used to fund channels managed by the c-lightning node.
+
+The funding transaction needs to be confirmed before funds can be used.
+
+The optional parameter specifies the type of address wanted i.e.
+p2sh-segwit (e.g. 2MxaozoqWwiUcuD9KKgUSrLFDafLqimT9Ta on bitcoin testnet
+or 3MZxzq3jBSKNQ2e7dzneo9hy4FvNzmMmt3 on bitcoin mainnet) or bech32
+(e.g. tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg on bitcoin testnet or
+bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej on bitcoin mainnet).
+
+If not specified the address generated is p2sh-segwit.
+
+RETURN VALUE
+------------
+On success, a new address will be returned.
+
+ERRORS
+------
+If a non recognized address type is requested an error message will be returned
+
+AUTHOR
+------
+Felix is mainly responsible.
+
+SEE ALSO
+--------
+lightning-listfunds(7), lightning-fundchannel(7), lightning-withdraw(7)
+
+RESOURCES
+---------
+Main web site: https://github.com/ElementsProject/lightning
diff --git a/doc/lightning-pay.7 b/doc/lightning-pay.7
index 84b1d02a6781..eb48cf619126 100644
--- a/doc/lightning-pay.7
+++ b/doc/lightning-pay.7
@@ -2,12 +2,12 @@
.\" Title: lightning-pay
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 03/21/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-PAY" "7" "03/21/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-PAY" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-pay \- Protocol for sending a payment to a BOLT11 invoice
+lightning-pay \- Command for sending a payment to a BOLT11 invoice
.SH "SYNOPSIS"
.sp
\fBpay\fR \fIbolt11\fR [\fImsatoshi\fR] [\fIdescription\fR] [\fIriskfactor\fR] [\fImaxfeepercent\fR] [\fIretry_for\fR] [\fImaxdelay\fR]
diff --git a/doc/lightning-pay.7.txt b/doc/lightning-pay.7.txt
index 4f5c0c58d40f..fa80a2cce4c8 100644
--- a/doc/lightning-pay.7.txt
+++ b/doc/lightning-pay.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-PAY(7)
NAME
----
-lightning-pay - Protocol for sending a payment to a BOLT11 invoice
+lightning-pay - Command for sending a payment to a BOLT11 invoice
SYNOPSIS
--------
diff --git a/doc/lightning-sendpay.7 b/doc/lightning-sendpay.7
index 94e789ad3d22..43a25e46149f 100644
--- a/doc/lightning-sendpay.7
+++ b/doc/lightning-sendpay.7
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-sendpay \- Protocol for sending a payment via a route\&.
+lightning-sendpay \- Command for sending a payment via a route\&.
.SH "SYNOPSIS"
.sp
\fBsendpay\fR \fIroute\fR \fIhash\fR [\fImsatoshi\fR]
diff --git a/doc/lightning-sendpay.7.txt b/doc/lightning-sendpay.7.txt
index 301d01e87bb6..2d55054d0b3a 100644
--- a/doc/lightning-sendpay.7.txt
+++ b/doc/lightning-sendpay.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-SENDPAY(7)
NAME
----
-lightning-sendpay - Protocol for sending a payment via a route.
+lightning-sendpay - Command for sending a payment via a route.
SYNOPSIS
--------
diff --git a/doc/lightning-waitanyinvoice.7 b/doc/lightning-waitanyinvoice.7
index eabd7c8b7dc2..02b9af0e08fe 100644
--- a/doc/lightning-waitanyinvoice.7
+++ b/doc/lightning-waitanyinvoice.7
@@ -2,12 +2,12 @@
.\" Title: lightning-waitanyinvoice
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 01/13/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-WAITANYIN" "7" "01/13/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-WAITANYIN" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-waitanyinvoice \- Protocol for waiting for payments\&.
+lightning-waitanyinvoice \- Command for waiting for payments\&.
.SH "SYNOPSIS"
.sp
\fBwaitanyinvoice\fR [\fIlastpay_index\fR]
diff --git a/doc/lightning-waitanyinvoice.7.txt b/doc/lightning-waitanyinvoice.7.txt
index 42743109baea..4f9945fc5b1b 100644
--- a/doc/lightning-waitanyinvoice.7.txt
+++ b/doc/lightning-waitanyinvoice.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-WAITANYINVOICE(7)
NAME
----
-lightning-waitanyinvoice - Protocol for waiting for payments.
+lightning-waitanyinvoice - Command for waiting for payments.
SYNOPSIS
--------
diff --git a/doc/lightning-waitinvoice.7 b/doc/lightning-waitinvoice.7
index 7fd4b3541cce..d492982c3e9a 100644
--- a/doc/lightning-waitinvoice.7
+++ b/doc/lightning-waitinvoice.7
@@ -2,12 +2,12 @@
.\" Title: lightning-waitinvoice
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 02/03/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-WAITINVOI" "7" "02/03/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-WAITINVOI" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-waitinvoice \- Protocol for waiting for specific payment\&.
+lightning-waitinvoice \- Command for waiting for specific payment\&.
.SH "SYNOPSIS"
.sp
\fBwaitinvoice\fR \fIlabel\fR
diff --git a/doc/lightning-waitinvoice.7.txt b/doc/lightning-waitinvoice.7.txt
index eba1baa33d16..44215669a5aa 100644
--- a/doc/lightning-waitinvoice.7.txt
+++ b/doc/lightning-waitinvoice.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-WAITINVOICE(7)
NAME
----
-lightning-waitinvoice - Protocol for waiting for specific payment.
+lightning-waitinvoice - Command for waiting for specific payment.
SYNOPSIS
--------
diff --git a/doc/lightning-waitsendpay.7 b/doc/lightning-waitsendpay.7
index 79f9e829e161..ce08e83b460a 100644
--- a/doc/lightning-waitsendpay.7
+++ b/doc/lightning-waitsendpay.7
@@ -2,12 +2,12 @@
.\" Title: lightning-waitsendpay
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 03/14/2018
+.\" Date: 04/26/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "LIGHTNING\-WAITSENDP" "7" "03/14/2018" "\ \&" "\ \&"
+.TH "LIGHTNING\-WAITSENDP" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-lightning-waitsendpay \- Protocol for sending a payment via a route\&.
+lightning-waitsendpay \- Command for sending a payment via a route\&.
.SH "SYNOPSIS"
.sp
\fBwaitsendpay\fR \fIpayment_hash\fR [\fItimeout\fR]
diff --git a/doc/lightning-waitsendpay.7.txt b/doc/lightning-waitsendpay.7.txt
index b00bbc0d409f..9888fbca52b1 100644
--- a/doc/lightning-waitsendpay.7.txt
+++ b/doc/lightning-waitsendpay.7.txt
@@ -4,7 +4,7 @@ LIGHTNING-WAITSENDPAY(7)
NAME
----
-lightning-waitsendpay - Protocol for sending a payment via a route.
+lightning-waitsendpay - Command for sending a payment via a route.
SYNOPSIS
--------
diff --git a/doc/lightning-withdraw.7 b/doc/lightning-withdraw.7
new file mode 100644
index 000000000000..076ffaf5bffb
--- /dev/null
+++ b/doc/lightning-withdraw.7
@@ -0,0 +1,58 @@
+'\" t
+.\" Title: lightning-withdraw
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1
+.\" Date: 04/26/2018
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "LIGHTNING\-WITHDRAW" "7" "04/26/2018" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+lightning-withdraw \- Command for withdrawing funds from the internal wallet\&.
+.SH "SYNOPSIS"
+.sp
+\fBwithdraw\fR \fIdestination\fR \fIsatoshi\fR
+.SH "DESCRIPTION"
+.sp
+The \fBwithdraw\fR RPC command sends funds from c\-lightning\(cqs internal wallet to the address specified in \fIdestination\fR\&.
+.sp
+The address can be of any Bitcoin accepted type, including bech32\&.
+.sp
+\fIsatoshi\fR is the amount to be withdrawn from the internal wallet (expressed, as name suggests, in satoshi)\&. The string \fIall\fR can be used to specify withdrawal of all available funds\&.
+.SH "RETURN VALUE"
+.sp
+On success, an object with attributes \fItx\fR and \fItxid\fR will be returned\&.
+.sp
+\fItx\fR represents the raw bitcoin, fully signed, transaction and \fItxid\fR represent the bitcoin transaction id\&.
+.SH "ERRORS"
+.sp
+If an incorrect address is supplied or the \fIsatoshi\fR parameter exceeds the amount in the internal wallet an error message will be returned\&.
+.SH "AUTHOR"
+.sp
+Felix is mainly responsible\&.
+.SH "SEE ALSO"
+.sp
+lightning\-listfunds(7), lightning\-fundchannel(7), lightning\-newaddr(7)
+.SH "RESOURCES"
+.sp
+Main web site: https://github\&.com/ElementsProject/lightning
diff --git a/doc/lightning-withdraw.7.txt b/doc/lightning-withdraw.7.txt
new file mode 100644
index 000000000000..8907d8c45f60
--- /dev/null
+++ b/doc/lightning-withdraw.7.txt
@@ -0,0 +1,52 @@
+LIGHTNING-WITHDRAW(7)
+====================
+:doctype: manpage
+
+NAME
+----
+lightning-withdraw - Command for withdrawing funds from the
+internal wallet.
+
+SYNOPSIS
+--------
+*withdraw* 'destination' 'satoshi'
+
+DESCRIPTION
+-----------
+The *withdraw* RPC command sends funds from c-lightning's
+internal wallet to the address specified in 'destination'.
+
+The address can be of any Bitcoin accepted type,
+including bech32.
+
+'satoshi' is the amount to be withdrawn from the internal
+wallet (expressed, as name suggests, in satoshi).
+The string 'all' can be used to specify withdrawal of all
+available funds.
+
+
+RETURN VALUE
+------------
+On success, an object with attributes 'tx' and 'txid' will
+be returned.
+
+'tx' represents the raw bitcoin, fully signed, transaction
+and 'txid' represent the bitcoin transaction id.
+
+ERRORS
+------
+If an incorrect address is supplied or the 'satoshi'
+parameter exceeds the amount in the internal wallet
+an error message will be returned.
+
+AUTHOR
+------
+Felix is mainly responsible.
+
+SEE ALSO
+--------
+lightning-listfunds(7), lightning-fundchannel(7), lightning-newaddr(7)
+
+RESOURCES
+---------
+Main web site: https://github.com/ElementsProject/lightning