2019-08-10 02:12:44 +02:00
|
|
|
|
.TH "LIGHTNING-WITHDRAW" "7" "" "" "lightning-withdraw"
|
|
|
|
|
.SH NAME
|
2020-06-25 07:10:41 +02:00
|
|
|
|
lightning-withdraw - Command for withdrawing funds from the internal wallet
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
|
2019-08-28 05:35:29 +02:00
|
|
|
|
\fBwithdraw\fR \fIdestination\fR \fIsatoshi\fR [\fIfeerate\fR] [\fIminconf\fR] [\fIutxos\fR]
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
|
|
|
|
|
The \fBwithdraw\fR RPC command sends funds from c-lightning’s internal
|
|
|
|
|
wallet to the address specified in \fIdestination\fR\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The address can be of any Bitcoin accepted type, including bech32\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\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\. Otherwise, it is in
|
|
|
|
|
satoshi precision; it can be a whole number, a whole number ending in
|
|
|
|
|
\fIsat\fR, a whole number ending in \fI000msat\fR, or a number with 1 to 8
|
|
|
|
|
decimal places ending in \fIbtc\fR\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fIfeerate\fR is an optional feerate to use\. It can be one of the strings
|
|
|
|
|
\fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or so) or \fIslow\fR
|
|
|
|
|
(next 100 blocks or so) to use lightningd’s internal estimates: \fInormal\fR
|
|
|
|
|
is the default\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
|
|
|
|
|
the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
|
|
|
|
|
means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
|
|
|
|
|
the suffix is equivalent to \fIperkb\fR\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fIminconf\fR specifies the minimum number of confirmations that used
|
|
|
|
|
outputs should have\. Default is 1\.
|
|
|
|
|
|
2019-08-28 05:35:29 +02:00
|
|
|
|
|
|
|
|
|
\fIutxos\fR specifies the utxos to be used to be withdrawn from, as an array
|
|
|
|
|
of "txid:vout"\. These must be drawn from the node's available UTXO set\.
|
|
|
|
|
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.SH RETURN VALUE
|
|
|
|
|
|
2021-03-15 05:27:59 +01:00
|
|
|
|
On success, an object with attributes \fItx\fR, \fItxid\fR and \fIpsbt\fR will be returned\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
2021-03-15 05:27:59 +01:00
|
|
|
|
\fItx\fR and \fIpsbt\fR represent the fully signed bitcoin transaction and \fItxid\fR
|
|
|
|
|
represents the bitcoin transaction id\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On failure, an error is reported and the withdrawal transaction is not
|
|
|
|
|
created\.
|
|
|
|
|
|
|
|
|
|
|
2018-06-15 21:20:31 +02:00
|
|
|
|
The following error codes may occur:
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
2019-08-28 05:35:29 +02:00
|
|
|
|
.RS
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.IP \[bu]
|
|
|
|
|
-1: Catchall nonspecific error\.
|
|
|
|
|
.IP \[bu]
|
|
|
|
|
301: There are not enough funds in the internal wallet (including
|
|
|
|
|
fees) to create the transaction\.
|
|
|
|
|
.IP \[bu]
|
|
|
|
|
302: The dust limit is not met\.
|
|
|
|
|
|
2019-08-28 05:35:29 +02:00
|
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.SH AUTHOR
|
|
|
|
|
|
2020-06-25 07:10:41 +02:00
|
|
|
|
Felix \fI<fixone@gmail.com\fR> is mainly responsible\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
|
|
|
|
|
\fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-newaddr\fR(7),
|
2020-07-13 04:18:38 +02:00
|
|
|
|
\fBlightning-txprepare\fR(7), \fBlightning-feerates\fR(7)\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.SH RESOURCES
|
|
|
|
|
|
2020-06-25 07:10:41 +02:00
|
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
2021-03-15 05:27:59 +01:00
|
|
|
|
\" SHA256STAMP:0afffd7ffd7b22415e67816cc43d3be6fdde8deda863a0981f383cdc7ba48513
|