mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
91 lines
2.9 KiB
Groff
91 lines
2.9 KiB
Groff
|
'\" t
|
||
|
.\" Title: lightning-txprepare
|
||
|
.\" Author: [see the "AUTHOR" section]
|
||
|
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
|
||
|
.\" Date: 06/05/2019
|
||
|
.\" Manual: \ \&
|
||
|
.\" Source: \ \&
|
||
|
.\" Language: English
|
||
|
.\"
|
||
|
.TH "LIGHTNING\-TXPREPARE" "7" "06/05/2019" "\ \&" "\ \&"
|
||
|
.\" -----------------------------------------------------------------
|
||
|
.\" * 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-txprepare \- Command to prepare to withdraw funds from the internal wallet\&.
|
||
|
.SH "SYNOPSIS"
|
||
|
.sp
|
||
|
\fBtxprepare\fR \fIdestination\fR \fIsatoshi\fR [\fIfeerate\fR] [\fIminconf\fR]
|
||
|
.SH "DESCRIPTION"
|
||
|
.sp
|
||
|
The \fBtxprepare\fR RPC command creates an unsigned transaction which spends funds from c\-lightning\(cqs internal wallet to the address specified in \fIdestination\fR\&.
|
||
|
.sp
|
||
|
Effectively, it is the first part of a \fBwithdraw\fR command, and uses the same parameters\&. The second part is provided by \fBtxsend\fR\&.
|
||
|
.SH "RETURN VALUE"
|
||
|
.sp
|
||
|
On success, an object with attributes \fIunsigned_tx\fR and \fItxid\fR will be returned\&. You need to hand \fItxid\fR to \fBtxsend\fR or \fBtxdiscard\fR, as the inputs of this transaction are reserved until then, or until the daemon restarts\&.
|
||
|
.sp
|
||
|
\fIunsigned_tx\fR represents the raw bitcoin transaction (not yet signed) and \fItxid\fR represent the bitcoin transaction id\&.
|
||
|
.sp
|
||
|
On failure, an error is reported and the transaction is not created\&.
|
||
|
.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
|
||
|
.SH "AUTHOR"
|
||
|
.sp
|
||
|
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&.
|
||
|
.SH "SEE ALSO"
|
||
|
.sp
|
||
|
lightning\-withdraw(7), lightning\-txsend(7), lightning\-txdiscard(7)
|
||
|
.SH "RESOURCES"
|
||
|
.sp
|
||
|
Main web site: https://github\&.com/ElementsProject/lightning
|