From 8f1164365e7688ac923ddde6ea5b4a7cdf2ced3e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 6 Sep 2022 07:03:09 +0930 Subject: [PATCH] doc: generate correct markdown from schemas. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You can't start a list without a paragraph separator. ```diff --- /tmp/before 2022-07-20 22:02:23.485372596 +0930 +++ /tmp/after 2022-07-20 22:02:33.745528456 +0930 @@ -21,12 +21,16 @@ On startup of the daemon, no autoclean is set up. RETURN VALUE - On success, an object is returned, containing: - enabled (boolean): - whether invoice autocleaning is active + On success, an object is returned, containing: - If enabled is true: - expired_by (u64): how long an invoice must be ex‐ - pired (seconds) before we delete it - cycle_seconds (u64): how long an - invoice must be expired (seconds) before we delete it + • enabled (boolean): whether invoice autocleaning is active + + If enabled is true: + + • expired_by (u64): how long an invoice must be expired (seconds) be‐ + fore we delete it + • cycle_seconds (u64): how long an invoice must be expired (seconds) + before we delete it AUTHOR ZmnSCPxj is mainly responsible. ``` Signed-off-by: Rusty Russell --- doc/lightning-autocleaninvoice.7.md | 2 ++ doc/lightning-check.7.md | 1 + doc/lightning-checkmessage.7.md | 1 + doc/lightning-close.7.md | 2 ++ doc/lightning-commando-rune.7.md | 1 + doc/lightning-connect.7.md | 3 +++ doc/lightning-createinvoice.7.md | 1 + doc/lightning-createonion.7.md | 1 + doc/lightning-datastore.7.md | 1 + doc/lightning-decode.7.md | 8 ++++++++ doc/lightning-decodepay.7.md | 1 + doc/lightning-deldatastore.7.md | 1 + doc/lightning-delinvoice.7.md | 3 +++ doc/lightning-delpay.7.md | 1 + doc/lightning-disableoffer.7.md | 1 + doc/lightning-feerates.7.md | 2 ++ doc/lightning-fetchinvoice.7.md | 1 + doc/lightning-fundchannel.7.md | 1 + doc/lightning-fundchannel_cancel.7.md | 1 + doc/lightning-fundchannel_complete.7.md | 1 + doc/lightning-fundchannel_start.7.md | 2 ++ doc/lightning-funderupdate.7.md | 1 + doc/lightning-fundpsbt.7.md | 1 + doc/lightning-getinfo.7.md | 3 +++ doc/lightning-getlog.7.md | 4 ++++ doc/lightning-getroute.7.md | 1 + doc/lightning-help.7.md | 1 + doc/lightning-invoice.7.md | 2 ++ doc/lightning-keysend.7.md | 2 ++ doc/lightning-listchannels.7.md | 1 + doc/lightning-listconfigs.7.md | 1 + doc/lightning-listdatastore.7.md | 1 + doc/lightning-listforwards.7.md | 4 ++++ doc/lightning-listfunds.7.md | 5 +++++ doc/lightning-listinvoices.7.md | 2 ++ doc/lightning-listnodes.7.md | 4 ++++ doc/lightning-listoffers.7.md | 1 + doc/lightning-listpays.7.md | 4 ++++ doc/lightning-listpeers.7.md | 11 +++++++++++ doc/lightning-listsendpays.7.md | 3 +++ doc/lightning-listtransactions.7.md | 1 + doc/lightning-makesecret.7.md | 1 + doc/lightning-multifundchannel.7.md | 1 + doc/lightning-multiwithdraw.7.md | 1 + doc/lightning-newaddr.7.md | 1 + doc/lightning-offer.7.md | 1 + doc/lightning-offerout.7.md | 1 + doc/lightning-openchannel_abort.7.md | 1 + doc/lightning-openchannel_bump.7.md | 1 + doc/lightning-openchannel_init.7.md | 1 + doc/lightning-openchannel_signed.7.md | 1 + doc/lightning-openchannel_update.7.md | 1 + doc/lightning-parsefeerate.7.md | 1 + doc/lightning-pay.7.md | 2 ++ doc/lightning-ping.7.md | 1 + doc/lightning-plugin.7.md | 3 +++ doc/lightning-reserveinputs.7.md | 1 + doc/lightning-sendcustommsg.7.md | 1 + doc/lightning-sendinvoice.7.md | 2 ++ doc/lightning-sendonion.7.md | 3 +++ doc/lightning-sendpay.7.md | 3 +++ doc/lightning-sendpsbt.7.md | 1 + doc/lightning-setchannel.7.md | 1 + doc/lightning-setchannelfee.7.md | 1 + doc/lightning-signmessage.7.md | 1 + doc/lightning-signpsbt.7.md | 1 + doc/lightning-txdiscard.7.md | 1 + doc/lightning-txprepare.7.md | 1 + doc/lightning-txsend.7.md | 1 + doc/lightning-unreserveinputs.7.md | 2 ++ doc/lightning-utxopsbt.7.md | 1 + doc/lightning-waitanyinvoice.7.md | 2 ++ doc/lightning-waitblockheight.7.md | 1 + doc/lightning-waitinvoice.7.md | 2 ++ doc/lightning-waitsendpay.7.md | 2 ++ doc/lightning-withdraw.7.md | 1 + tools/fromschema.py | 10 +++++----- 77 files changed, 141 insertions(+), 5 deletions(-) diff --git a/doc/lightning-autocleaninvoice.7.md b/doc/lightning-autocleaninvoice.7.md index 8dffb1478..5f629dc30 100644 --- a/doc/lightning-autocleaninvoice.7.md +++ b/doc/lightning-autocleaninvoice.7.md @@ -27,9 +27,11 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **enabled** (boolean): whether invoice autocleaning is active If **enabled** is *true*: + - **expired_by** (u64): how long an invoice must be expired (seconds) before we delete it - **cycle_seconds** (u64): how long an invoice must be expired (seconds) before we delete it diff --git a/doc/lightning-check.7.md b/doc/lightning-check.7.md index 243160cf8..13858422d 100644 --- a/doc/lightning-check.7.md +++ b/doc/lightning-check.7.md @@ -25,6 +25,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **command_to_check** (string): the *command_to_check* argument [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-checkmessage.7.md b/doc/lightning-checkmessage.7.md index dd010c2d8..0ca51979e 100644 --- a/doc/lightning-checkmessage.7.md +++ b/doc/lightning-checkmessage.7.md @@ -29,6 +29,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **verified** (boolean): whether the signature was valid (always *true*) - **pubkey** (pubkey): the *pubkey* parameter, or the pubkey found by looking for known nodes diff --git a/doc/lightning-close.7.md b/doc/lightning-close.7.md index 97ded08c8..5757bc156 100644 --- a/doc/lightning-close.7.md +++ b/doc/lightning-close.7.md @@ -104,9 +104,11 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **type** (string): Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel (one of "mutual", "unilateral", "unopened") If **type** is "mutual" or "unilateral": + - **tx** (hex): the raw bitcoin transaction used to close the channel (if it was open) - **txid** (txid): the transaction id of the *tx* field diff --git a/doc/lightning-commando-rune.7.md b/doc/lightning-commando-rune.7.md index abd71efb4..c9561a6ad 100644 --- a/doc/lightning-commando-rune.7.md +++ b/doc/lightning-commando-rune.7.md @@ -190,6 +190,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **rune** (string): the resulting rune - **unique_id** (string): the id of this rune: this is set at creation and cannot be changed (even as restrictions are added) diff --git a/doc/lightning-connect.7.md b/doc/lightning-connect.7.md index 5f8274924..d68d08aae 100644 --- a/doc/lightning-connect.7.md +++ b/doc/lightning-connect.7.md @@ -49,6 +49,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **id** (pubkey): the peer we connected to - **features** (hex): BOLT 9 features bitmap offered by peer - **direction** (string): Whether they initiated connection or we did (one of "in", "out") @@ -56,9 +57,11 @@ On success, an object is returned, containing: - **type** (string): Type of connection (*torv2*/*torv3* only if **direction** is *out*) (one of "local socket", "ipv4", "ipv6", "torv2", "torv3") If **type** is "local socket": + - **socket** (string): socket filename If **type** is "ipv4", "ipv6", "torv2" or "torv3": + - **address** (string): address in expected format for **type** - **port** (u16): port number diff --git a/doc/lightning-createinvoice.7.md b/doc/lightning-createinvoice.7.md index f960b936f..a6dfe3bd2 100644 --- a/doc/lightning-createinvoice.7.md +++ b/doc/lightning-createinvoice.7.md @@ -32,6 +32,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **label** (string): the label for the invoice - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): Whether it has been paid, or can no longer be paid (one of "paid", "expired", "unpaid") diff --git a/doc/lightning-createonion.7.md b/doc/lightning-createonion.7.md index 381845886..f2f428606 100644 --- a/doc/lightning-createonion.7.md +++ b/doc/lightning-createonion.7.md @@ -91,6 +91,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **onion** (hex): the onion packet (*onion_size* bytes) - **shared_secrets** (array of secrets): one shared secret for each node in the *hops* parameter: - the shared secret with this hop (always 64 characters) diff --git a/doc/lightning-datastore.7.md b/doc/lightning-datastore.7.md index 95e7df0e0..39bce1bbe 100644 --- a/doc/lightning-datastore.7.md +++ b/doc/lightning-datastore.7.md @@ -34,6 +34,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **key** (array of strings): - Part of the key added to the datastore - **generation** (u64, optional): The number of times this has been updated diff --git a/doc/lightning-decode.7.md b/doc/lightning-decode.7.md index 078e45a12..b6464ab9b 100644 --- a/doc/lightning-decode.7.md +++ b/doc/lightning-decode.7.md @@ -23,10 +23,12 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **type** (string): what kind of object it decoded to (one of "bolt12 offer", "bolt12 invoice", "bolt12 invoice_request", "bolt11 invoice", "rune") - **valid** (boolean): if this is false, you *MUST* not use the result except for diagnostics! If **type** is "bolt12 offer", and **valid** is *true*: + - **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters) - **node_id** (point32): x-only public key of the offering node - **description** (string): the description of the purpose of the offer @@ -64,10 +66,12 @@ If **type** is "bolt12 offer", and **valid** is *true*: - **warning_offer_unknown_currency**: The currency code is unknown (so no **minor_unit**) If **type** is "bolt12 offer", and **valid** is *false*: + - the following warnings are possible: - **warning_offer_missing_description**: No **description** If **type** is "bolt12 invoice", and **valid** is *true*: + - **node_id** (point32): x-only public key of the offering node - **signature** (bip340sig): BIP-340 signature of the *node_id* on this offer - **amount_msat** (msat): the amount in bitcoin @@ -100,6 +104,7 @@ If **type** is "bolt12 invoice", and **valid** is *true*: - **refund_signature** (bip340sig, optional): the payer key signature to get a refund If **type** is "bolt12 invoice", and **valid** is *false*: + - **fallbacks** (array of objects, optional): - the following warnings are possible: - **warning_invoice_fallbacks_version_invalid**: **version** is > 16 @@ -116,6 +121,7 @@ If **type** is "bolt12 invoice", and **valid** is *false*: - **warning_invoice_refund_missing_signature**: No **refund_signature** If **type** is "bolt12 invoice_request", and **valid** is *true*: + - **offer_id** (hex): the id of the offer this is requesting (merkle hash of non-signature fields) (always 64 characters) - **payer_key** (point32): the transient key which identifies the payer - **chain** (hex, optional): which blockchain this invoice_request is for (missing implies bitcoin mainnet only) (always 64 characters) @@ -128,6 +134,7 @@ If **type** is "bolt12 invoice_request", and **valid** is *true*: - **recurrence_signature** (bip340sig, optional): the payer key signature If **type** is "bolt12 invoice_request", and **valid** is *false*: + - the following warnings are possible: - **warning_invoice_request_missing_offer_id**: No **offer_id** - **warning_invoice_request_missing_payer_key**: No **payer_key** @@ -135,6 +142,7 @@ If **type** is "bolt12 invoice_request", and **valid** is *false*: - **warning_invoice_request_invalid_recurrence_signature**: **recurrence_signature** incorrect If **type** is "bolt11 invoice", and **valid** is *true*: + - **currency** (string): the BIP173 name for the currency - **created_at** (u64): the UNIX-style timestamp of the invoice - **expiry** (u64): the number of seconds this is valid after *timestamp* diff --git a/doc/lightning-decodepay.7.md b/doc/lightning-decodepay.7.md index 336508033..42f26c39e 100644 --- a/doc/lightning-decodepay.7.md +++ b/doc/lightning-decodepay.7.md @@ -17,6 +17,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **currency** (string): the BIP173 name for the currency - **created_at** (u64): the UNIX-style timestamp of the invoice - **expiry** (u64): the number of seconds this is valid after *timestamp* diff --git a/doc/lightning-deldatastore.7.md b/doc/lightning-deldatastore.7.md index d35ccf971..16339e752 100644 --- a/doc/lightning-deldatastore.7.md +++ b/doc/lightning-deldatastore.7.md @@ -20,6 +20,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **key** (array of strings): - Part of the key added to the datastore - **generation** (u64, optional): The number of times this has been updated diff --git a/doc/lightning-delinvoice.7.md b/doc/lightning-delinvoice.7.md index 7e5ca099a..0762528b3 100644 --- a/doc/lightning-delinvoice.7.md +++ b/doc/lightning-delinvoice.7.md @@ -26,6 +26,7 @@ Note: The return is the same as an object from lightning-listinvoice(7). [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **label** (string): Unique label given at creation time - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): State of invoice (one of "paid", "expired", "unpaid") @@ -36,10 +37,12 @@ On success, an object is returned, containing: - **description** (string, optional): description used in the invoice If **bolt12** is present: + - **local_offer_id** (hex, optional): offer for which this invoice was created - **payer_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice If **status** is "paid": + - **pay_index** (u64): unique index for this invoice payment - **amount_received_msat** (msat): how much was actually received - **paid_at** (u64): UNIX timestamp of when payment was received diff --git a/doc/lightning-delpay.7.md b/doc/lightning-delpay.7.md index 3a4f9a05d..f24268544 100644 --- a/doc/lightning-delpay.7.md +++ b/doc/lightning-delpay.7.md @@ -37,6 +37,7 @@ payments will be returned -- one payment object for each partid. [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **payments** is returned. It is an array of objects, where each object contains: + - **id** (u64): unique ID for this payment attempt - **payment_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): status of the payment (one of "pending", "failed", "complete") diff --git a/doc/lightning-disableoffer.7.md b/doc/lightning-disableoffer.7.md index 0d0702e2a..c42bfcc84 100644 --- a/doc/lightning-disableoffer.7.md +++ b/doc/lightning-disableoffer.7.md @@ -36,6 +36,7 @@ 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 diff --git a/doc/lightning-feerates.7.md b/doc/lightning-feerates.7.md index 345e1fe1a..bc5cd90fc 100644 --- a/doc/lightning-feerates.7.md +++ b/doc/lightning-feerates.7.md @@ -46,6 +46,7 @@ RETURN VALUE [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). @@ -72,6 +73,7 @@ On success, an object is returned, containing: - **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) diff --git a/doc/lightning-fetchinvoice.7.md b/doc/lightning-fetchinvoice.7.md index d0bc02d65..dbf168090 100644 --- a/doc/lightning-fetchinvoice.7.md +++ b/doc/lightning-fetchinvoice.7.md @@ -50,6 +50,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **invoice** (string): The BOLT12 invoice we fetched - **changes** (object): Summary of changes from offer: - **description_appended** (string, optional): extra characters appended to the *description* field. diff --git a/doc/lightning-fundchannel.7.md b/doc/lightning-fundchannel.7.md index 420892526..ae0bb1521 100644 --- a/doc/lightning-fundchannel.7.md +++ b/doc/lightning-fundchannel.7.md @@ -84,6 +84,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **tx** (hex): The raw transaction which funded the channel - **txid** (txid): The txid of the transaction which funded the channel - **outnum** (u32): The 0-based output index showing which output funded the channel diff --git a/doc/lightning-fundchannel_cancel.7.md b/doc/lightning-fundchannel_cancel.7.md index fbc49b705..474f1fbb8 100644 --- a/doc/lightning-fundchannel_cancel.7.md +++ b/doc/lightning-fundchannel_cancel.7.md @@ -27,6 +27,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **cancelled** (string): A message indicating it was cancelled by RPC [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-fundchannel_complete.7.md b/doc/lightning-fundchannel_complete.7.md index 5a71e2490..b4949c085 100644 --- a/doc/lightning-fundchannel_complete.7.md +++ b/doc/lightning-fundchannel_complete.7.md @@ -28,6 +28,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **channel_id** (hex): The channel_id of the resulting channel (always 64 characters) - **commitments_secured** (boolean): Indication that channel is safe to use (always *true*) diff --git a/doc/lightning-fundchannel_start.7.md b/doc/lightning-fundchannel_start.7.md index 490650442..6ef71d3e8 100644 --- a/doc/lightning-fundchannel_start.7.md +++ b/doc/lightning-fundchannel_start.7.md @@ -43,12 +43,14 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **funding_address** (string): The address to send funding to for the channel. DO NOT SEND COINS TO THIS ADDRESS YET. - **scriptpubkey** (hex): The raw scriptPubkey for the address - **close_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script` - **mindepth** (u32, optional): Number of confirmations before we consider the channel active. The following warnings may also be returned: + - **warning_usage**: A warning not to prematurely broadcast the funding transaction (always present!) [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-funderupdate.7.md b/doc/lightning-funderupdate.7.md index 2e8999cfc..842957e00 100644 --- a/doc/lightning-funderupdate.7.md +++ b/doc/lightning-funderupdate.7.md @@ -106,6 +106,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **summary** (string): Summary of the current funding policy e.g. (match 100) - **policy** (string): Policy funder plugin will use to decide how much captial to commit to a v2 open channel request (one of "match", "available", "fixed") - **policy_mod** (u32): The *policy_mod* is the number or 'modification' to apply to the policy. diff --git a/doc/lightning-fundpsbt.7.md b/doc/lightning-fundpsbt.7.md index 0b138e9fc..5a5aa8e2d 100644 --- a/doc/lightning-fundpsbt.7.md +++ b/doc/lightning-fundpsbt.7.md @@ -72,6 +72,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **psbt** (string): Unsigned PSBT which fulfills the parameters given - **feerate_per_kw** (u32): The feerate used to create the PSBT, in satoshis-per-kiloweight - **estimated_final_weight** (u32): The estimated weight of the transaction once fully signed diff --git a/doc/lightning-getinfo.7.md b/doc/lightning-getinfo.7.md index 234e9da86..8575c99c8 100644 --- a/doc/lightning-getinfo.7.md +++ b/doc/lightning-getinfo.7.md @@ -27,6 +27,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **id** (pubkey): The public key unique to this node - **alias** (string): The fun alias this node will advertize (up to 32 characters) - **color** (hex): The favorite RGB color this node will advertize (always 6 characters) @@ -49,6 +50,7 @@ On success, an object is returned, containing: - **port** (u16): port number If **type** is "dns", "ipv4", "ipv6", "torv2" or "torv3": + - **address** (string): address in expected format for **type** - **binding** (array of objects, optional): The addresses we are listening on: - **type** (string): Type of connection (one of "local socket", "ipv4", "ipv6", "torv2", "torv3") @@ -57,6 +59,7 @@ On success, an object is returned, containing: - **socket** (string, optional): socket filename (only if **type** is "local socket") The following warnings may also be returned: + - **warning_bitcoind_sync**: Bitcoind is not up-to-date with network. - **warning_lightningd_sync**: Lightningd is still loading latest blocks from bitcoind. diff --git a/doc/lightning-getlog.7.md b/doc/lightning-getlog.7.md index 5b625f04e..c0c3c22b5 100644 --- a/doc/lightning-getlog.7.md +++ b/doc/lightning-getlog.7.md @@ -30,6 +30,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **created_at** (string): UNIX timestamp with 9 decimal places, when logging was initialized - **bytes_used** (u32): The number of bytes used by logging records - **bytes_max** (u32): The bytes_used values at which records will be trimmed @@ -37,15 +38,18 @@ On success, an object is returned, containing: - **type** (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT") If **type** is "SKIPPED": + - **num_skipped** (u32): number of unprinted log entries (deleted or below *level* parameter) If **type** is "BROKEN", "UNUSUAL", "INFO" or "DEBUG": + - **time** (string): UNIX timestamp with 9 decimal places after **created_at** - **source** (string): The particular logbook this was found in - **log** (string): The actual log message - **node_id** (pubkey, optional): The peer this is associated with If **type** is "IO_IN" or "IO_OUT": + - **time** (string): Seconds after **created_at**, with 9 decimal places - **source** (string): The particular logbook this was found in - **log** (string): The associated log message diff --git a/doc/lightning-getroute.7.md b/doc/lightning-getroute.7.md index 1e7fb5d48..ef2837170 100644 --- a/doc/lightning-getroute.7.md +++ b/doc/lightning-getroute.7.md @@ -279,6 +279,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **route** is returned. It is an array of objects, where each object contains: + - **id** (pubkey): The node at the end of this hop - **channel** (short_channel_id): The channel joining these nodes - **direction** (u32): 0 if this channel is traversed from lesser to greater **id**, otherwise 1 diff --git a/doc/lightning-help.7.md b/doc/lightning-help.7.md index 5c5dbc2e3..9e0e2ec8e 100644 --- a/doc/lightning-help.7.md +++ b/doc/lightning-help.7.md @@ -30,6 +30,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **help** (array of objects): - **command** (string): the command - **category** (string): the category for this command (useful for grouping) diff --git a/doc/lightning-invoice.7.md b/doc/lightning-invoice.7.md index 19f649d3e..bc20985b9 100644 --- a/doc/lightning-invoice.7.md +++ b/doc/lightning-invoice.7.md @@ -77,12 +77,14 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **bolt11** (string): the bolt11 string - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **payment_secret** (secret): the *payment_secret* to place in the onion (always 64 characters) - **expires_at** (u64): UNIX timestamp of when invoice expires The following warnings may also be returned: + - **warning_capacity**: even using all possible channels, there's not enough incoming capacity to pay this invoice. - **warning_offline**: there would be enough incoming capacity, but some channels are offline, so there isn't. - **warning_deadends**: there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't. diff --git a/doc/lightning-keysend.7.md b/doc/lightning-keysend.7.md index 515998e9b..90e4d404b 100644 --- a/doc/lightning-keysend.7.md +++ b/doc/lightning-keysend.7.md @@ -67,6 +67,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters) - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **created_at** (number): the UNIX timestamp showing when this payment was initiated @@ -77,6 +78,7 @@ On success, an object is returned, containing: - **destination** (pubkey, optional): the final destination of the payment The following warnings may also be returned: + - **warning_partial_completion**: Not all parts of a multi-part payment have completed [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-listchannels.7.md b/doc/lightning-listchannels.7.md index fff0edda2..ae63825a0 100644 --- a/doc/lightning-listchannels.7.md +++ b/doc/lightning-listchannels.7.md @@ -32,6 +32,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **channels** is returned. It is an array of objects, where each object contains: + - **source** (pubkey): the source node - **destination** (pubkey): the destination node - **short_channel_id** (short_channel_id): short channel id of channel diff --git a/doc/lightning-listconfigs.7.md b/doc/lightning-listconfigs.7.md index a5cdf6173..3820f6945 100644 --- a/doc/lightning-listconfigs.7.md +++ b/doc/lightning-listconfigs.7.md @@ -34,6 +34,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **# version** (string, optional): Special field indicating the current version - **plugins** (array of objects, optional): - **path** (string): Full path of the plugin diff --git a/doc/lightning-listdatastore.7.md b/doc/lightning-listdatastore.7.md index b3e65602f..0498c7155 100644 --- a/doc/lightning-listdatastore.7.md +++ b/doc/lightning-listdatastore.7.md @@ -20,6 +20,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **datastore** is returned. It is an array of objects, where each object contains: + - **key** (array of strings): - Part of the key added to the datastore - **generation** (u64, optional): The number of times this has been updated diff --git a/doc/lightning-listforwards.7.md b/doc/lightning-listforwards.7.md index 8a2ae8060..463bee4f3 100644 --- a/doc/lightning-listforwards.7.md +++ b/doc/lightning-listforwards.7.md @@ -23,6 +23,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **forwards** is returned. It is an array of objects, where each object contains: + - **in_channel** (short_channel_id): the channel that received the HTLC - **in_msat** (msat): the value of the incoming HTLC - **status** (string): still ongoing, completed, failed locally, or failed after forwarding (one of "offered", "settled", "local_failed", "failed") @@ -32,13 +33,16 @@ On success, an object containing **forwards** is returned. It is an array of ob - **style** (string, optional): Either a legacy onion format or a modern tlv format (one of "legacy", "tlv") If **out_msat** is present: + - **fee_msat** (msat): the amount this paid in fees - **out_msat** (msat): the amount we sent out the *out_channel* If **status** is "settled" or "failed": + - **resolved_time** (number): the UNIX timestamp when this was resolved If **status** is "local_failed" or "failed": + - **failcode** (u32, optional): the numeric onion code returned - **failreason** (string, optional): the name of the onion code returned diff --git a/doc/lightning-listfunds.7.md b/doc/lightning-listfunds.7.md index 12d060c9e..a99290293 100644 --- a/doc/lightning-listfunds.7.md +++ b/doc/lightning-listfunds.7.md @@ -21,6 +21,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **outputs** (array of objects): - **txid** (txid): the ID of the spendable transaction - **output** (u32): the index within *txid* @@ -32,9 +33,11 @@ On success, an object is returned, containing: - **redeemscript** (hex, optional): the redeemscript, only if it's p2sh-wrapped If **status** is "confirmed": + - **blockheight** (u32): Block height where it was confirmed If **reserved** is "true": + - **reserved_to_block** (u32): Block height where reservation will expire - **channels** (array of objects): - **peer_id** (pubkey): the peer with which the channel is opened @@ -46,9 +49,11 @@ On success, an object is returned, containing: - **state** (string): the channel state, in particular "CHANNELD_NORMAL" means the channel can be used normally (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN") If **state** is "CHANNELD_NORMAL": + - **short_channel_id** (short_channel_id): short channel id of channel If **state** is "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN" or "ONCHAIN": + - **short_channel_id** (short_channel_id, optional): short channel id of channel (only if funding reached lockin depth before closing) [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-listinvoices.7.md b/doc/lightning-listinvoices.7.md index 52ab2d14f..983b68575 100644 --- a/doc/lightning-listinvoices.7.md +++ b/doc/lightning-listinvoices.7.md @@ -22,6 +22,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **invoices** is returned. It is an array of objects, where each object contains: + - **label** (string): unique label supplied at invoice creation - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): Whether it's paid, unpaid or unpayable (one of "unpaid", "paid", "expired") @@ -34,6 +35,7 @@ On success, an object containing **invoices** is returned. It is an array of ob - **payer_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only). If **status** is "paid": + - **pay_index** (u64): Unique incrementing index for this payment - **amount_received_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay) - **paid_at** (u64): UNIX timestamp of when it was paid diff --git a/doc/lightning-listnodes.7.md b/doc/lightning-listnodes.7.md index 7a36dd71a..f8d1bb95c 100644 --- a/doc/lightning-listnodes.7.md +++ b/doc/lightning-listnodes.7.md @@ -28,10 +28,12 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **nodes** is returned. It is an array of objects, where each object contains: + - **nodeid** (pubkey): the public key of the node - **last_timestamp** (u32, optional): A node_announcement has been received for this node (UNIX timestamp) If **last_timestamp** is present: + - **alias** (string): The fun alias this node advertized (up to 32 characters) - **color** (hex): The favorite RGB color this node advertized (always 6 characters) - **features** (hex): BOLT #9 features bitmap this node advertized @@ -40,9 +42,11 @@ If **last_timestamp** is present: - **port** (u16): port number If **type** is "dns", "ipv4", "ipv6", "torv2" or "torv3": + - **address** (string): address in expected format for **type** If **option_will_fund** is present: + - **option_will_fund** (object): - **lease_fee_base_msat** (msat): the fixed fee for a lease (whole number of satoshis) - **lease_fee_basis** (u32): the proportional fee in basis points (parts per 10,000) for a lease diff --git a/doc/lightning-listoffers.7.md b/doc/lightning-listoffers.7.md index b684d749e..4dcd47e75 100644 --- a/doc/lightning-listoffers.7.md +++ b/doc/lightning-listoffers.7.md @@ -31,6 +31,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **offers** is returned. It is an array of objects, where each object contains: + - **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters) - **active** (boolean): whether this can still be used - **single_use** (boolean): whether this expires as soon as it's paid diff --git a/doc/lightning-listpays.7.md b/doc/lightning-listpays.7.md index f8c44bfb8..b1a355e13 100644 --- a/doc/lightning-listpays.7.md +++ b/doc/lightning-listpays.7.md @@ -18,6 +18,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **pays** is returned. It is an array of objects, where each object contains: + - **payment_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): status of the payment (one of "pending", "failed", "complete") - **created_at** (u64): the UNIX timestamp showing when this payment was initiated @@ -28,14 +29,17 @@ On success, an object containing **pays** is returned. It is an array of object - **bolt12** (string, optional): the bolt12 string (if supplied for pay: **experimental-offers** only). If **status** is "pending" or "complete": + - **amount_sent_msat** (msat): the amount we actually sent, including fees - **amount_msat** (msat, optional): the amount the destination received, if known If **status** is "complete": + - **preimage** (hex): proof of payment (always 64 characters) - **number_of_parts** (u64, optional): the number of parts for a successful payment (only if more than one). If **status** is "failed": + - **erroronion** (hex, optional): the error onion returned on failure, if any. [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-listpeers.7.md b/doc/lightning-listpeers.7.md index 34cb73ef9..b42256839 100644 --- a/doc/lightning-listpeers.7.md +++ b/doc/lightning-listpeers.7.md @@ -40,6 +40,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **peers** is returned. It is an array of objects, where each object contains: + - **id** (pubkey): the public key of the peer - **connected** (boolean): True if the peer is currently connected - **channels** (array of objects): @@ -125,21 +126,27 @@ On success, an object containing **peers** is returned. It is an array of objec - **status** (string, optional): set if this HTLC is currently waiting on a hook (and shows what plugin) If **direction** is "out": + - **state** (string): Status of the HTLC (one of "SENT_ADD_HTLC", "SENT_ADD_COMMIT", "RCVD_ADD_REVOCATION", "RCVD_ADD_ACK_COMMIT", "SENT_ADD_ACK_REVOCATION", "RCVD_REMOVE_HTLC", "RCVD_REMOVE_COMMIT", "SENT_REMOVE_REVOCATION", "SENT_REMOVE_ACK_COMMIT", "RCVD_REMOVE_ACK_REVOCATION") If **direction** is "in": + - **state** (string): Status of the HTLC (one of "RCVD_ADD_HTLC", "RCVD_ADD_COMMIT", "SENT_ADD_REVOCATION", "SENT_ADD_ACK_COMMIT", "RCVD_ADD_ACK_REVOCATION", "SENT_REMOVE_HTLC", "SENT_REMOVE_COMMIT", "RCVD_REMOVE_REVOCATION", "RCVD_REMOVE_ACK_COMMIT", "SENT_REMOVE_ACK_REVOCATION") If **close_to** is present: + - **close_to_addr** (string, optional): The bitcoin address we will close to If **scratch_txid** is present: + - **last_tx_fee_msat** (msat): fee attached to this the current tx If **short_channel_id** is present: + - **direction** (u32): 0 if we're the lesser node_id, 1 if we're the greater If **inflight** is present: + - **initial_feerate** (string): The feerate for the initial funding transaction in per-1000-weight, with "kpw" appended - **last_feerate** (string): The feerate for the latest funding transaction in per-1000-weight, with "kpw" appended - **next_feerate** (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended @@ -147,15 +154,18 @@ On success, an object containing **peers** is returned. It is an array of objec - **type** (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT") If **type** is "SKIPPED": + - **num_skipped** (u32): number of deleted/omitted entries If **type** is "BROKEN", "UNUSUAL", "INFO" or "DEBUG": + - **time** (string): UNIX timestamp with 9 decimal places - **source** (string): The particular logbook this was found in - **log** (string): The actual log message - **node_id** (pubkey): The peer this is associated with If **type** is "IO_IN" or "IO_OUT": + - **time** (string): UNIX timestamp with 9 decimal places - **source** (string): The particular logbook this was found in - **log** (string): The actual log message @@ -163,6 +173,7 @@ On success, an object containing **peers** is returned. It is an array of objec - **data** (hex): The IO which occurred If **connected** is *true*: + - **netaddr** (array of strings): A single entry array: - address, e.g. 1.2.3.4:1234 - **features** (hex): bitmap of BOLT #9 features from peer's INIT message diff --git a/doc/lightning-listsendpays.7.md b/doc/lightning-listsendpays.7.md index 174ebde0d..6d7859368 100644 --- a/doc/lightning-listsendpays.7.md +++ b/doc/lightning-listsendpays.7.md @@ -24,6 +24,7 @@ Note that the returned array is ordered by increasing *id*. [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **payments** is returned. It is an array of objects, where each object contains: + - **id** (u64): unique ID for this payment attempt - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): status of the payment (one of "pending", "failed", "complete") @@ -38,9 +39,11 @@ On success, an object containing **payments** is returned. It is an array of ob - **bolt12** (string, optional): the bolt12 string (if supplied for pay: **experimental-offers** only). If **status** is "complete": + - **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters) If **status** is "failed": + - **erroronion** (hex, optional): the onion message returned [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-listtransactions.7.md b/doc/lightning-listtransactions.7.md index f90eb7c04..42d5d2196 100644 --- a/doc/lightning-listtransactions.7.md +++ b/doc/lightning-listtransactions.7.md @@ -26,6 +26,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **transactions** is returned. It is an array of objects, where each object contains: + - **hash** (txid): the transaction id - **rawtx** (hex): the raw transaction - **blockheight** (u32): the block height of this tx diff --git a/doc/lightning-makesecret.7.md b/doc/lightning-makesecret.7.md index 7170061cb..7e5c47982 100644 --- a/doc/lightning-makesecret.7.md +++ b/doc/lightning-makesecret.7.md @@ -18,6 +18,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **secret** (secret): the pseudorandom key derived from HSM_secret (always 64 characters) [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-multifundchannel.7.md b/doc/lightning-multifundchannel.7.md index a9e75bb62..c2f544264 100644 --- a/doc/lightning-multifundchannel.7.md +++ b/doc/lightning-multifundchannel.7.md @@ -99,6 +99,7 @@ do not have a channel even if **multifundchannel** succeeded. [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **tx** (hex): The raw transaction which funded the channel - **txid** (txid): The txid of the transaction which funded the channel - **channel_ids** (array of objects): diff --git a/doc/lightning-multiwithdraw.7.md b/doc/lightning-multiwithdraw.7.md index 2e39c8876..d0817b87a 100644 --- a/doc/lightning-multiwithdraw.7.md +++ b/doc/lightning-multiwithdraw.7.md @@ -42,6 +42,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **tx** (hex): The raw transaction which was sent - **txid** (txid): The txid of the **tx** diff --git a/doc/lightning-newaddr.7.md b/doc/lightning-newaddr.7.md index 80865b8dd..95effec8c 100644 --- a/doc/lightning-newaddr.7.md +++ b/doc/lightning-newaddr.7.md @@ -31,6 +31,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **bech32** (string, optional): The bech32 (native segwit) address - **p2sh-segwit** (string, optional): The p2sh-wrapped address diff --git a/doc/lightning-offer.7.md b/doc/lightning-offer.7.md index 5bc01dfa8..23f6a0c3f 100644 --- a/doc/lightning-offer.7.md +++ b/doc/lightning-offer.7.md @@ -96,6 +96,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters) - **active** (boolean): whether this can still be used (always *true*) - **single_use** (boolean): whether this expires as soon as it's paid (reflects the *single_use* parameter) diff --git a/doc/lightning-offerout.7.md b/doc/lightning-offerout.7.md index f96d19149..d07d4d827 100644 --- a/doc/lightning-offerout.7.md +++ b/doc/lightning-offerout.7.md @@ -55,6 +55,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters) - **active** (boolean): whether this will pay a matching incoming invoice (always *true*) - **single_use** (boolean): whether this expires as soon as it's paid out (always *true*) diff --git a/doc/lightning-openchannel_abort.7.md b/doc/lightning-openchannel_abort.7.md index f05fba23f..1c6259c2f 100644 --- a/doc/lightning-openchannel_abort.7.md +++ b/doc/lightning-openchannel_abort.7.md @@ -21,6 +21,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **channel_id** (hex): the channel id of the aborted channel (always 64 characters) - **channel_canceled** (boolean): whether this is completely canceled (there may be remaining in-flight transactions) - **reason** (string): usually "Abort requested", but if it happened to fail at the same time it could be different diff --git a/doc/lightning-openchannel_bump.7.md b/doc/lightning-openchannel_bump.7.md index 66028426b..cd5c5c2ca 100644 --- a/doc/lightning-openchannel_bump.7.md +++ b/doc/lightning-openchannel_bump.7.md @@ -37,6 +37,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **channel_id** (hex): the channel id of the channel (always 64 characters) - **psbt** (string): the (incomplete) PSBT of the RBF transaction - **commitments_secured** (boolean): whether the *psbt* is complete (always *false*) diff --git a/doc/lightning-openchannel_init.7.md b/doc/lightning-openchannel_init.7.md index d8df70e08..2ea017eca 100644 --- a/doc/lightning-openchannel_init.7.md +++ b/doc/lightning-openchannel_init.7.md @@ -52,6 +52,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **channel_id** (hex): the channel id of the channel (always 64 characters) - **psbt** (string): the (incomplete) PSBT of the funding transaction - **commitments_secured** (boolean): whether the *psbt* is complete (always *false*) diff --git a/doc/lightning-openchannel_signed.7.md b/doc/lightning-openchannel_signed.7.md index 72972f6ed..33346a11e 100644 --- a/doc/lightning-openchannel_signed.7.md +++ b/doc/lightning-openchannel_signed.7.md @@ -31,6 +31,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **channel_id** (hex): the channel id of the channel (always 64 characters) - **tx** (hex): the funding transaction - **txid** (txid): The txid of the **tx** diff --git a/doc/lightning-openchannel_update.7.md b/doc/lightning-openchannel_update.7.md index aa01a08a8..ea279667a 100644 --- a/doc/lightning-openchannel_update.7.md +++ b/doc/lightning-openchannel_update.7.md @@ -30,6 +30,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **channel_id** (hex): the channel id of the channel (always 64 characters) - **psbt** (string): the PSBT of the funding transaction - **commitments_secured** (boolean): whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open) diff --git a/doc/lightning-parsefeerate.7.md b/doc/lightning-parsefeerate.7.md index b521e8cdc..9006e6877 100644 --- a/doc/lightning-parsefeerate.7.md +++ b/doc/lightning-parsefeerate.7.md @@ -18,6 +18,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **perkw** (u32, optional): Value of *feerate_str* in kilosipa [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-pay.7.md b/doc/lightning-pay.7.md index 8301fbb60..d473b3bf9 100644 --- a/doc/lightning-pay.7.md +++ b/doc/lightning-pay.7.md @@ -94,6 +94,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters) - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **created_at** (number): the UNIX timestamp showing when this payment was initiated @@ -104,6 +105,7 @@ On success, an object is returned, containing: - **destination** (pubkey, optional): the final destination of the payment The following warnings may also be returned: + - **warning_partial_completion**: Not all parts of a multi-part payment have completed [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-ping.7.md b/doc/lightning-ping.7.md index d77129a4a..5e71d4948 100644 --- a/doc/lightning-ping.7.md +++ b/doc/lightning-ping.7.md @@ -37,6 +37,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **totlen** (u16): the answer length of the reply message (including header: 0 means no reply expected) [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-plugin.7.md b/doc/lightning-plugin.7.md index 82177d676..51bea0c22 100644 --- a/doc/lightning-plugin.7.md +++ b/doc/lightning-plugin.7.md @@ -50,15 +50,18 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **command** (string): the subcommand this is responding to (one of "start", "stop", "rescan", "startdir", "list") If **command** is "start", "startdir", "rescan" or "list": + - **plugins** (array of objects): - **name** (string): full pathname of the plugin - **active** (boolean): status; plugin completed init and is operational, plugins are configured asynchronously. - **dynamic** (boolean): plugin can be stopped or started without restarting lightningd If **command** is "stop": + - **result** (string): A message saying it successfully stopped [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-reserveinputs.7.md b/doc/lightning-reserveinputs.7.md index c8562d838..a76b0737a 100644 --- a/doc/lightning-reserveinputs.7.md +++ b/doc/lightning-reserveinputs.7.md @@ -26,6 +26,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **reservations** is returned. It is an array of objects, where each object contains: + - **txid** (txid): the transaction id - **vout** (u32): the output number which was reserved - **was_reserved** (boolean): whether the input was already reserved diff --git a/doc/lightning-sendcustommsg.7.md b/doc/lightning-sendcustommsg.7.md index 601e91e43..56a99c212 100644 --- a/doc/lightning-sendcustommsg.7.md +++ b/doc/lightning-sendcustommsg.7.md @@ -49,6 +49,7 @@ explicit error message stating the issue. [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **status** (string): Information about where message was queued [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-sendinvoice.7.md b/doc/lightning-sendinvoice.7.md index 8f3e262b1..ad6ae3b5a 100644 --- a/doc/lightning-sendinvoice.7.md +++ b/doc/lightning-sendinvoice.7.md @@ -40,6 +40,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **label** (string): unique label supplied at invoice creation - **description** (string): description used in the invoice - **payment_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters) @@ -49,6 +50,7 @@ On success, an object is returned, containing: - **bolt12** (string, optional): the BOLT12 string If **status** is "paid": + - **pay_index** (u64): Unique incrementing index for this payment - **amount_received_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay) - **paid_at** (u64): UNIX timestamp of when it was paid diff --git a/doc/lightning-sendonion.7.md b/doc/lightning-sendonion.7.md index 1e64d5335..fa7a72c3d 100644 --- a/doc/lightning-sendonion.7.md +++ b/doc/lightning-sendonion.7.md @@ -92,6 +92,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **id** (u64): unique ID for this payment attempt - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): status of the payment (could be complete if already sent previously) (one of "pending", "complete") @@ -105,9 +106,11 @@ On success, an object is returned, containing: - **partid** (u64, optional): the partid (if supplied) to sendonion/sendpay If **status** is "complete": + - **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters) If **status** is "pending": + - **message** (string, optional): Monitor status with listpays or waitsendpay [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-sendpay.7.md b/doc/lightning-sendpay.7.md index 57b4f24e4..62228cc1e 100644 --- a/doc/lightning-sendpay.7.md +++ b/doc/lightning-sendpay.7.md @@ -67,6 +67,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **id** (u64): unique ID for this payment attempt - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): status of the payment (could be complete if already sent previously) (one of "pending", "complete") @@ -81,9 +82,11 @@ On success, an object is returned, containing: - **bolt12** (string, optional): the bolt12 string (if supplied: **experimental-offers** only). If **status** is "complete": + - **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters) If **status** is "pending": + - **message** (string): Monitor status with listpays or waitsendpay [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-sendpsbt.7.md b/doc/lightning-sendpsbt.7.md index b6473480b..7c99b6524 100644 --- a/doc/lightning-sendpsbt.7.md +++ b/doc/lightning-sendpsbt.7.md @@ -32,6 +32,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **tx** (hex): The raw transaction which was sent - **txid** (txid): The txid of the **tx** diff --git a/doc/lightning-setchannel.7.md b/doc/lightning-setchannel.7.md index 76bfc0bfb..bc5951f44 100644 --- a/doc/lightning-setchannel.7.md +++ b/doc/lightning-setchannel.7.md @@ -67,6 +67,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **channels** is returned. It is an array of objects, where each object contains: + - **peer_id** (pubkey): The node_id of the peer - **channel_id** (hex): The channel_id of the channel (always 64 characters) - **fee_base_msat** (msat): The resulting feebase (this is the BOLT #7 name) diff --git a/doc/lightning-setchannelfee.7.md b/doc/lightning-setchannelfee.7.md index a9a23070b..7e649c98d 100644 --- a/doc/lightning-setchannelfee.7.md +++ b/doc/lightning-setchannelfee.7.md @@ -48,6 +48,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **base** (u32): The fee_base_msat value - **ppm** (u32): The fee_proportional_millionths value - **channels** (array of objects): channel(s) whose rate is now set: diff --git a/doc/lightning-signmessage.7.md b/doc/lightning-signmessage.7.md index 93608b1db..8ebb95910 100644 --- a/doc/lightning-signmessage.7.md +++ b/doc/lightning-signmessage.7.md @@ -20,6 +20,7 @@ RETURN VALUE ------------ [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **signature** (hex): The signature (always 128 characters) - **recid** (hex): The recovery id (0, 1, 2 or 3) (always 2 characters) - **zbase** (string): *signature* and *recid* encoded in a style compatible with **lnd**'s [SignMessageRequest](https://api.lightning.community/#grpc-request-signmessagerequest) diff --git a/doc/lightning-signpsbt.7.md b/doc/lightning-signpsbt.7.md index 6ebc481dd..46c6f71b3 100644 --- a/doc/lightning-signpsbt.7.md +++ b/doc/lightning-signpsbt.7.md @@ -40,6 +40,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **signed_psbt** (string): The fully signed PSBT [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-txdiscard.7.md b/doc/lightning-txdiscard.7.md index b0475e342..7757ecb10 100644 --- a/doc/lightning-txdiscard.7.md +++ b/doc/lightning-txdiscard.7.md @@ -17,6 +17,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **unsigned_tx** (hex): the unsigned transaction - **txid** (txid): the transaction id of *unsigned_tx* diff --git a/doc/lightning-txprepare.7.md b/doc/lightning-txprepare.7.md index c22437fd5..a1d159d47 100644 --- a/doc/lightning-txprepare.7.md +++ b/doc/lightning-txprepare.7.md @@ -54,6 +54,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **psbt** (string): the PSBT representing the unsigned transaction - **unsigned_tx** (hex): the unsigned transaction - **txid** (txid): the transaction id of *unsigned_tx*; you hand this to lightning-txsend(7) or lightning-txdiscard(7), as the inputs of this transaction are reserved. diff --git a/doc/lightning-txsend.7.md b/doc/lightning-txsend.7.md index 2d2673093..31e3a1c4f 100644 --- a/doc/lightning-txsend.7.md +++ b/doc/lightning-txsend.7.md @@ -17,6 +17,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **psbt** (string): the completed PSBT representing the signed transaction - **tx** (hex): the fully signed transaction - **txid** (txid): the transaction id of *tx* diff --git a/doc/lightning-unreserveinputs.7.md b/doc/lightning-unreserveinputs.7.md index 323f24f63..1a7750bef 100644 --- a/doc/lightning-unreserveinputs.7.md +++ b/doc/lightning-unreserveinputs.7.md @@ -23,12 +23,14 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object containing **reservations** is returned. It is an array of objects, where each object contains: + - **txid** (txid): the transaction id - **vout** (u32): the output number which was reserved - **was_reserved** (boolean): whether the input was already reserved (usually `true`) - **reserved** (boolean): whether the input is now reserved (may still be `true` if it was reserved for a long time) If **reserved** is *true*: + - **reserved_to_block** (u32): what blockheight the reservation will expire [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-utxopsbt.7.md b/doc/lightning-utxopsbt.7.md index 1bf65387c..129e0d537 100644 --- a/doc/lightning-utxopsbt.7.md +++ b/doc/lightning-utxopsbt.7.md @@ -45,6 +45,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **psbt** (string): Unsigned PSBT which fulfills the parameters given - **feerate_per_kw** (u32): The feerate used to create the PSBT, in satoshis-per-kiloweight - **estimated_final_weight** (u32): The estimated weight of the transaction once fully signed diff --git a/doc/lightning-waitanyinvoice.7.md b/doc/lightning-waitanyinvoice.7.md index a19b6850d..87c2888e8 100644 --- a/doc/lightning-waitanyinvoice.7.md +++ b/doc/lightning-waitanyinvoice.7.md @@ -35,6 +35,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **label** (string): unique label supplied at invoice creation - **description** (string): description used in the invoice - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) @@ -45,6 +46,7 @@ On success, an object is returned, containing: - **bolt12** (string, optional): the BOLT12 string (always present unless *bolt11* is) If **status** is "paid": + - **pay_index** (u64): Unique incrementing index for this payment - **amount_received_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay) - **paid_at** (u64): UNIX timestamp of when it was paid diff --git a/doc/lightning-waitblockheight.7.md b/doc/lightning-waitblockheight.7.md index b3405d2ba..254c65fb7 100644 --- a/doc/lightning-waitblockheight.7.md +++ b/doc/lightning-waitblockheight.7.md @@ -21,6 +21,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **blockheight** (u32): The current block height (>= *blockheight* parameter) [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-waitinvoice.7.md b/doc/lightning-waitinvoice.7.md index b3b645b3f..4a14473d4 100644 --- a/doc/lightning-waitinvoice.7.md +++ b/doc/lightning-waitinvoice.7.md @@ -17,6 +17,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **label** (string): unique label supplied at invoice creation - **description** (string): description used in the invoice - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) @@ -27,6 +28,7 @@ On success, an object is returned, containing: - **bolt12** (string, optional): the BOLT12 string (always present unless *bolt11* is) If **status** is "paid": + - **pay_index** (u64): Unique incrementing index for this payment - **amount_received_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay) - **paid_at** (u64): UNIX timestamp of when it was paid diff --git a/doc/lightning-waitsendpay.7.md b/doc/lightning-waitsendpay.7.md index 1801159b3..708e6068d 100644 --- a/doc/lightning-waitsendpay.7.md +++ b/doc/lightning-waitsendpay.7.md @@ -34,6 +34,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **id** (u64): unique ID for this payment attempt - **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters) - **status** (string): status of the payment (always "complete") @@ -48,6 +49,7 @@ On success, an object is returned, containing: - **bolt12** (string, optional): the bolt12 string (if supplied for pay: **experimental-offers** only). If **status** is "complete": + - **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters) [comment]: # (GENERATE-FROM-SCHEMA-END) diff --git a/doc/lightning-withdraw.7.md b/doc/lightning-withdraw.7.md index e71f95134..4d16430d6 100644 --- a/doc/lightning-withdraw.7.md +++ b/doc/lightning-withdraw.7.md @@ -42,6 +42,7 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: + - **tx** (hex): the fully signed bitcoin transaction - **txid** (txid): the transaction id of *tx* - **psbt** (string): the PSBT representing the unsigned transaction diff --git a/tools/fromschema.py b/tools/fromschema.py index a1291e897..ce818a3b1 100755 --- a/tools/fromschema.py +++ b/tools/fromschema.py @@ -195,7 +195,7 @@ def output_members(sub, indent=''): json_value(whichvalues[-1])) conditions.append(cond) - sentence = indent + "If " + ", and ".join(conditions) + ":\n" + sentence = indent + "If " + ", and ".join(conditions) + ":\n\n" if has_members(ifclause['then']): # Prefix with blank line. @@ -229,23 +229,23 @@ def generate_from_schema(schema): output('On success, an empty object is returned.\n') sub = schema elif len(toplevels) == 1 and props[toplevels[0]]['type'] == 'object': - output('On success, an object containing **{}** is returned. It is an object containing:\n'.format(toplevels[0])) + output('On success, an object containing **{}** is returned. It is an object containing:\n\n'.format(toplevels[0])) # Don't have a description field here, it's not used. assert 'description' not in toplevels[0] sub = props[toplevels[0]] elif len(toplevels) == 1 and props[toplevels[0]]['type'] == 'array': - output('On success, an object containing **{}** is returned. It is an array of objects, where each object contains:\n'.format(toplevels[0])) + output('On success, an object containing **{}** is returned. It is an array of objects, where each object contains:\n\n'.format(toplevels[0])) # Don't have a description field here, it's not used. assert 'description' not in toplevels[0] sub = props[toplevels[0]]['items'] else: - output('On success, an object is returned, containing:\n') + output('On success, an object is returned, containing:\n\n') sub = schema output_members(sub) if warnings: - outputs(['\n', 'The following warnings may also be returned:\n']) + outputs(['\n', 'The following warnings may also be returned:\n\n']) for w, desc in warnings: output("- **{}**: {}\n".format(w, desc))