fundchannel: Update the manpage and Pylightning's method

Add the new 'utxo' parameter to both
This commit is contained in:
darosior 2019-06-08 15:56:40 +02:00 committed by Rusty Russell
parent ac038b340b
commit 1b29b063b2
3 changed files with 14 additions and 7 deletions

View File

@ -490,12 +490,14 @@ class LightningRpc(UnixDomainSocketRpc):
}
return self.call("feerates", payload)
def fundchannel(self, node_id, satoshi, feerate=None, announce=True, minconf=None):
def fundchannel(self, node_id, satoshi, feerate=None, announce=True, minconf=None, utxos=None):
"""
Fund channel with {id} using {satoshi} satoshis
with feerate of {feerate} (uses default feerate if unset).
Fund channel with {id} using {satoshi} satoshis with feerate
of {feerate} (uses default feerate if unset).
If {announce} is False, don't send channel announcements.
Only select outputs with {minconf} confirmations
Only select outputs with {minconf} confirmations.
If {utxos} is specified (as a list of 'txid:vout' strings),
fund a channel from these specifics utxos.
"""
payload = {
"id": node_id,
@ -503,6 +505,7 @@ class LightningRpc(UnixDomainSocketRpc):
"feerate": feerate,
"announce": announce,
"minconf": minconf,
"utxos": utxos
}
return self.call("fundchannel", payload)

View File

@ -7,7 +7,7 @@
.\" Source: \ \&
.\" Language: English
.\"
.TH "LIGHTNING\-FUNDCHANN" "7" "05/24/2019" "\ \&" "\ \&"
.TH "LIGHTNING\-FUNDCHANN" "7" "06/07/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -31,7 +31,7 @@
lightning-fundchannel \- Command for establishing a lightning channel\&.
.SH "SYNOPSIS"
.sp
\fBfundchannel\fR \fIid\fR \fIsatoshi\fR [\fIfeerate\fR \fIannounce\fR] [\fIminconf\fR]
\fBfundchannel\fR \fIid\fR \fIsatoshi\fR [\fIfeerate\fR \fIannounce\fR] [\fIminconf\fR] [\fIutxos\fR]
.SH "DESCRIPTION"
.sp
The \fBfundchannel\fR RPC command opens a payment channel with a peer by committing a funding transaction to the blockchain as defined in BOLT #2\&. \fBfundchannel\fR by itself does not attempt to open a connection\&. A connection must first be established using \fBconnect\fR\&. Once the transaction is confirmed, normal channel operations may begin\&. Readiness is indicated by \fBlistpeers\fR reporting a \fIstate\fR of CHANNELD_NORMAL for the channel\&.
@ -47,6 +47,8 @@ The \fBfundchannel\fR RPC command opens a payment channel with a peer by committ
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\&.
.sp
\fIminconf\fR specifies the minimum number of confirmations that used outputs should have\&. Default is 1\&.
.sp
\fIutxos\fR specifies the utxos to be used to fund the channel, as an array of "txid:vout"\&.
.SH "RETURN VALUE"
.sp
On success, the \fItx\fR and \fItxid\fR of the transaction is returned, as well as the \fIchannel_id\fR of the newly created channel\&. On failure, an error is reported and the channel is not funded\&.

View File

@ -8,7 +8,7 @@ lightning-fundchannel - Command for establishing a lightning channel.
SYNOPSIS
--------
*fundchannel* 'id' 'satoshi' ['feerate' 'announce'] ['minconf']
*fundchannel* 'id' 'satoshi' ['feerate' 'announce'] ['minconf'] ['utxos']
DESCRIPTION
-----------
@ -45,6 +45,8 @@ satoshi-per-kilobyte. Omitting the suffix is equivalent to 'perkb'.
'minconf' specifies the minimum number of confirmations that used outputs should have. Default is 1.
'utxos' specifies the utxos to be used to fund the channel, as an array of "txid:vout".
RETURN VALUE
------------
On success, the 'tx' and 'txid' of the transaction is returned, as well as the