From 4b9cb7eb760849e4166307c2658f28379f60edd0 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 30 Jan 2023 16:34:03 +1030 Subject: [PATCH] doc: remove unused offerout schema. We removed the command for v22.11. Also, we removed the `refund_for` offer parameter, so remove its description from the manpage. Signed-off-by: Rusty Russell --- contrib/msggen/msggen/utils/utils.py | 1 - doc/Makefile | 1 - doc/index.rst | 1 - doc/lightning-decode.7.md | 2 +- doc/lightning-disableoffer.7.md | 5 +- doc/lightning-listoffers.7.md | 2 +- doc/lightning-offer.7.md | 6 +- doc/lightning-offerout.7.md | 102 --------------------------- doc/schemas/offerout.schema.json | 54 -------------- 9 files changed, 5 insertions(+), 169 deletions(-) delete mode 100644 doc/lightning-offerout.7.md delete mode 100644 doc/schemas/offerout.schema.json diff --git a/contrib/msggen/msggen/utils/utils.py b/contrib/msggen/msggen/utils/utils.py index 883757b47..4ef75d26c 100644 --- a/contrib/msggen/msggen/utils/utils.py +++ b/contrib/msggen/msggen/utils/utils.py @@ -83,7 +83,6 @@ def load_jsonrpc_service(schema_dir: str): "ListPays", # "multifundchannel", # "multiwithdraw", - # "offerout", # "offer", # "openchannel_abort", # "openchannel_bump", diff --git a/doc/Makefile b/doc/Makefile index 75a8faa4d..780ff6b3b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -66,7 +66,6 @@ MANPAGES := doc/lightning-cli.1 \ doc/lightning-newaddr.7 \ doc/lightning-notifications.7 \ doc/lightning-offer.7 \ - doc/lightning-offerout.7 \ doc/lightning-openchannel_abort.7 \ doc/lightning-openchannel_bump.7 \ doc/lightning-openchannel_init.7 \ diff --git a/doc/index.rst b/doc/index.rst index 730180624..3a7907e19 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -95,7 +95,6 @@ Core Lightning Documentation lightning-newaddr lightning-notifications lightning-offer - lightning-offerout lightning-openchannel_abort lightning-openchannel_bump lightning-openchannel_init diff --git a/doc/lightning-decode.7.md b/doc/lightning-decode.7.md index 78a5578dd..c4a17f0a1 100644 --- a/doc/lightning-decode.7.md +++ b/doc/lightning-decode.7.md @@ -291,7 +291,7 @@ Rusty Russell <> is mainly responsible. SEE ALSO -------- -lightning-pay(7), lightning-offer(7), lightning-offerout(7), lightning-fetchinvoice(7), lightning-sendinvoice(7), lightning-commando-rune(7) +lightning-pay(7), lightning-offer(7), lightning-fetchinvoice(7), lightning-sendinvoice(7), lightning-commando-rune(7) [BOLT #11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) diff --git a/doc/lightning-disableoffer.7.md b/doc/lightning-disableoffer.7.md index 8776532fb..f9bb46085 100644 --- a/doc/lightning-disableoffer.7.md +++ b/doc/lightning-disableoffer.7.md @@ -11,8 +11,7 @@ DESCRIPTION ----------- The **disableoffer** RPC command disables an offer, so that no further -invoices will be given out (if made with lightning-offer(7)) or -invoices accepted (if made with lightning-offerout(7)). +invoices will be given out. We currently don't support deletion of offers, so offers are not forgotten entirely (there may be invoices which refer to this offer). @@ -68,7 +67,7 @@ Rusty Russell <> is mainly responsible. SEE ALSO -------- -lightning-offer(7), lightning-offerout(7), lightning-listoffers(7). +lightning-offer(7), lightning-listoffers(7). RESOURCES --------- diff --git a/doc/lightning-listoffers.7.md b/doc/lightning-listoffers.7.md index 1695a86ce..ad58ae4fa 100644 --- a/doc/lightning-listoffers.7.md +++ b/doc/lightning-listoffers.7.md @@ -74,7 +74,7 @@ Rusty Russell <> is mainly responsible. SEE ALSO -------- -lightning-offer(7), lightning-offerout(7), lightning-listoffers(7). +lightning-offer(7), lightning-listoffers(7). RESOURCES --------- diff --git a/doc/lightning-offer.7.md b/doc/lightning-offer.7.md index edddee664..d2b4ed5e0 100644 --- a/doc/lightning-offer.7.md +++ b/doc/lightning-offer.7.md @@ -84,10 +84,6 @@ periods. This is encoded in the offer. period which exists. eg. "12" means there are 13 periods, from 0 to 12 inclusive. This is encoded in the offer. -*refund\_for* is the payment\_preimage of a previous (paid) invoice. -This implies *send\_invoice* and *single\_use*. This is encoded in the -offer. - *single\_use* (default false) indicates that the offer is only valid once; we may issue multiple invoices, but as soon as one is paid all other invoices will be expired (i.e. only one person can pay this offer). @@ -128,7 +124,7 @@ Rusty Russell <> is mainly responsible. SEE ALSO -------- -lightning-offerout(7), lightning-listoffers(7), lightning-disableoffer(7). +lightning-listoffers(7), lightning-disableoffer(7). RESOURCES --------- diff --git a/doc/lightning-offerout.7.md b/doc/lightning-offerout.7.md deleted file mode 100644 index b74edba04..000000000 --- a/doc/lightning-offerout.7.md +++ /dev/null @@ -1,102 +0,0 @@ -lightning-offerout -- Command for offering payments -================================================= - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - - -**offerout** *amount* *description* [*issuer*] [*label*] [*absolute\_expiry*] [*refund\_for*] - -DESCRIPTION ------------ - -The **offerout** RPC command creates an offer, which is a request to -send an invoice for us to pay (technically, this is referred to as a -`send_invoice` offer to distinguish a normal lightningd-offer(7) -offer). It automatically enables the accepting and payment of -corresponding invoice message (we will only pay once, however!). - -Note that it creates two variants of the offer: a signed and an -unsigned one (which is smaller). Wallets should accept both: the -current specification allows either. - -The *amount* parameter can be the string "any", which creates an offer -that can be paid with any amount (e.g. a donation). Otherwise it can -be a positive value in millisatoshi precision; it can be a whole -number, or a whole number ending in *msat* or *sat*, or a number with -three decimal places ending in *sat*, or a number with 1 to 11 decimal -places ending in *btc*. - -The *description* is a short description of purpose of the offer, -e.g. *withdrawl from ATM*. This value is encoded into the resulting offer and is -viewable by anyone you expose this offer to. It must be UTF-8, and -cannot use *\\u* JSON escape codes. - -The *issuer* is another (optional) field exposed in the offer, and -reflects who is issuing this offer (i.e. you) if appropriate. - -The *label* field is an internal-use name for the offer, which can -be any UTF-8 string. - -The *absolute\_expiry* is optionally the time the offer is valid until, -in seconds since the first day of 1970 UTC. If not set, the offer -remains valid (though it can be deactivated by the issuer of course). -This is encoded in the offer. - -*refund\_for* is a previous (paid) invoice of ours. The -payment\_preimage of this is encoded in the offer, and redemption -requires that the invoice we receive contains a valid signature using -that previous `payer_key`. - -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*) -- **bolt12** (string): the bolt12 encoding of the offer -- **used** (boolean): True if an incoming invoice has been paid (always *false*) -- **created** (boolean): false if the offer already existed -- **label** (string, optional): the (optional) user-specified label - -[comment]: # (GENERATE-FROM-SCHEMA-END) - -On failure, an error is returned and no offer is created. If the -lightning process fails before responding, the caller should use -lightning-listoffers(7) to query whether this offer was created or -not. - -The following error codes may occur: -- -1: Catchall nonspecific error. -- 1000: Offer with this offer\_id already exists. - -NOTES ------ - -The specification allows quantity, recurrence and alternate currencies on -offers which contain `send_invoice`, but these are not implemented here. - -We could also allow multi-use offers, but usually you're only offering to -send money once. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-sendinvoice(7), lightning-offer(7), lightning-listoffers(7), lightning-disableoffer(7). - -RESOURCES ---------- - -Main web site: - -[comment]: # ( SHA256STAMP:e28527bc56d2b54a77b222376c9280a612f7337c908ee0edcfa56d4d0ca2ac6c) diff --git a/doc/schemas/offerout.schema.json b/doc/schemas/offerout.schema.json deleted file mode 100644 index e0874e094..000000000 --- a/doc/schemas/offerout.schema.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "required": [ - "offer_id", - "active", - "single_use", - "bolt12", - "used", - "created" - ], - "properties": { - "offer_id": { - "type": "hex", - "description": "the id of this offer (merkle hash of non-signature fields)", - "maxLength": 64, - "minLength": 64 - }, - "active": { - "type": "boolean", - "enum": [ - true - ], - "description": "whether this will pay a matching incoming invoice" - }, - "single_use": { - "type": "boolean", - "enum": [ - true - ], - "description": "whether this expires as soon as it's paid out" - }, - "bolt12": { - "type": "string", - "description": "the bolt12 encoding of the offer" - }, - "used": { - "type": "boolean", - "enum": [ - false - ], - "description": "True if an incoming invoice has been paid" - }, - "created": { - "type": "boolean", - "description": "false if the offer already existed" - }, - "label": { - "type": "string", - "description": "the (optional) user-specified label" - } - } -}