doc: generate correct markdown from schemas.

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 <ZmnSCPxj@protonmail.com> is mainly responsible.
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-09-06 07:03:09 +09:30 committed by neil saitug
parent 3c3f4731bd
commit 8f1164365e
77 changed files with 141 additions and 5 deletions

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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")

View file

@ -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)

View file

@ -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

View file

@ -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*

View file

@ -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*

View file

@ -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

View file

@ -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

View file

@ -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")

View file

@ -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

View file

@ -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)

View file

@ -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.

View file

@ -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

View file

@ -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)

View file

@ -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*)

View file

@ -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)

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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.

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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):

View file

@ -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**

View file

@ -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

View file

@ -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)

View file

@ -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*)

View file

@ -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

View file

@ -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*)

View file

@ -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*)

View file

@ -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**

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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**

View file

@ -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)

View file

@ -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:

View file

@ -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)

View file

@ -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)

View file

@ -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*

View file

@ -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.

View file

@ -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*

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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))