2018-04-26 12:12:17 +02:00
'\" t
. \" Title: lightning-withdraw
. \" Author: [see the "AUTHOR" section]
. \" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
2019-02-23 02:05:51 +01:00
. \" Date: 02/23/2019
2018-04-26 12:12:17 +02:00
. \" Manual: \ \&
. \" Source: \ \&
. \" Language: English
. \"
2019-02-23 02:05:51 +01:00
.TH "LIGHTNING\-WITHDRAW" "7" "02/23/2019" "\ \&" "\ \&"
2018-04-26 12:12:17 +02:00
. \" -----------------------------------------------------------------
. \" * 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
2018-08-28 22:46:32 +02:00
\fB withdraw\fR \fI destination\fR \fI satoshi\fR [\fI feerate\fR ]
2018-04-26 12:12:17 +02:00
.SH "DESCRIPTION"
.sp
The \fB withdraw\fR RPC command sends funds from c\- lightning\(cq s internal wallet to the address specified in \fI destination\fR \& .
.sp
The address can be of any Bitcoin accepted type, including bech32\& .
.sp
2019-02-23 02:05:51 +01:00
\fI satoshi\fR is the amount to be withdrawn from the internal wallet (expressed, as name suggests, in satoshi)\& . The string \fI all\fR can be used to specify withdrawal of all available funds\& . Otherwise, it is in satoshi precision; it can be a whole number, a whole number ending in \fI sat\fR , a whole number ending in \fI 000msat\fR , or a number with 1 to 8 decimal places ending in \fI btc\fR \& .
2018-08-27 15:15:59 +02:00
.sp
2018-08-28 22:46:34 +02:00
\fI feerate\fR is an optional feerate to use\& . It can be one of the strings \fI urgent\fR , \fI normal\fR or \fI slow\fR to use lightningd\(cq s internal estimates: \fI normal\fR is the default\& .
.sp
Otherwise, \fI feerate\fR is a number, with an optional suffix: \fI perkw\fR means the number is interpreted as satoshi\- per\- kilosipa (weight), and \fI perkb\fR means it is interpreted bitcoind\- style as satoshi\- per\- kilobyte\& . Omitting the suffix is equivalent to \fI perkb\fR \& .
2018-04-26 12:12:17 +02:00
.SH "RETURN VALUE"
.sp
On success, an object with attributes \fI tx\fR and \fI txid\fR will be returned\& .
.sp
\fI tx\fR represents the raw bitcoin, fully signed, transaction and \fI txid\fR represent the bitcoin transaction id\& .
.sp
2018-08-27 15:15:59 +02:00
On failure, an error is reported and the withdrawal transaction is not created\& .
2018-06-15 21:20:31 +02:00
.sp
The following error codes may occur:
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\- 1\& . Catchall nonspecific error\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
301\& . There are not enough funds in the internal wallet (including fees) to create the transaction\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
302\& . The dust limit is not met\& .
.RE
2018-04-26 12:12:17 +02:00
.SH "AUTHOR"
.sp
Felix <fixone@gmail\& .com> 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