Browse Source
`openchannel_signed` and `openchannel_update` which allow a user to continue a openchannel or kick off the completion of a openchannel. `openchannel_update` should be called until it returns with `commitments_secured`.travis-experimental
committed by
Rusty Russell
10 changed files with 445 additions and 1 deletions
@ -0,0 +1,68 @@ |
|||
.TH "LIGHTNING-OPENCHANNEL_SIGNED" "7" "" "" "lightning-openchannel_signed" |
|||
.SH NAME |
|||
lightning-openchannel_signed - Command to conclude a channel open |
|||
.SH SYNOPSIS |
|||
|
|||
\fBopenchannel_signed\fR \fIid\fR \fIsigned_psbt\fR |
|||
|
|||
.SH DESCRIPTION |
|||
|
|||
\fBopenchannel_signed\fR is a low level RPC command which concludes a channel |
|||
open with the specified peer\. It uses the v2 openchannel protocol, which |
|||
allows for interactive transaction construction\. |
|||
|
|||
|
|||
This command should be called after \fBopenchannel_update\fR returns |
|||
\fIcommitments_secured\fR \fBtrue\fR\. |
|||
|
|||
|
|||
This command will broadcast the finalized funding transaction, |
|||
if we receive valid signatures from the peer\. |
|||
|
|||
|
|||
\fIid\fR is the node id of the remote peer\. |
|||
|
|||
|
|||
\fIsigned_psbt\fR is the PSBT returned from \fBopenchannel_update\fR (where |
|||
\fIcommitments_secured\fR was true) with partial signatures or finalized |
|||
witness stacks included for every input that we contributed to the |
|||
PSBT\. |
|||
|
|||
.SH RETURN VALUE |
|||
|
|||
On success, returns the \fIchannel_id\fR for this channel; hex \fItx\fR of the |
|||
published funding transaction; and \fItxid\fR of the funding transaction\. |
|||
|
|||
|
|||
On error, the returned object will contain \fBcode\fR and \fBmessage\fR properties, |
|||
with \fBcode\fR being one of the following: |
|||
|
|||
.RS |
|||
.IP \[bu] |
|||
-32602: If the given parameters are wrong\. |
|||
.IP \[bu] |
|||
-1: Catchall nonspecific error\. |
|||
.IP \[bu] |
|||
303: Funding transaction broadcast failed\. |
|||
.IP \[bu] |
|||
306: Unknown peer id\. |
|||
.IP \[bu] |
|||
309: PSBT missing required fields\. |
|||
|
|||
.RE |
|||
.SH SEE ALSO |
|||
|
|||
lightning-openchannel_\fBupdate\fR(7), lightning-openchannel_\fBsigned\fR(7), |
|||
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7), |
|||
\fBlightning-fundchannel\fR(7), \fBlightning-fundpsbt\fR(7), \fBlightning-utxopsbt\fR(7), |
|||
\fBlightning-multifundchannel\fR(7) |
|||
|
|||
.SH AUTHOR |
|||
|
|||
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\. |
|||
|
|||
.SH RESOURCES |
|||
|
|||
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR |
|||
|
|||
\" SHA256STAMP:68fb78430a5ee3707fdb1324ba46373dd3dfaf325fe4e1bd3dcdc1589d80435c |
@ -0,0 +1,60 @@ |
|||
lightning-openchannel\_signed -- Command to conclude a channel open |
|||
=================================================================== |
|||
|
|||
SYNOPSIS |
|||
-------- |
|||
|
|||
**openchannel_signed** *id* *signed_psbt* |
|||
|
|||
DESCRIPTION |
|||
----------- |
|||
|
|||
`openchannel_signed` is a low level RPC command which concludes a channel |
|||
open with the specified peer. It uses the v2 openchannel protocol, which |
|||
allows for interactive transaction construction. |
|||
|
|||
This command should be called after `openchannel_update` returns |
|||
*commitments_secured* `true`. |
|||
|
|||
This command will broadcast the finalized funding transaction, |
|||
if we receive valid signatures from the peer. |
|||
|
|||
*id* is the node id of the remote peer. |
|||
|
|||
*signed_psbt* is the PSBT returned from `openchannel_update` (where |
|||
*commitments_secured* was true) with partial signatures or finalized |
|||
witness stacks included for every input that we contributed to the |
|||
PSBT. |
|||
|
|||
RETURN VALUE |
|||
------------ |
|||
|
|||
On success, returns the *channel_id* for this channel; hex *tx* of the |
|||
published funding transaction; and *txid* of the funding transaction. |
|||
|
|||
On error, the returned object will contain `code` and `message` properties, |
|||
with `code` being one of the following: |
|||
|
|||
- -32602: If the given parameters are wrong. |
|||
- -1: Catchall nonspecific error. |
|||
- 303: Funding transaction broadcast failed. |
|||
- 306: Unknown peer id. |
|||
- 309: PSBT missing required fields. |
|||
|
|||
SEE ALSO |
|||
-------- |
|||
|
|||
lightning-openchannel\_update(7), lightning-openchannel\_signed(7), |
|||
lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), |
|||
lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), |
|||
lightning-multifundchannel(7) |
|||
|
|||
AUTHOR |
|||
------ |
|||
|
|||
@niftynei <<niftynei@gmail.com>> is mainly responsible. |
|||
|
|||
RESOURCES |
|||
--------- |
|||
|
|||
Main web site: <https://github.com/ElementsProject/lightning> |
@ -0,0 +1,66 @@ |
|||
.TH "LIGHTNING-OPENCHANNEL_UPDATE" "7" "" "" "lightning-openchannel_update" |
|||
.SH NAME |
|||
lightning-openchannel_update - Command to update a collab channel open |
|||
.SH SYNOPSIS |
|||
|
|||
\fBopenchannel_update\fR \fIid\fR \fIpsbt\fR |
|||
|
|||
.SH DESCRIPTION |
|||
|
|||
\fBopenchannel_update\fR is a low level RPC command which continues an open |
|||
channel with peer, as specified by \fIid\fR\. An updated \fIpsbt\fR is passed in; any |
|||
changes from the PSBT last returned (either from \fBopenchannel_init\fR or |
|||
a previous call to \fBopenchannel_update\fR) will be communicated to the peer\. |
|||
|
|||
|
|||
Must be called after \fBopenchannel_init\fR and before \fBopenchannel_signed\fR\. |
|||
|
|||
|
|||
Must be called until \fIcommitments_secured\fR is returned as true, at which point |
|||
\fBopenchannel_signed\fR should be called with a signed version of the PSBT |
|||
returned by the last call to \fBopenchannel_update\fR\. |
|||
|
|||
|
|||
\fIid\fR is the node id of the remote peer\. |
|||
|
|||
|
|||
\fIpsbt\fR is the updated PSBT to be sent to the peer\. May be identical to |
|||
the PSBT last returned by either \fBopenchannel_init\fR or \fBopenchannel_update\fR\. |
|||
|
|||
.SH RETURN VALUE |
|||
|
|||
On success, returns the \fIchannel_id\fR for this channel; an updated, potentially |
|||
complete \fIpsbt\fR for this channel's funding transaction; and the flag |
|||
\fIcommitments_secured\fR, which indicates the completeness of the returned \fIpsbt\fR\. |
|||
If \fIcommitments_secured\fR is true, caller should proceed with signing the |
|||
returned PSBT and calling \fBopenchannel_signed\fR to complete the channel open\. |
|||
|
|||
.RS |
|||
.IP \[bu] |
|||
-32602: If the given parameters are wrong\. |
|||
.IP \[bu] |
|||
-1: Catchall nonspecific error\. |
|||
.IP \[bu] |
|||
305: Peer is not connected\. |
|||
.IP \[bu] |
|||
306: Unknown peer id\. |
|||
.IP \[bu] |
|||
309: PSBT missing required fields |
|||
|
|||
.RE |
|||
.SH SEE ALSO |
|||
|
|||
lightning-openchannel_\fBupdate\fR(7), lightning-openchannel_\fBsigned\fR(7), |
|||
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7), |
|||
\fBlightning-fundchannel\fR(7), \fBlightning-fundpsbt\fR(7), \fBlightning-utxopsbt\fR(7), |
|||
\fBlightning-multifundchannel\fR(7) |
|||
|
|||
.SH AUTHOR |
|||
|
|||
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\. |
|||
|
|||
.SH RESOURCES |
|||
|
|||
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR |
|||
|
|||
\" SHA256STAMP:dcf253e7b1658e71a9721fccee76a6bb07af7579ca4b0413428d2a1e8c9613bc |
@ -0,0 +1,59 @@ |
|||
lightning-openchannel\_update -- Command to update a collab channel open |
|||
======================================================================== |
|||
|
|||
SYNOPSIS |
|||
-------- |
|||
|
|||
**openchannel_update** *id* *psbt* |
|||
|
|||
DESCRIPTION |
|||
----------- |
|||
|
|||
`openchannel_update` is a low level RPC command which continues an open |
|||
channel with peer, as specified by *id*. An updated *psbt* is passed in; any |
|||
changes from the PSBT last returned (either from `openchannel_init` or |
|||
a previous call to `openchannel_update`) will be communicated to the peer. |
|||
|
|||
Must be called after `openchannel_init` and before `openchannel_signed`. |
|||
|
|||
Must be called until *commitments_secured* is returned as true, at which point |
|||
`openchannel_signed` should be called with a signed version of the PSBT |
|||
returned by the last call to `openchannel_update`. |
|||
|
|||
*id* is the node id of the remote peer. |
|||
|
|||
*psbt* is the updated PSBT to be sent to the peer. May be identical to |
|||
the PSBT last returned by either `openchannel_init` or `openchannel_update`. |
|||
|
|||
RETURN VALUE |
|||
------------ |
|||
|
|||
On success, returns the *channel_id* for this channel; an updated, potentially |
|||
complete *psbt* for this channel's funding transaction; and the flag |
|||
*commitments_secured*, which indicates the completeness of the returned *psbt*. |
|||
If *commitments_secured* is true, caller should proceed with signing the |
|||
returned PSBT and calling `openchannel_signed` to complete the channel open. |
|||
|
|||
- -32602: If the given parameters are wrong. |
|||
- -1: Catchall nonspecific error. |
|||
- 305: Peer is not connected. |
|||
- 306: Unknown peer id. |
|||
- 309: PSBT missing required fields |
|||
|
|||
SEE ALSO |
|||
-------- |
|||
|
|||
lightning-openchannel\_update(7), lightning-openchannel\_signed(7), |
|||
lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), |
|||
lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), |
|||
lightning-multifundchannel(7) |
|||
|
|||
AUTHOR |
|||
------ |
|||
|
|||
@niftynei <<niftynei@gmail.com>> is mainly responsible. |
|||
|
|||
RESOURCES |
|||
--------- |
|||
|
|||
Main web site: <https://github.com/ElementsProject/lightning> |
Loading…
Reference in new issue