Skip to content

Commit

Permalink
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundch…
Browse files Browse the repository at this point in the history
…annel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.

We also add a test for getlog, since it was never called by the
testsuite.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed May 26, 2021
1 parent 4d7dcf0 commit a65fd7f
Show file tree
Hide file tree
Showing 37 changed files with 1,083 additions and 247 deletions.
23 changes: 20 additions & 3 deletions doc/lightning-disableoffer.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions doc/lightning-disableoffer.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,17 @@ EXAMPLE JSON REQUEST
RETURN VALUE
------------

If successful the command returns an object, in the same format as **listoffers**.
The "active" field will always be false.
Note: the returned object is the same format as **listoffers**.

[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **offer_id** (hex): the merkle hash of the offer (always 64 characters)
- **active** (boolean): Whether the offer can produce invoices/payments (always "false")
- **single_use** (boolean): Whether the offer is disabled after first successful use
- **bolt12** (string): The bolt12 string representing this offer
- **used** (boolean): Whether the offer has had an invoice paid / payment made
- **label** (string, optional): The label provided when offer was created
[comment]: # (GENERATE-FROM-SCHEMA-END)

EXAMPLE JSON RESPONSE
-----
Expand Down Expand Up @@ -63,3 +72,4 @@ RESOURCES
---------

Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:6b0ae21e38a83742735f38e9c022b33ed4a436cacc746ff22e63d7b00779e4d0)
2 changes: 1 addition & 1 deletion doc/lightning-disconnect.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions doc/lightning-disconnect.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ connection.
RETURN VALUE
------------

[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an empty object is returned.
[comment]: # (GENERATE-FROM-SCHEMA-END)

On error the returned object will contain `code` and `message` properties,
with `code` being one of the following:
Expand All @@ -56,3 +58,4 @@ RESOURCES

Main web site: <https://github.com/ElementsProject/lightning>

[comment]: # ( SHA256STAMP:f974a3848c4db5b73fffa969a741ef6619c9a375783fabe731882d84a6bbf5ff)
94 changes: 55 additions & 39 deletions doc/lightning-feerates.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 31 additions & 41 deletions doc/lightning-feerates.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,47 +44,36 @@ which will override the recommended feerates returned by **feerates**.
RETURN VALUE
------------

The **feerates** command returns the feerates in an object named
*perkw* or *perkb*, depending on your *style* parameter.

Some of these estimations may be missing, except for *min\_acceptable*
and *max\_acceptable*, which are always present.

The *perkw* or *perkb* object may have fields containing the estimates:

* *opening* - feerate used for channel opening by lightning-fundchannel(7),
as well as normal onchain-to-onchain spends by lightning-withdraw(7).
In general, for all normal onchain-to-onchain spends, this is the feerate
you should also use.
* *mutual\_close* - the starting feerate used in mutual close negotiation.
Note that since mutual close is a **negotiation**,
the actual feerate used in mutual close
will be somewhere between this
and the corresponding mutual close feerate of the peer.
* *unilateral\_close* - the feerate we will pay for when a unilateral close
is done on a channel we originally funded.
When anchor commitments are implemented,
this will be the feerate we will use
for a unilateral close we initiated.
* *delayed\_to\_us* - the feerate we will use when claiming our output from
a unilateral close we initiated.
* *htlc_resolution* - the feerate we will use to claim HTLCs
from a unilateral close we initiated.
* *penalty* - the feerate we will use to revoke old state,
if the counterparty attempts to cheat us.

The following fields are always present in the *perkw* or *perkb* object:

* *min\_acceptable* - the smallest feerate that you can use,
usually the minimum relayed feerate of the backend.
* *max\_acceptable* - the largest feerate we will accept
from remote negotiations.
If a peer attempts to open a channel to us but wants a unilateral close
feerate larger than *max\_acceptable*, we reject the open attempt.
If the peer attempts to change the unilateral close feerate of a channel it
opened to us, such that the new feerate exceeds *max\_acceptable*, we
unilaterally close the channel
(at the current unilateral close feerate instead of the new one).
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **perkb** (object, optional): If *style* parameter was perkb:
- **min_acceptable** (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
- **max_acceptable** (u32): The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet).
- **opening** (u32, optional): Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)
- **mutual_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer.
- **unilateral_close** (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
- **delayed_to_us** (u32, optional): Feerate for returning unilateral close funds to our wallet
- **htlc_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
- **penalty** (u32, optional): Feerate to start at when penalizing a cheat attempt
- **perkw** (object, optional): If *style* parameter was perkw:
- **min_acceptable** (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
- **max_acceptable** (u32): The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet).
- **opening** (u32, optional): Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)
- **mutual_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer.
- **unilateral_close** (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
- **delayed_to_us** (u32, optional): Feerate for returning unilateral close funds to our wallet
- **htlc_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
- **penalty** (u32, optional): Feerate to start at when penalizing a cheat attempt
- **onchain_fee_estimates** (object, optional):
- **opening_channel_satoshis** (u64): Estimated cost of typical channel open
- **mutual_close_satoshis** (u64): Estimated cost of typical channel close
- **unilateral_close_satoshis** (u64): Estimated cost of typical unilateral close (without HTLCs)
- **htlc_timeout_satoshis** (u64): Estimated cost of typical HTLC timeout transaction
- **htlc_success_satoshis** (u64): Estimated cost of typical HTLC fulfillment transaction

The following warnings may also be returned:
- **warning_missing_feerates**: Some fee estimates are missing
[comment]: # (GENERATE-FROM-SCHEMA-END)

ERRORS
------
Expand Down Expand Up @@ -129,3 +118,4 @@ RESOURCES

Main web site: <https://github.com/ElementsProject/lightning>

[comment]: # ( SHA256STAMP:e16ae963e528995f1e01c80b4ed4e9b0d6c457a559928e98ab6cf32624557894)
50 changes: 19 additions & 31 deletions doc/lightning-fetchinvoice.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a65fd7f

Please sign in to comment.