-
Notifications
You must be signed in to change notification settings - Fork 1k
doc: Added fundchannel man page. #1463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| '\" t | ||
| .\" Title: lightning-fundchannel | ||
| .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] | ||
| .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> | ||
| .\" Date: 05/07/2018 | ||
| .\" Manual: \ \& | ||
| .\" Source: \ \& | ||
| .\" Language: English | ||
| .\" | ||
| .TH "LIGHTNING\-FUNDCHANN" "7" "05/07/2018" "\ \&" "\ \&" | ||
| .\" ----------------------------------------------------------------- | ||
| .\" * 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-fundchannel \- Command for establishing a lightning channel\&. | ||
| .SH "SYNOPSIS" | ||
| .sp | ||
| \fBfundchannel\fR \fIid\fR \fIsatoshi\fR | ||
| .SH "DESCRIPTION" | ||
| .sp | ||
| The \fBfundchannel\fR RPC command opens a payment channel with a peer by commiting 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\&. | ||
| .sp | ||
| \fIid\fR is the peer id obtained from \fBconnect\fR\&. | ||
| .sp | ||
| \fIsatoshi\fR is the amount in satoshis taken from the internal wallet to fund the channel\&. The string \fIall\fR can be used to specify all available funds\&. This value must be greater than the dust limit, currently set to 546\&. And it must be less than 1<<24 (approximately 0\&.16778 BTC)\&. | ||
| .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\&. | ||
| .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 arror\&. | ||
| .RE | ||
| .sp | ||
| The above error may include a descriptive message indicating: | ||
| .sp | ||
| .RS 4 | ||
| .ie n \{\ | ||
| \h'-04'\(bu\h'+03'\c | ||
| .\} | ||
| .el \{\ | ||
| .sp -1 | ||
| .IP \(bu 2.3 | ||
| .\} | ||
| The | ||
| \fIid\fR | ||
| is invalid\&. | ||
| .RE | ||
| .sp | ||
| .RS 4 | ||
| .ie n \{\ | ||
| \h'-04'\(bu\h'+03'\c | ||
| .\} | ||
| .el \{\ | ||
| .sp -1 | ||
| .IP \(bu 2.3 | ||
| .\} | ||
| There are not enough funds in the internal wallet to create the transaction\&. | ||
| .RE | ||
| .sp | ||
| .RS 4 | ||
| .ie n \{\ | ||
| \h'-04'\(bu\h'+03'\c | ||
| .\} | ||
| .el \{\ | ||
| .sp -1 | ||
| .IP \(bu 2.3 | ||
| .\} | ||
| The maximum allowed funding amount is exceeded\&. | ||
| .RE | ||
| .sp | ||
| .RS 4 | ||
| .ie n \{\ | ||
| \h'-04'\(bu\h'+03'\c | ||
| .\} | ||
| .el \{\ | ||
| .sp -1 | ||
| .IP \(bu 2.3 | ||
| .\} | ||
| \fIsatoshi\fR | ||
| is less than the dust limit\&. | ||
| .RE | ||
| .sp | ||
| Failure may also occur if \fBlightningd\fR and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc\&.)\&. | ||
| .SH "SEE ALSO" | ||
| .sp | ||
| lightning\-connect(7), lightning\-listfunds(), lightning\-listpeers(7) | ||
| .SH "RESOURCES" | ||
| .sp | ||
| Main web site: https://github\&.com/ElementsProject/lightning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| LIGHTNING-FUNDCHANNEL(7) | ||
| ======================== | ||
| :doctype: manpage | ||
|
|
||
| NAME | ||
| ---- | ||
| lightning-fundchannel - Command for establishing a lightning channel. | ||
|
|
||
| SYNOPSIS | ||
| -------- | ||
| *fundchannel* 'id' 'satoshi' | ||
|
|
||
| DESCRIPTION | ||
| ----------- | ||
| The *fundchannel* RPC command opens a payment channel with a peer by commiting | ||
| a funding transaction to the blockchain as defined in BOLT #2. | ||
| *fundchannel* by itself does not attempt to open a connection. | ||
| A connection must first be established using *connect*. | ||
| Once the transaction is confirmed, normal channel operations may begin. | ||
| Readiness is indicated by *listpeers* reporting a 'state' of CHANNELD_NORMAL | ||
| for the channel. | ||
|
|
||
| 'id' is the peer id obtained from *connect*. | ||
|
|
||
| 'satoshi' is the amount in satoshis taken from the internal wallet to fund the channel. | ||
| The string 'all' can be used to specify all available funds. | ||
| This value must be greater than the dust limit, currently set to 546. | ||
| And it must be less than 1<<24 (approximately 0.16778 BTC). | ||
|
|
||
| RETURN VALUE | ||
| ------------ | ||
| On success, the 'tx' and 'txid' of the transaction is returned, as well as the | ||
| 'channel_id' of the newly created channel. | ||
| On failure, an error is reported and the channel is not funded. | ||
|
|
||
| The following error codes may occur: | ||
|
|
||
| * -1. Catchall nonspecific arror. | ||
|
|
||
| The above error may include a descriptive message indicating: | ||
|
|
||
| * The 'id' is invalid. | ||
| * There are not enough funds in the internal wallet to create the transaction. | ||
| * The maximum allowed funding amount is exceeded. | ||
| * 'satoshi' is less than the dust limit. | ||
|
|
||
| Failure may also occur if *lightningd* and the peer cannot agree on channel | ||
| parameters (funding limits, channel reserves, fees, etc.). | ||
|
|
||
| SEE ALSO | ||
| -------- | ||
| lightning-connect(7), lightning-listfunds(), lightning-listpeers(7) | ||
|
|
||
| RESOURCES | ||
| --------- | ||
| Main web site: https://github.com/ElementsProject/lightning | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should probably start an effort at some point to give unique error codes for some of the more complex commands. Since it is a JSON-RPC change this will probably have to be done pre-0.6 release too. This is fine for now though; we can update the docs later when we finally have unique error codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's what I was thinking.