mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
fundchannel: Update the manpage and Pylightning's method
Add the new 'utxo' parameter to both
This commit is contained in:
@@ -490,12 +490,14 @@ class LightningRpc(UnixDomainSocketRpc):
|
|||||||
}
|
}
|
||||||
return self.call("feerates", payload)
|
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
|
Fund channel with {id} using {satoshi} satoshis with feerate
|
||||||
with feerate of {feerate} (uses default feerate if unset).
|
of {feerate} (uses default feerate if unset).
|
||||||
If {announce} is False, don't send channel announcements.
|
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 = {
|
payload = {
|
||||||
"id": node_id,
|
"id": node_id,
|
||||||
@@ -503,6 +505,7 @@ class LightningRpc(UnixDomainSocketRpc):
|
|||||||
"feerate": feerate,
|
"feerate": feerate,
|
||||||
"announce": announce,
|
"announce": announce,
|
||||||
"minconf": minconf,
|
"minconf": minconf,
|
||||||
|
"utxos": utxos
|
||||||
}
|
}
|
||||||
return self.call("fundchannel", payload)
|
return self.call("fundchannel", payload)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
.\" Source: \ \&
|
.\" Source: \ \&
|
||||||
.\" Language: English
|
.\" Language: English
|
||||||
.\"
|
.\"
|
||||||
.TH "LIGHTNING\-FUNDCHANN" "7" "05/24/2019" "\ \&" "\ \&"
|
.TH "LIGHTNING\-FUNDCHANN" "7" "06/07/2019" "\ \&" "\ \&"
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
.\" * Define some portability stuff
|
.\" * Define some portability stuff
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
lightning-fundchannel \- Command for establishing a lightning channel\&.
|
lightning-fundchannel \- Command for establishing a lightning channel\&.
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.sp
|
.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"
|
.SH "DESCRIPTION"
|
||||||
.sp
|
.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\&.
|
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\&.
|
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
|
.sp
|
||||||
\fIminconf\fR specifies the minimum number of confirmations that used outputs should have\&. Default is 1\&.
|
\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"
|
.SH "RETURN VALUE"
|
||||||
.sp
|
.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\&.
|
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\&.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ lightning-fundchannel - Command for establishing a lightning channel.
|
|||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
*fundchannel* 'id' 'satoshi' ['feerate' 'announce'] ['minconf']
|
*fundchannel* 'id' 'satoshi' ['feerate' 'announce'] ['minconf'] ['utxos']
|
||||||
|
|
||||||
DESCRIPTION
|
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.
|
'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
|
RETURN VALUE
|
||||||
------------
|
------------
|
||||||
On success, the 'tx' and 'txid' of the transaction is returned, as well as the
|
On success, the 'tx' and 'txid' of the transaction is returned, as well as the
|
||||||
|
|||||||
Reference in New Issue
Block a user