diff --git a/.gitignore b/.gitignore index 5f7cbef5a053..43c98466b366 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,7 @@ tests/plugins/test_selfdisable_after_getmanifest # Ignore generated files devtools/features doc/schemas/lightning-sql.json +doc/lightning-*.7.md doc/lightning*.[1578] doc/reckless*.[1578] *_sqlgen.[ch] diff --git a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py index 56fef2ed5e48..7b8e7f80c733 100644 --- a/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py +++ b/contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py @@ -20,7 +20,6 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'node_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _globals['_GETINFOREQUEST']._serialized_start=37 _globals['_GETINFOREQUEST']._serialized_end=53 diff --git a/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py b/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py index 72544a2af6ac..c0ce0d478484 100644 --- a/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py +++ b/contrib/pyln-grpc-proto/pyln/grpc/primitives_pb2.py @@ -19,7 +19,6 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'primitives_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _globals['_CHANNELSIDE']._serialized_start=718 _globals['_CHANNELSIDE']._serialized_end=754 diff --git a/doc/lightning-addgossip.7.md b/doc/lightning-addgossip.7.md deleted file mode 100644 index 45652a4b5680..000000000000 --- a/doc/lightning-addgossip.7.md +++ /dev/null @@ -1,66 +0,0 @@ -lightning-addgossip -- Command for injecting a gossip message (low-level) -========================================================================= - -SYNOPSIS --------- - -**addgossip** *message* - -DESCRIPTION ------------ - -The **addgossip** RPC command injects a hex-encoded gossip message into the gossip daemon. It may return an error if it is malformed, or may update its internal state using the gossip message. - -Note that currently some paths will still silently reject the gossip: it is best effort. - -This is particularly used by plugins which may receive channel\_update messages within error replies. - -- **message** (hex): The raw, hex-encoded, gossip message to add to the local gossip view. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:addgossip#1", - "method": "addgossip", - "params": { - "message": "010078c3314666731e339c0b8434f7824797a084ed7ca3655991a672da068e2c44cb53b57b53a296c133bc879109a8931dc31e6913a4bda3d58559b99b95663e6d52775579447ef5526300e1bb89bc6af8557aa1c3810a91814eafad6d103f43182e17b16644cb38c1d58a8edd094303959a9f1f9d42ff6c32a21f9c118531f512c8679cabaccc6e39dbd95a4dac90e75a258893c3aa3f733d1b8890174d5ddea8003cadffe557773c54d2c07ca1d535c4bf85885f879ae466c16a516e8ffcfec1740e3f5c98ca9ce13f452e867befef5517f306ed6aa5119b79059bcc6f68f329986b665d16de7bc7df64e3537504c91eeabe0e59d3a2b68e4216ead2b0f6e3ef7c000006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f0000670000010000022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d590266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c0351802e3bd38009866c9da8ec4aa99cc4ea9c6c0dd46df15c61ef0ce1f271291714e5702324266de8403b3ab157a09f1f784d587af61831c998c151bcc21bb74c2b2314b" - } -} -{ - "id": "example:addgossip#2", - "method": "addgossip", - "params": { - "message": "0102420526c8eb62ec6999bbee5f1de4841cab734374ec642b7deeb0259e76220bf82e97a241c907d5ff52019655f7f9a614c285bb35690f3a1a2b928d7b2349a79e06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f000067000001000065b32a0e010100060000000000000000000000010000000a000000003b023380" - } -} -``` - -RETURN VALUE ------------- - -On success, an empty object is returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -{} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-pay(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-addpsbtoutput.7.md b/doc/lightning-addpsbtoutput.7.md deleted file mode 100644 index ee5c9bfd6c5e..000000000000 --- a/doc/lightning-addpsbtoutput.7.md +++ /dev/null @@ -1,111 +0,0 @@ -lightning-addpsbtoutput -- Command to populate PSBT outputs from the wallet -=========================================================================== - -SYNOPSIS --------- - -**addpsbtoutput** *satoshi* [*initialpsbt*] [*locktime*] [*destination*] - -DESCRIPTION ------------ - -Command *added* in v23.11. - -`addpsbtoutput` is a low-level RPC command which creates or modifies a PSBT by adding a single output of amount *satoshi*. - -This is used to receive funds into the on-chain wallet interactively using PSBTs. - -- **satoshi** (sat): The satoshi value of the output. It can be a whole number, a whole number ending in *sat*, or a number with 1 to 8 decimal places ending in *btc*. -- **initialpsbt** (string, optional): Base 64 encoded PSBT to add the output to. If not specified, one will be generated automatically. -- **locktime** (u32, optional): If not set, it is set to a recent block height (if no initial psbt is specified). -- **destination** (string, optional): If it is not set, an internal address is generated. - -EXAMPLE USAGE -------------- - -Here is a command to make a PSBT with a 100,000 sat output that leads to the on-chain wallet. - -```shell -lightning-cli addpsbtoutput 100000sat -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:addpsbtoutput#1", - "method": "addpsbtoutput", - "params": { - "satoshi": 100000, - "initialpsbt": null, - "locktime": null, - "destination": null - } -} -{ - "id": "example:addpsbtoutput#2", - "method": "addpsbtoutput", - "params": { - "satoshi": 1000000, - "initialpsbt": null, - "locktime": 111, - "destination": null - } -} -{ - "id": "example:addpsbtoutput#3", - "method": "addpsbtoutput", - "params": { - "satoshi": 974343, - "initialpsbt": "cHNidP8BAF4CAAAAAfwbEpvpi6D14YV4VLnuVB47Y0uF41kXEyJRL4IusySSAQAAAAD9////ASICAAAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL5nAAAAAAEA9gIAAAAAAQFEkxvLatohY6mw5gr5qG1aiArSrziFPR2YoqD21Hv+RAAAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNrz8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIEu1nfVRt9i+rFM219mwhMqdwJsqygWSWTFUS+cemdh6AiBG3Qo8g9J/aAMO2RHDsIBScscj6pTTIwZp7Gw8G3EOKAEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPZgAAAAEBK68/DwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oAAA==", - "locktime": null, - "destination": "bcrt1q9tc6q49l6wrrtp8ul45rj92hsleehwwxty32zu" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **psbt** (string): Unsigned PSBT which fulfills the parameters given. -- **estimated\_added\_weight** (u32): The estimated weight of the added output. -- **outnum** (u32): The 0-based number where the output was placed. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIoIYBAAAAAAABBCJRIHg2NV/cioLcTLAKdyxVVBUdBjhKTdZejT9orAhWa4S+AA==", - "estimated_added_weight": 172, - "outnum": 0 -} -{ - "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4uAA==", - "estimated_added_weight": 172, - "outnum": 0 -} -{ - "psbt": "cHNidP8BAH0CAAAAAfwbEpvpi6D14YV4VLnuVB47Y0uF41kXEyJRL4IusySSAQAAAAD9////AiICAAAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4H3g4AAAAAABYAFCrxoFS/04Y1hPz9aDkVV4fzm7nGZwAAAAABAPYCAAAAAAEBRJMby2raIWOpsOYK+ahtWogK0q84hT0dmKKg9tR7/kQAAAAAAP3///8CQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAza8/DwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oCRzBEAiBLtZ31UbfYvqxTNtfZsITKncCbKsoFklkxVEvnHpnYegIgRt0KPIPSf2gDDtkRw7CAUnLHI+qU0yMGaexsPBtxDigBIQPXRURck2JmXyLg2W6edm8nPzJg3qOcina/oF3SaE3cz2YAAAABASuvPw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAAAA", - "estimated_added_weight": 172, - "outnum": 1 -} -``` - -AUTHOR ------- - -Dusty <<@dusty\_daemon>> is mainly responsible. - -SEE ALSO --------- - -lightning-fundpsbt(7), lightning-utxopsbt(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-autoclean-once.7.md b/doc/lightning-autoclean-once.7.md deleted file mode 100644 index e363f9cd3a08..000000000000 --- a/doc/lightning-autoclean-once.7.md +++ /dev/null @@ -1,104 +0,0 @@ -lightning-autoclean-once -- A single deletion of old invoices/payments/forwards -=============================================================================== - -SYNOPSIS --------- - -**autoclean-once** *subsystem* *age* - -DESCRIPTION ------------ - -The **autoclean-once** RPC command tell the `autoclean` plugin to do a single sweep to delete old entries. This is a manual alternative (or addition) to the various `autoclean-...-age` parameters which cause autoclean to run once per hour: see lightningd-config(5). - -- **subsystem** (string) (one of "succeededforwards", "failedforwards", "succeededpays", "failedpays", "paidinvoices", "expiredinvoices"): What subsystem to clean. Currently supported subsystems are: - * `failedforwards`: routed payments which did not succeed (`failed` or `local_failed` in listforwards `status`). - * `succeededforwards`: routed payments which succeeded (`settled` in listforwards `status`). - * `failedpays`: payment attempts which did not succeed (`failed` in listpays `status`). - * `succeededpays`: payment attempts which succeeded (`complete` in listpays `status`). - * `expiredinvoices`: invoices which were not paid (and cannot be) (`expired` in listinvoices `status`). - * `paidinvoices`: invoices which were paid (`paid` in listinvoices status). -- **age** (u64): Non-zero number in seconds. How many seconds old an entry must be to delete it. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:autoclean-once#1", - "method": "autoclean-once", - "params": [ - "failedpays", - 1 - ] -} -{ - "id": "example:autoclean-once#2", - "method": "autoclean-once", - "params": [ - "succeededpays", - 1 - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **autoclean** is returned. It is an object containing: - -- **succeededforwards** (object, optional): - - **cleaned** (u64): Total number of deletions done this run. - - **uncleaned** (u64): The total number of entries *not* deleted this run. -- **failedforwards** (object, optional): - - **cleaned** (u64): Total number of deletions done this run. - - **uncleaned** (u64): The total number of entries *not* deleted this run. -- **succeededpays** (object, optional): - - **cleaned** (u64): Total number of deletions done this run. - - **uncleaned** (u64): The total number of entries *not* deleted this run. -- **failedpays** (object, optional): - - **cleaned** (u64): Total number of deletions done this run. - - **uncleaned** (u64): The total number of entries *not* deleted this run. -- **paidinvoices** (object, optional): - - **cleaned** (u64): Total number of deletions done this run. - - **uncleaned** (u64): The total number of entries *not* deleted this run. -- **expiredinvoices** (object, optional): - - **cleaned** (u64): Total number of deletions done this run. - - **uncleaned** (u64): The total number of entries *not* deleted this run. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "autoclean": { - "failedpays": { - "cleaned": 1, - "uncleaned": 1 - } - } -} -{ - "autoclean": { - "succeededpays": { - "cleaned": 1, - "uncleaned": 0 - } - } -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightningd-config(5), lightning-autoclean-status(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-autoclean-status.7.md b/doc/lightning-autoclean-status.7.md deleted file mode 100644 index eef6806af018..000000000000 --- a/doc/lightning-autoclean-status.7.md +++ /dev/null @@ -1,141 +0,0 @@ -lightning-autoclean-status -- Examine auto-delete of old invoices/payments/forwards -=================================================================================== - -SYNOPSIS --------- - -**autoclean-status** [*subsystem*] - -DESCRIPTION ------------ - -The **autoclean-status** RPC command tells you about the status of the autclean plugin, optionally for only one subsystem. - -- **subsystem** (string, optional) (one of "succeededforwards", "failedforwards", "succeededpays", "failedpays", "paidinvoices", "expiredinvoices"): What subsystem to ask about. Currently supported subsystems are: - * `failedforwards`: routed payments which did not succeed (`failed` or `local_failed` in listforwards `status`). - * `succeededforwards`: routed payments which succeeded (`settled` in listforwards `status`). - * `failedpays`: payment attempts which did not succeed (`failed` in listpays `status`). - * `succeededpays`: payment attempts which succeeded (`complete` in listpays `status`). - * `expiredinvoices`: invoices which were not paid (and cannot be) (`expired` in listinvoices `status`). - * `paidinvoices`: invoices which were paid (`paid` in listinvoices status). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:autoclean-status#1", - "method": "autoclean-status", - "params": { - "subsystem": "expiredinvoices" - } -} -{ - "id": "example:autoclean-status#2", - "method": "autoclean-status", - "params": { - "subsystem": null - } -} -``` - -RETURN VALUE ------------- - -Note that the ages parameters are set by various `autoclean-...-age` parameters in your configuration: see lightningd-config(5). -On success, an object containing **autoclean** is returned. It is an object containing: - -- **succeededforwards** (object, optional): - - **enabled** (boolean): Whether autocleaning is enabled for successful listforwards. - - **cleaned** (u64): Total number of deletions done (ever). - - If **enabled** is *true*: - - **age** (u64): Age (in seconds) to delete successful listforwards. -- **failedforwards** (object, optional): - - **enabled** (boolean): Whether autocleaning is enabled for failed listforwards. - - **cleaned** (u64): Total number of deletions done (ever). - - If **enabled** is *true*: - - **age** (u64): Age (in seconds) to delete failed listforwards. -- **succeededpays** (object, optional): - - **enabled** (boolean): Whether autocleaning is enabled for successful listpays/listsendpays. - - **cleaned** (u64): Total number of deletions done (ever). - - If **enabled** is *true*: - - **age** (u64): Age (in seconds) to delete successful listpays/listsendpays. -- **failedpays** (object, optional): - - **enabled** (boolean): Whether autocleaning is enabled for failed listpays/listsendpays. - - **cleaned** (u64): Total number of deletions done (ever). - - If **enabled** is *true*: - - **age** (u64): Age (in seconds) to delete failed listpays/listsendpays. -- **paidinvoices** (object, optional): - - **enabled** (boolean): Whether autocleaning is enabled for paid listinvoices. - - **cleaned** (u64): Total number of deletions done (ever). - - If **enabled** is *true*: - - **age** (u64): Age (in seconds) to paid listinvoices. -- **expiredinvoices** (object, optional): - - **enabled** (boolean): Whether autocleaning is enabled for expired (unpaid) listinvoices. - - **cleaned** (u64): Total number of deletions done (ever). - - If **enabled** is *true*: - - **age** (u64): Age (in seconds) to expired listinvoices. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "autoclean": { - "expiredinvoices": { - "enabled": false, - "cleaned": 0 - } - } -} -{ - "autoclean": { - "succeededforwards": { - "enabled": false, - "cleaned": 0 - }, - "failedforwards": { - "enabled": false, - "cleaned": 0 - }, - "succeededpays": { - "enabled": false, - "cleaned": 0 - }, - "failedpays": { - "enabled": false, - "cleaned": 0 - }, - "paidinvoices": { - "enabled": false, - "cleaned": 0 - }, - "expiredinvoices": { - "enabled": true, - "age": 2, - "cleaned": 0 - } - } -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightningd-config(5), lightning-listinvoices(7), lightning-listpays(7), lightning-listforwards(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-batching.7.md b/doc/lightning-batching.7.md deleted file mode 100644 index e4f39b126593..000000000000 --- a/doc/lightning-batching.7.md +++ /dev/null @@ -1,56 +0,0 @@ -lightning-batching -- Command to allow database batching. -========================================================= - -SYNOPSIS --------- - -**batching** *enable* - -DESCRIPTION ------------ - -The **batching** RPC command allows (but does not guarantee!) database commitments to be deferred when multiple commands are issued on this RPC connection. This is only useful if many commands are being given at once, in which case it can offer a performance improvement (the cost being that if there is a crash, it's unclear how many of the commands will have been persisted). - -- **enable** (boolean): Whether to enable or disable transaction batching. The default is False. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:batching#1", - "method": "batching", - "params": { - "enable": true - } -} -``` - -RETURN VALUE ------------- - -On success, an empty object is returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters. - -AUTHOR ------- - -Rusty Russell <> wrote the initial version of this man page. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-bkpr-channelsapy.7.md b/doc/lightning-bkpr-channelsapy.7.md deleted file mode 100644 index b27e00a477ab..000000000000 --- a/doc/lightning-bkpr-channelsapy.7.md +++ /dev/null @@ -1,121 +0,0 @@ -lightning-bkpr-channelsapy -- Command to list stats on channel earnings -======================================================================= - -SYNOPSIS --------- - -**bkpr-channelsapy** [*start\_time*] [*end\_time*] - -DESCRIPTION ------------ - -The **bkpr-channelsapy** RPC command lists stats on routing income, leasing income, and various calculated APYs for channel routed funds. - -- **start\_time** (u64, optional): UNIX timestamp (in seconds) to filter events after the provided timestamp. The default is zero. -- **end\_time** (u64, optional): UNIX timestamp (in seconds) to filter events up to and at the provided timestamp. The default is max-int. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:bkpr-channelsapy#1", - "method": "bkpr-channelsapy", - "params": "{}" -} -``` - -RETURN VALUE ------------- - -On success, an object containing **channels\_apy** is returned. It is an array of objects, where each object contains: - -- **account** (string): The account name. If the account is a channel, the channel\_id. The 'net' entry is the rollup of all channel accounts. -- **routed\_out\_msat** (msat): Sats routed (outbound). -- **routed\_in\_msat** (msat): Sats routed (inbound). -- **lease\_fee\_paid\_msat** (msat): Sats paid for leasing inbound (liquidity ads). -- **lease\_fee\_earned\_msat** (msat): Sats earned for leasing outbound (liquidity ads). -- **pushed\_out\_msat** (msat): Sats pushed to peer at open. -- **pushed\_in\_msat** (msat): Sats pushed in from peer at open. -- **our\_start\_balance\_msat** (msat): Starting balance in channel at funding. Note that if our start balance is zero, any \_initial field will be omitted (can't divide by zero). -- **channel\_start\_balance\_msat** (msat): Total starting balance at funding. -- **fees\_out\_msat** (msat): Fees earned on routed outbound. -- **utilization\_out** (string): Sats routed outbound / total start balance. -- **utilization\_in** (string): Sats routed inbound / total start balance. -- **apy\_out** (string): Fees earned on outbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY). -- **apy\_in** (string): Fees earned on inbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY). -- **apy\_total** (string): Total fees earned on routed payments / total start balance for the length of time this channel has been open amortized to a year (APY). -- **fees\_in\_msat** (msat, optional): Fees earned on routed inbound. -- **utilization\_out\_initial** (string, optional): Sats routed outbound / our start balance. -- **utilization\_in\_initial** (string, optional): Sats routed inbound / our start balance. -- **apy\_out\_initial** (string, optional): Fees earned on outbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY). -- **apy\_in\_initial** (string, optional): Fees earned on inbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY). -- **apy\_total\_initial** (string, optional): Total fees earned on routed payments / our start balance for the length of time this channel has been open amortized to a year (APY). -- **apy\_lease** (string, optional): Lease fees earned over total amount leased for the lease term, amortized to a year (APY). Only appears if channel was leased out by us. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channels_apy": [ - { - "account": "e41b2ec83e9139a9fd8f1d89b01e5d7df73099494e6b91504c39445e37485b0d", - "routed_out_msat": 1431440, - "routed_in_msat": 0, - "lease_fee_paid_msat": 0, - "lease_fee_earned_msat": 0, - "pushed_out_msat": 0, - "pushed_in_msat": 0, - "our_start_balance_msat": 1000000000, - "channel_start_balance_msat": 1000000000, - "fees_out_msat": 0, - "fees_in_msat": 0, - "utilization_out": "0.1431%", - "utilization_out_initial": "0.1431%", - "utilization_in": "0.0000%", - "apy_out": "0.0000%", - "apy_out_initial": "0.0000%", - "apy_in": "0.0000%", - "apy_total": "0.0000%", - "apy_total_initial": "0.0000%" - }, - { - "account": "net", - "routed_out_msat": 1431440, - "routed_in_msat": 0, - "lease_fee_paid_msat": 0, - "lease_fee_earned_msat": 0, - "pushed_out_msat": 0, - "pushed_in_msat": 0, - "our_start_balance_msat": 1000000000, - "channel_start_balance_msat": 1000000000, - "fees_out_msat": 0, - "fees_in_msat": 0, - "utilization_out": "0.1431%", - "utilization_out_initial": "0.1431%", - "utilization_in": "0.0000%", - "apy_out": "0.0000%", - "apy_out_initial": "0.0000%", - "apy_in": "0.0000%", - "apy_total": "0.0000%", - "apy_total_initial": "0.0000%" - } - ] -} -``` - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-bkpr-listincome(7), lightning-bkpr-listfunds(7), lightning-bkpr-listaccountevents(7), lightning-bkpr-dumpincomecsv(7), lightning-listpeers(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-bkpr-dumpincomecsv.7.md b/doc/lightning-bkpr-dumpincomecsv.7.md deleted file mode 100644 index ca3237641115..000000000000 --- a/doc/lightning-bkpr-dumpincomecsv.7.md +++ /dev/null @@ -1,65 +0,0 @@ -lightning-bkpr-dumpincomecsv -- Command to emit a CSV of income events -====================================================================== - -SYNOPSIS --------- - -**bkpr-dumpincomecsv** *csv\_format* [*csv\_file*] [*consolidate\_fees*] [*start\_time*] [*end\_time*] - -DESCRIPTION ------------ - -The **bkpr-dumpincomcsv** RPC command writes a CSV file to disk at *csv\_file* location. This is a formatted output of the **listincome** RPC command. - -- **csv\_format** (string): CSV format to use. See RETURN VALUE for options. -- **csv\_file** (string, optional): On-disk destination of the generated CSV file. -- **consolidate\_fees** (boolean, optional): If true, we emit a single, consolidated event for any onchain-fees for a txid and account. Otherwise, events for every update to the onchain fee calculation for this account and txid will be printed. Note that this means that the events emitted are non-stable, i.e. calling **dumpincomecsv** twice may result in different onchain fee events being emitted, depending on how much information we've logged for that transaction. The default is True. -- **start\_time** (u64, optional): UNIX timestamp (in seconds) that filters events after the provided timestamp. The default is zero. -- **end\_time** (u64, optional): UNIX timestamp (in seconds) that filters events up to and at the provided timestamp. The default is max-int. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:bkpr-dumpincomecsv#1", - "method": "bkpr-dumpincomecsv", - "params": [ - "koinly", - "koinly.csv" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **csv\_file** (string): File that the csv was generated to. -- **csv\_format** (string) (one of "cointracker", "koinly", "harmony", "quickbooks"): Format to print csv as. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "csv_file": "koinly.csv", - "csv_format": "koinly" -} -``` - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-bkpr-listincome(7), lightning-bkpr-listfunds(7), lightning-bkpr-listaccountevents(7), lightning-bkpr-channelsapy(7), lightning-listpeers(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-bkpr-inspect.7.md b/doc/lightning-bkpr-inspect.7.md deleted file mode 100644 index 8d12829c0b56..000000000000 --- a/doc/lightning-bkpr-inspect.7.md +++ /dev/null @@ -1,87 +0,0 @@ -lightning-bkpr-inspect -- Command to show onchain footprint of a channel -======================================================================== - -SYNOPSIS --------- - -**bkpr-inspect** *account* - -DESCRIPTION ------------ - -The **bkpr-inspect** RPC command lists all known on-chain transactions and associated events for the provided account. Useful for inspecting unilateral closes for a given channel account. Only valid for channel accounts. - -- **account** (string): Channel account to inspect. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:bkpr-inspect#1", - "method": "bkpr-inspect", - "params": [ - "f30a7bab1ec077622d8fe877634bc6dd38bb08122ad49606199c565e0383b2ab" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **txs** is returned. It is an array of objects, where each object contains: - -- **txid** (txid): Transaction id. -- **fees\_paid\_msat** (msat): Amount paid in sats for this tx. -- **outputs** (array of objects): - - **account** (string): Account this output affected. - - **outnum** (u32): Index of output. - - **output\_value\_msat** (msat): Value of the output. - - **currency** (string): Human-readable bech32 part for this coin type. - - **credit\_msat** (msat, optional): Amount credited to account. - - **debit\_msat** (msat, optional): Amount debited from account. - - **originating\_account** (string, optional): Account this output originated from. - - **output\_tag** (string, optional): Description of output creation event. - - **spend\_tag** (string, optional): Description of output spend event. - - **spending\_txid** (txid, optional): Transaction this output was spent in. - - **payment\_id** (hex, optional): Lightning payment identifier. For an htlc, this will be the preimage. -- **blockheight** (u32, optional): Blockheight of transaction. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "txs": [ - { - "txid": "abb283035e569c190696d42a1208bb38ddc64b6377e88f2d6277c01eab7b0af3", - "fees_paid_msat": 0, - "outputs": [ - { - "account": "f30a7bab1ec077622d8fe877634bc6dd38bb08122ad49606199c565e0383b2ab", - "outnum": 0, - "output_tag": "channel_proposed", - "output_value_msat": 996363000, - "credit_msat": 996363000, - "currency": "bcrt" - } - ] - } - ] -} -``` - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-listbalances(7), lightning-listfunds(7), lightning-listpeers(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-bkpr-listaccountevents.7.md b/doc/lightning-bkpr-listaccountevents.7.md deleted file mode 100644 index 6b2218c4dc05..000000000000 --- a/doc/lightning-bkpr-listaccountevents.7.md +++ /dev/null @@ -1,294 +0,0 @@ -lightning-bkpr-listaccountevents -- Command for listing recorded bookkeeping events -=================================================================================== - -SYNOPSIS --------- - -**bkpr-listaccountevents** [*account*] - -DESCRIPTION ------------ - -The **bkpr-listaccountevents** RPC command is a list of all bookkeeping events that have been recorded for this node. - -If the optional parameter **account** is set, we only emit events for the specified account, if exists. - -Note that the type **onchain\_fees** that are emitted are of opposite credit/debit than as they appear in **listincome**, as **listincome** shows all events from the perspective of the node, whereas **listaccountevents** just dumps the event data as we've got it. Onchain fees are updated/recorded as we get more information about input and output spends -- the total onchain fees that were recorded for a transaction for an account can be found by summing all onchain fee events and taking the difference between the **credit\_msat** and **debit\_msat** for these events. We do this so that successive calls to **listaccountevents** always produce the same list of events -- no previously emitted event will be subsequently updated, rather we add a new event to the list. - -- **account** (string, optional): Receive events for the specified account. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:bkpr-listaccountevents#1", - "method": "bkpr-listaccountevents", - "params": "{}" -} -{ - "id": "example:bkpr-listaccountevents#2", - "method": "bkpr-listaccountevents", - "params": [ - "f30a7bab1ec077622d8fe877634bc6dd38bb08122ad49606199c565e0383b2ab" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **events** is returned. It is an array of objects, where each object contains: - -- **account** (string): The account name. If the account is a channel, the channel\_id. -- **type** (string) (one of "onchain\_fee", "chain", "channel"): Coin movement type. -- **tag** (string): Description of movement. -- **credit\_msat** (msat): Amount credited. -- **debit\_msat** (msat): Amount debited. -- **currency** (string): Human-readable bech32 part for this coin type. -- **timestamp** (u32): Timestamp this event was recorded by the node. For consolidated events such as onchain\_fees, the most recent timestamp. - -If **type** is "chain": - - **outpoint** (string): The txid:outnum for this event. - - **blockheight** (u32): For chain events, blockheight this occured at. - - **origin** (string, optional): The account this movement originated from. - - **payment\_id** (hex, optional): Lightning payment identifier. For an htlc, this will be the preimage. - - **txid** (txid, optional): The txid of the transaction that created this event. - - **description** (string, optional): The description of this event. - -If **type** is "onchain\_fee": - - **txid** (txid): The txid of the transaction that created this event. - -If **type** is "channel": - - **fees\_msat** (msat, optional): Amount paid in fees. - - **is\_rebalance** (boolean, optional): Is this payment part of a rebalance. - - **payment\_id** (hex, optional): Lightning payment identifier. For an htlc, this will be the preimage. - - **part\_id** (u32, optional): Counter for multi-part payments. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "events": [ - { - "account": "wallet", - "type": "channel", - "tag": "journal_entry", - "credit_msat": 0, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1706152911, - "is_rebalance": false - }, - { - "account": "wallet", - "type": "chain", - "tag": "deposit", - "credit_msat": 2000000000, - "debit_msat": 0, - "currency": "bcrt", - "outpoint": "7e202b3b1016e8eb6f4e936215ed6b5bdc63c17e6ebb5e6bce2f98e6757ba44c:0", - "timestamp": 1706152914, - "blockheight": 102 - }, - { - "account": "wallet", - "type": "chain", - "tag": "withdrawal", - "credit_msat": 0, - "debit_msat": 2000000000, - "currency": "bcrt", - "outpoint": "7e202b3b1016e8eb6f4e936215ed6b5bdc63c17e6ebb5e6bce2f98e6757ba44c:0", - "txid": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b", - "timestamp": 1706152921, - "blockheight": 103 - }, - { - "account": "wallet", - "type": "chain", - "tag": "deposit", - "credit_msat": 995073000, - "debit_msat": 0, - "currency": "bcrt", - "outpoint": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b:1", - "timestamp": 1706152921, - "blockheight": 103 - }, - { - "account": "wallet", - "type": "onchain_fee", - "tag": "onchain_fee", - "credit_msat": 1004927000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1706152921, - "txid": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b" - }, - { - "account": "wallet", - "type": "onchain_fee", - "tag": "onchain_fee", - "credit_msat": 0, - "debit_msat": 1004927000, - "currency": "bcrt", - "timestamp": 1706152921, - "txid": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b" - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "chain", - "tag": "channel_open", - "credit_msat": 1000000000, - "debit_msat": 0, - "currency": "bcrt", - "outpoint": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b:0", - "timestamp": 1706152922, - "blockheight": 103 - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "onchain_fee", - "tag": "onchain_fee", - "credit_msat": 4927000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1706152922, - "txid": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b" - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "channel", - "tag": "invoice", - "credit_msat": 0, - "debit_msat": 11000000, - "currency": "bcrt", - "payment_id": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "part_id": 0, - "timestamp": 1706152934, - "description": [ - "XEoCR94SIz6UIRUEkxum." - ], - "is_rebalance": false - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "chain", - "tag": "channel_close", - "credit_msat": 0, - "debit_msat": 989000000, - "currency": "bcrt", - "outpoint": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b:0", - "txid": "7178638c13a0573f440d9516a23901874b6138338d378b3291cb306c90b3f998", - "timestamp": 1706152938, - "blockheight": 104 - }, - { - "account": "external", - "origin": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "chain", - "tag": "to_them", - "credit_msat": 10899000, - "debit_msat": 0, - "currency": "bcrt", - "outpoint": "7178638c13a0573f440d9516a23901874b6138338d378b3291cb306c90b3f998:0", - "timestamp": 1706152938, - "blockheight": 104 - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "onchain_fee", - "tag": "onchain_fee", - "credit_msat": 7967000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1706152938, - "txid": "7178638c13a0573f440d9516a23901874b6138338d378b3291cb306c90b3f998" - }, - { - "account": "wallet", - "type": "chain", - "tag": "deposit", - "credit_msat": 980912000, - "debit_msat": 0, - "currency": "bcrt", - "outpoint": "85477738281c1afd652c350025f1d28658fe541c83adc9a7d5276c30cf715a11:0", - "timestamp": 1706152941, - "blockheight": 109 - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "chain", - "tag": "delayed_to_us", - "credit_msat": 981033000, - "debit_msat": 0, - "currency": "bcrt", - "outpoint": "7178638c13a0573f440d9516a23901874b6138338d378b3291cb306c90b3f998:1", - "timestamp": 1706152941, - "blockheight": 104 - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "chain", - "tag": "to_wallet", - "credit_msat": 0, - "debit_msat": 981033000, - "currency": "bcrt", - "outpoint": "7178638c13a0573f440d9516a23901874b6138338d378b3291cb306c90b3f998:1", - "txid": "85477738281c1afd652c350025f1d28658fe541c83adc9a7d5276c30cf715a11", - "timestamp": 1706152941, - "blockheight": 109 - }, - { - "account": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "type": "onchain_fee", - "tag": "onchain_fee", - "credit_msat": 121000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1706152941, - "txid": "85477738281c1afd652c350025f1d28658fe541c83adc9a7d5276c30cf715a11" - } - ] -} -{ - "events": [ - { - "account": "f30a7bab1ec077622d8fe877634bc6dd38bb08122ad49606199c565e0383b2ab", - "type": "chain", - "tag": "channel_proposed", - "credit_msat": 996363000, - "debit_msat": 0, - "currency": "bcrt", - "outpoint": "abb283035e569c190696d42a1208bb38ddc64b6377e88f2d6277c01eab7b0af3:0", - "timestamp": 1706246949, - "blockheight": 0 - }, - { - "account": "f30a7bab1ec077622d8fe877634bc6dd38bb08122ad49606199c565e0383b2ab", - "type": "channel", - "tag": "pushed", - "credit_msat": 0, - "debit_msat": 20000000, - "currency": "bcrt", - "timestamp": 1706246949, - "is_rebalance": false - } - ] -} -``` - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-bkpr-listincome(7), lightning-listfunds(7), lightning-bkpr-listbalances(7), lightning-bkpr-channelsapy(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-bkpr-listbalances.7.md b/doc/lightning-bkpr-listbalances.7.md deleted file mode 100644 index eeaf2a8508fa..000000000000 --- a/doc/lightning-bkpr-listbalances.7.md +++ /dev/null @@ -1,77 +0,0 @@ -lightning-bkpr-listbalances -- Command for listing current channel + wallet balances -==================================================================================== - -SYNOPSIS --------- - -**bkpr-listbalances** - -DESCRIPTION ------------ - -The **bkpr-listbalances** RPC command is a list of all current and historical account balances. An account is either the on-chain *wallet* or a channel balance. Any funds sent to an *external* account will not be accounted for here. - -Note that any channel that was recorded will be listed. Closed channel balances will be 0msat. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:bkpr-listbalances#1", - "method": "bkpr-listbalances", - "params": "{}" -} -``` - -RETURN VALUE ------------- - -On success, an object containing **accounts** is returned. It is an array of objects, where each object contains: - -- **account** (string): The account name. If the account is a channel, the channel\_id. -- **balances** (array of objects): - - **balance\_msat** (msat): Current account balance. - - **coin\_type** (string): Coin type, same as HRP for bech32. - -If **peer\_id** is present: - - **peer\_id** (pubkey): Node id for the peer this account is with. - - **we\_opened** (boolean): Did we initiate this account open (open the channel). - - **account\_closed** (boolean): - - - **account\_resolved** (boolean): Has this channel been closed and all outputs resolved? - - **resolved\_at\_block** (u32, optional): Blockheight account resolved on chain. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "accounts": [ - { - "account": "wallet", - "balances": [ - { - "balance_msat": 2222222000, - "coin_type": "bcrt" - } - ] - } - ] -} -``` - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-bkpr-listincome(7), lightning-listfunds(7), lightning-bkpr-listaccountevents(7), lightning-bkpr-channelsapy(7), lightning-listpeers(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-bkpr-listincome.7.md b/doc/lightning-bkpr-listincome.7.md deleted file mode 100644 index 1b282c806922..000000000000 --- a/doc/lightning-bkpr-listincome.7.md +++ /dev/null @@ -1,135 +0,0 @@ -lightning-bkpr-listincome -- Command for listing all income impacting events -============================================================================ - -SYNOPSIS --------- - -**bkpr-listincome** [*consolidate\_fees*] [*start\_time*] [*end\_time*] - -DESCRIPTION ------------ - -Command *added* in pre-v0.10.1. - -The **bkpr-listincome** RPC command is a list of all income impacting events that the bookkeeper plugin has recorded for this node. - -- **consolidate\_fees** (boolean, optional): If true, we emit a single, consolidated event for any onchain-fees for a txid and account. Otherwise, events for every update to the onchain fee calculation for this account and txid will be printed. Note that this means that the events emitted are non-stable, i.e. calling **listincome** twice may result in different onchain fee events being emitted, depending on how much information we've logged for that transaction. The default is True. -- **start\_time** (u32, optional): UNIX timestamp (in seconds) that filters events after the provided timestamp. The default is zero. -- **end\_time** (u32, optional): UNIX timestamp (in seconds) that filters events up to and at the provided timestamp. The default is max-int. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:bkpr-listincome#1", - "method": "bkpr-listincome", - "params": "{}" -} -{ - "id": "example:bkpr-listincome#2", - "method": "bkpr-listincome", - "params": { - "consolidate_fees": false - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **income\_events** is returned. It is an array of objects, where each object contains: - -- **account** (string): The account name. If the account is a channel, the channel\_id. -- **tag** (string): Type of income event. -- **credit\_msat** (msat): Amount earned (income). -- **debit\_msat** (msat): Amount spent (expenses). -- **currency** (string): Human-readable bech32 part for this coin type. -- **timestamp** (u32): Timestamp this event was recorded by the node. For consolidated events such as onchain\_fees, the most recent timestamp. -- **description** (string, optional): More information about this event. If a `invoice` type, typically the bolt11/bolt12 description. -- **outpoint** (string, optional): The txid:outnum for this event, if applicable. -- **txid** (txid, optional): The txid of the transaction that created this event, if applicable. -- **payment\_id** (hex, optional): Lightning payment identifier. For an htlc, this will be the preimage. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "income_events": [ - { - "account": "wallet", - "tag": "deposit", - "credit_msat": 1111111000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1706153060, - "outpoint": "6d813d2e99ae7181b61e59ff224c43de698bd08b8ca5b8034ccc13aa7b6428ef:0" - }, - { - "account": "wallet", - "tag": "deposit", - "credit_msat": 1111111000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1706153060, - "outpoint": "0bbbe965f76525af3876ae6f1520d91047d4be04cb4e46b7229120a60c5dc9c5:0" - } - ] -} -{ - "income_events": [ - { - "account": "wallet", - "tag": "deposit", - "credit_msat": 1111111000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1708624181, - "outpoint": "895b5eaad4544d24c99628883b4d84b2c6024d6a2da4c1de54098d985f280943:1" - }, - { - "account": "wallet", - "tag": "withdrawal", - "credit_msat": 0, - "debit_msat": 555555000, - "currency": "bcrt", - "timestamp": 1708624182, - "outpoint": "d28a2cba55da10700ddd7f1f23618160dafb3134650055654551d9b0382dcd71:0" - }, - { - "account": "wallet", - "tag": "onchain_fee", - "credit_msat": 0, - "debit_msat": 555556000, - "currency": "bcrt", - "timestamp": 1708624183, - "txid": "d28a2cba55da10700ddd7f1f23618160dafb3134650055654551d9b0382dcd71" - }, - { - "account": "wallet", - "tag": "onchain_fee", - "credit_msat": 554947000, - "debit_msat": 0, - "currency": "bcrt", - "timestamp": 1708624183, - "txid": "d28a2cba55da10700ddd7f1f23618160dafb3134650055654551d9b0382dcd71" - } - ] -} -``` - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-bkpr-listaccountevents(7), lightning-listfunds(7), lightning-bkpr-listbalances(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-blacklistrune.7.md b/doc/lightning-blacklistrune.7.md deleted file mode 100644 index 0836be99851f..000000000000 --- a/doc/lightning-blacklistrune.7.md +++ /dev/null @@ -1,107 +0,0 @@ -lightning-blacklistrune -- Command to prevent a rune from working -================================================================= - -SYNOPSIS --------- - -**blacklistrune** [*start* [*end*]] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -The **blacklistrune** RPC command allows you to effectively revoke the rune you have created (and any runes derived from that rune with additional restictions). Attempting to use these runes will be resulted in a `Blacklisted rune` error message. - -Destroy a rune like in olden times with the **destroyrune** command. - -All runes created by lightning have a unique sequential id within them and can be blacklisted in ranges for efficiency. The command always returns the blacklisted ranges on success. If no parameters are specified, no changes have been made. If start specified without end, that single rune is blacklisted. If end is also specified, every rune from start till end inclusive is blacklisted. - -- **start** (u64, optional): First rune unique id to blacklist. -- **end** (u64, optional): Final rune unique id to blacklist (defaults to start). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:blacklistrune#1", - "method": "blacklistrune", - "params": { - "start": 2 - } -} -{ - "id": "example:blacklistrune#2", - "method": "blacklistrune", - "params": { - "start": 5, - "end": 7 - } -} -{ - "id": "example:blacklistrune#3", - "method": "blacklistrune", - "params": { - "start": 3, - "end": 4 - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **blacklist** is returned. It is an array of objects, where each object contains: - -- **start** (u64): Unique id of first rune in this blacklist range. -- **end** (u64): Unique id of last rune in this blacklist range. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "blacklist": [ - { - "start": 2, - "end": 2 - } - ] -} -{ - "blacklist": [ - { - "start": 2, - "end": 2 - }, - { - "start": 5, - "end": 7 - } - ] -} -{ - "blacklist": [ - { - "start": 2, - "end": 7 - } - ] -} -``` - -AUTHOR ------- - -Shahana Farooqui <> is mainly responsible. - -SEE ALSO --------- - -lightning-commando-blacklist(7), lightning-showrunes(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-check.7.md b/doc/lightning-check.7.md deleted file mode 100644 index 5994f4a22e21..000000000000 --- a/doc/lightning-check.7.md +++ /dev/null @@ -1,97 +0,0 @@ -lightning-check -- Command for verifying parameters -=================================================== - -SYNOPSIS --------- - -**check** *command\_to\_check* - -DESCRIPTION ------------ - -The **check** RPC command verifies another command without actually making any changes. - -This is guaranteed to be safe, and will do all checks up to the point where something in the system would need to be altered (such as checking that channels are in the right state, peers connected, etc). - -It does not guarantee successful execution of the command in all cases. For example, a call to lightning-getroute(7) may still fail to find a route even if checking the parameters succeeds. - -- **command\_to\_check** (string): Name of the relevant command. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:check#1", - "method": "check", - "params": { - "command_to_check": "sendpay", - "route": [ - { - "amount_msat": 1011, - "msatoshi": 1011, - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "delay": 20, - "channel": "1x1x1" - }, - { - "amount_msat": 1000, - "msatoshi": 1000, - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "delay": 10, - "channel": "2x2x2" - } - ], - "payment_hash": "0000000000000000000000000000000000000000000000000000000000000000" - } -} -{ - "id": "example:check#2", - "method": "check", - "params": { - "command_to_check": "dev", - "subcommand": "slowcmd", - "msec": 1000 - } -} -{ - "id": "example:check#3", - "method": "check", - "params": { - "command_to_check": "recover", - "hsmsecret": "6c696768746e696e672d31000000000000000000000000000000000000000000" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **command\_to\_check** (string): The *command\_to\_check* argument. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "command_to_check": "sendpay" -} -{ - "command_to_check": "dev" -} -{ - "command_to_check": "recover" -} -``` - -AUTHOR ------- - -Mark Beckwith <> and Rusty Russell <> are mainly responsible. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-checkmessage.7.md b/doc/lightning-checkmessage.7.md deleted file mode 100644 index dccefabb2231..000000000000 --- a/doc/lightning-checkmessage.7.md +++ /dev/null @@ -1,87 +0,0 @@ -lightning-checkmessage -- Command to check if a signature is from a node -======================================================================== - -SYNOPSIS --------- - -**checkmessage** *message* *zbase* [*pubkey*] - -DESCRIPTION ------------ - -The **checkmessage** RPC command is the counterpart to **signmessage**: given a node id (*pubkey*), signature (*zbase*) and a *message*, it verifies that the signature was generated by that node for that message (more technically: by someone who knows that node's secret). - -As a special case, if *pubkey* is not specified, we will try every known node key (as per *listnodes*), and verification succeeds if it matches for any one of them. Note: this is implemented far more efficiently than trying each one, so performance is not a concern. - -- **message** (string): Message to be checked against the signature. -- **zbase** (string): The Zbase32 encoded signature to verify. -- **pubkey** (pubkey, optional): The Zbase32 encoded signature to verify. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:checkmessage#1", - "method": "checkmessage", - "params": { - "message": "testcase to check new rpc error", - "zbase": "d66bqz3qsku5fxtqsi37j11pci47ydxa95iusphutggz9ezaxt56neh77kxe5hyr41kwgkncgiu94p9ecxiexgpgsz8daoq4tw8kj8yx", - "pubkey": "03be3b0e9992153b1d5a6e1623670b6c3663f72ce6cf2e0dd39c0a373a7de5a3b7" - } -} -{ - "id": "example:checkmessage#2", - "method": "checkmessage", - "params": { - "message": "this is a test!", - "zbase": "d6tqaeuonjhi98mmont9m4wag7gg4krg1f4txonug3h31e9h6p6k6nbwjondnj46dkyausobstnk7fhyy998bhgc1yr98dfmhb4k54d7", - "pubkey": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **verified** (boolean) (always *true*): Whether the signature was valid. -- **pubkey** (pubkey): The *pubkey* parameter, or the pubkey found by looking for known nodes. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "pubkey": "03be3b0e9992153b1d5a6e1623670b6c3663f72ce6cf2e0dd39c0a373a7de5a3b7", - "verified": true -} -{ - "pubkey": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "verified": true -} -``` - -ERRORS ------- - -On failure, an error is returned and core lightning exit with the following error code: - -- -32602: Parameter missed or malformed; -- 1301: *pubkey* not found in the graph. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-signmessage(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-checkrune.7.md b/doc/lightning-checkrune.7.md deleted file mode 100644 index ff050e8034ca..000000000000 --- a/doc/lightning-checkrune.7.md +++ /dev/null @@ -1,117 +0,0 @@ -lightning-checkrune -- Command to Validate Rune -=============================================== - -SYNOPSIS --------- - -**checkrune** *rune* [*nodeid*] [*method*] [*params*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -The **checkrune** RPC command checks the validity/authorization rights of specified rune for the given nodeid, method, and params. - -If successful, the rune "usage" counter (used for ratelimiting) is incremented. - -See lightning-createrune(7) for the fields in the rune which are checked. - -- **rune** (string): Rune to check for authorization. -- **nodeid** (string, optional): Node id of requesting node *(required until v23.11)*. -- **method** (string, optional): Method for which rune needs to be validated *(required until v23.11)*. -- **params** (one of, optional): - - (array): Array of positional parameters. - - (object): Parameters for method.: - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:checkrune#1", - "method": "checkrune", - "params": { - "nodeid": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "rune": "617Obfct0oRBj_uqGFQxDk3XZ1sDFiC2Q5ltm5z1i_k9NSZtZXRob2Q9aW52b2ljZSZwbmFtZWRlc2NyaXB0aW9uPUB0aXBqYXJcfGpiNTVAc2VuZHNhdHMubG9s", - "method": "invoice", - "params": { - "amount_msat": "any", - "label": "lbl", - "description": [ - "@tipjar|jb55@sendsats.lol." - ] - } - } -} -{ - "id": "example:checkrune#2", - "method": "checkrune", - "params": { - "nodeid": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "rune": "OSqc7ixY6F-gjcigBfxtzKUI54uzgFSA6YfBQoWGDV89MA==", - "method": "listpeers", - "params": {} - } -} -{ - "id": "example:checkrune#3", - "method": "checkrune", - "params": { - "nodeid": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "rune": "617Obfct0oRBj_uqGFQxDk3XZ1sDFiC2Q5ltm5z1i_k9NSZtZXRob2Q9aW52b2ljZSZwbmFtZWRlc2NyaXB0aW9uPUB0aXBqYXJcfGpiNTVAc2VuZHNhdHMubG9s", - "method": "invoice", - "params": { - "amount_msat": "any", - "label": "lbl", - "description": "@tipjar|jb55@sendsats.lol" - } - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **valid** (boolean): True if the rune is valid. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "valid": true -} -{ - "valid": true -} -{ - "valid": true -} -``` - -ERRORS ------- - -The following error codes may occur: - -- 1501 (RUNE\_NOT\_AUTHORIZED): rune is not for this node (or perhaps completely invalid) -- 1502 (RUNE\_NOT\_PERMITTED): rune does not allow this usage (includes a detailed reason why) -- 1503 (RUNE\_BLACKLISTED): rune has been explicitly blacklisted. - -AUTHOR ------- - -Shahana Farooqui <> is mainly responsible for consolidating logic from commando. - -SEE ALSO --------- - -lightning-createrune(7), lightning-blacklistrune(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-close.7.md b/doc/lightning-close.7.md deleted file mode 100644 index d366c87780db..000000000000 --- a/doc/lightning-close.7.md +++ /dev/null @@ -1,129 +0,0 @@ -lightning-close -- Command for closing channels with direct peers -================================================================= - -SYNOPSIS --------- - -**close** *id* [*unilateraltimeout*] [*destination*] [*fee\_negotiation\_step*] [*wrong\_funding*] [*force\_lease\_closed*] [*feerange*] - -DESCRIPTION ------------ - -The **close** RPC command attempts to close the channel cooperatively with the peer, or unilaterally after *unilateraltimeout*, and the to-local output will be sent to the address specified in *destination*. - -The peer needs to be live and connected in order to negotiate a mutual close. The default of unilaterally closing after 48 hours is usually a reasonable indication that you can no longer contact the peer. - -- **id** (string): Peer id, channel id or short\_channel\_id. If the given *id* is a peer ID (66 hex digits as a string), then it applies to the active channel of the direct peer corresponding to the given peer ID. If the given *id* is a channel ID (64 hex digits as a string, or the short channel ID *blockheight:txindex:outindex* form), then it applies to that channel. -- **unilateraltimeout** (u32, optional): If it is not zero, the command will unilaterally close the channel when that number of seconds is reached. If *unilateraltimeout* is zero, then the command will wait indefinitely until the peer is online and can negotiate a mutual close. The default is 2 days (172800 seconds). -- **destination** (string, optional): Any Bitcoin bech32 type. If the peer hasn't offered the option\_shutdown\_anysegwit feature, then taproot addresses (or other v1+ segwit) are not allowed. Tell your friends to upgrade! The default is a Core Lightning wallet address. -- **fee\_negotiation\_step** (string, optional): It controls how closing fee negotiation is performed assuming the peer proposes a fee that is different than our estimate. (Note that modern peers use the quick-close protocol which does not allow negotiation: see *feerange* instead). - - On every negotiation step we must give up some amount from our proposal towards the peer's proposal. This parameter can be an integer in which case it is interpreted as number of satoshis to step at a time. Or it can be an integer followed by `%` to designate a percentage of the interval to give up. A few examples, assuming the peer proposes a closing fee of 3000 satoshi and our estimate shows it must be 4000: - * `10`: our next proposal will be 4000-10=3990. - * `10%`: our next proposal will be 4000-(10% of (4000-3000))=3900. - * '1': our next proposal will be 3999. This is the most extreme case when we insist on our fee as much as possible. - * `100%`: our next proposal will be 3000. This is the most relaxed case when we quickly accept the peer's proposal. The default is `50%`. -- **wrong\_funding** (outpoint, optional): It can only be specified if both sides have offered the `shutdown_wrong_funding` feature (enabled by the **experimental-shutdown-wrong-funding** option). It must be a transaction id followed by a colon then the output number. Instead of negotiating a shutdown to spend the expected funding transaction, the shutdown transaction will spend this output instead. This is only allowed if this peer opened the channel and the channel is unused: it can rescue openings which have been manually miscreated. -- **force\_lease\_closed** (boolean, optional): If the channel has funds leased to the peer (option\_will\_fund), we prevent initiation of a mutual close unless this flag is passed in. The default is False. -- **feerange** (array of feerates, optional): An optional array [ *min*, *max* ], indicating the minimum and maximum feerates to offer: the peer will obey these if it supports the quick-close protocol. *slow* and *unilateral\_close* are the defaults. Note that the maximum fee will be capped at the final commitment transaction fee (unless the experimental anchor-outputs option is negotiated).: - - (feerate, optional) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:close#1", - "method": "close", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "unilateraltimeout": 1, - "destination": null, - "fee_negotiation_step": null, - "force_lease_closed": null, - "feerange": null - } -} -{ - "id": "example:close#2", - "method": "close", - "params": { - "id": "103x1x0", - "unilateraltimeout": null, - "destination": "bcrt1qeyyk6sl5pr49ycpqyckvmttus5ttj25pd0zpvg", - "fee_negotiation_step": null, - "force_lease_closed": null, - "feerange": null - } -} -{ - "id": "example:close#3", - "method": "close", - "params": [ - "107x1x0", - null, - "bcrt1qeyyk6sl5pr49ycpqyckvmttus5ttj25pd0zpvg" - ] -} -``` - -NOTES ------ - -Prior to 0.7.2, **close** took two parameters: *force* and *timeout*. *timeout* was the number of seconds before *force* took effect (default, 30), and *force* determined whether the result was a unilateral close or an RPC error (default). Even after the timeout, the channel would be closed if the peer reconnected. - -NOTIFICATIONS -------------- - -Notifications may be returned indicating what is going on, especially if the peer is offline and we are waiting. - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **type** (string) (one of "mutual", "unilateral", "unopened"): Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel. - -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. - -A unilateral close may still occur at any time if the peer did not behave correctly during the close negotiation. - -Unilateral closes will return your funds after a delay. The delay will vary based on the peer *to\_self\_delay* setting, not your own setting. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "tx": "020000000001018d388ffcd216c92d25163a62096ce47d5c9bbd6270ced51c5a1484f89df33e5700000000009db0e28002a00f00000000000016001445503fa4b65ade3ffdb1a92057688456c9ffae1380130f0000000000220020be82765fdb17fd5568f2dd31c6cf1aabc620ef338995ec5d9a2f3e42f43ae4870400473044022058dcde893655f40fc8162a79596440ef3e304273f8d530401fc17bc92c58159b0220428900ca6537538ba237d569a4a09003d663a991aeb331a9f18dfe807ee78806014730440220111270eeed8b4b1a231d3ce6e0e0daad718623ad159a0fd3781fb18118a8fec70220539826ee7c76cad4116d1d8852329f80314b3434cf21c765d8004186451a4cd50147522102324266de8403b3ab157a09f1f784d587af61831c998c151bcc21bb74c2b2314b2102e3bd38009866c9da8ec4aa99cc4ea9c6c0dd46df15c61ef0ce1f271291714e5752ae9c3ed620", - "txid": "5d8d917dd7d39fe5a12f121457fc6d712b5e393ed4f16bc8f5976fc08cbbfecd", - "type": "unilateral" -} -{ - "tx": "0200000000010132cbce7d5f96b4003c3b5c0eab2a29fef90bb6abb833ff312fa122f31e8301810000000000ffffffff02a0860100000000002251205779a060f200d40e8f871a40eb91614cc5bfa6d0a5f852e053400a7feff8615005b10d0000000000160014c9096d43f408ea526020262ccdad7c8516b92a81040047304402207e171d056e81cf8ad2d5a613ecbaa212d5dcbd0bf713145d18911d2cbe9d858802206222911660a26d7ffddc2563ae6d41d6ffad9fbd2fc26cf40eab501a31153b9e0147304402204ae7cdc68dc7966eab73f16a1978643336333d54ae0b6f87bc11a2c19174a9710220601e5276aee0825466cc272c4eb7d353b393ef0dd230d303f46772790dee19190147522102324266de8403b3ab157a09f1f784d587af61831c998c151bcc21bb74c2b2314b2102e3bd38009866c9da8ec4aa99cc4ea9c6c0dd46df15c61ef0ce1f271291714e5752ae00000000", - "txid": "4a08e0508e2e39ea033fab5f77b318337f345550421799f6e0eb1b15a892eda4", - "type": "mutual" -} -{ - "tx": "02000000000101233b513665836d240423f45ffcd1fe19aeb08d62303fa5382ad3285f770683a60000000000ffffffff02a086010000000000225120b47216ab60a0fad97de0ba9b8b370d281dfe55f552d82034e2a8d054c2246e4405b10d0000000000160014c9096d43f408ea526020262ccdad7c8516b92a81040047304402207a9e3ca258861b33827d91514690a757e76730ba8c15dd222340bb13d993a1a502204d0ae329273b69abe62df1ffccce808d5f1a29101a8ee95dae99888376dbaef801473044022033c03f406db9f1c9d924cfd8f6ea42d0962f0ab02e3217aef518aea517ca5ba40220076e2af9d40c676316a2765a86f9efd481de3fc4465ceba33b0782c505ae3452014752210212284c004a3d24146e54b2a24db48f650370a08e1fe9abe8ff41f92b09cd50542102a3032ef980cc735579aa5295d927b9a1bdbafc459f2da14163dc9bd530e0a21152ae00000000", - "txid": "d44a1374a30c1a936d2d4fdbe73c0ffff42fec8c27c6cbaec2758b3042f61d08", - "type": "mutual" -} -``` - -AUTHOR ------- - -ZmnSCPxj <> is mainly responsible. - -SEE ALSO --------- - -lightning-disconnect(7), lightning-fundchannel(7), lightningd-config(5) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-commando-blacklist.7.md b/doc/lightning-commando-blacklist.7.md deleted file mode 100644 index 6b81eb0fc51f..000000000000 --- a/doc/lightning-commando-blacklist.7.md +++ /dev/null @@ -1,107 +0,0 @@ -lightning-commando-blacklist -- Command to prevent a rune from working -====================================================================== - -SYNOPSIS --------- - -**commando-blacklist** [*start* [*end*]] - -DESCRIPTION ------------ - -Command **deprecated in v23.08, removed after v24.08**. - -Command *added* in v23.05. - -The **commando-blacklist** RPC command allows you to effectively revoke the rune you have created (and any runes derived from that rune with additional restictions). Attempting to use these runes will be resulted in a `Blacklisted rune` error message. - -All runes created by commando have a unique sequential id within them and can be blacklisted in ranges for efficiency. The command always returns the blacklisted ranges on success. If no parameters are specified, no changes have been made. If start specified without end, that single rune is blacklisted. If end is also specified, every rune from start till end inclusive is blacklisted. - -- **start** (u64, optional): First rune unique id to blacklist. -- **end** (u64, optional): Final rune unique id to blacklist (defaults to start). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:commando-blacklist#1", - "method": "commando-blacklist", - "params": { - "start": 2 - } -} -{ - "id": "example:commando-blacklist#2", - "method": "commando-blacklist", - "params": { - "start": 5, - "end": 7 - } -} -{ - "id": "example:commando-blacklist#3", - "method": "commando-blacklist", - "params": { - "start": 3, - "end": 4 - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **blacklist** is returned. It is an array of objects, where each object contains: - -- **start** (u64): Unique id of first rune in this blacklist range. -- **end** (u64): Unique id of last rune in this blacklist range. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "blacklist": [ - { - "start": 2, - "end": 2 - } - ] -} -{ - "blacklist": [ - { - "start": 2, - "end": 2 - }, - { - "start": 5, - "end": 7 - } - ] -} -{ - "blacklist": [ - { - "start": 2, - "end": 7 - } - ] -} -``` - -AUTHOR ------- - -Shahana Farooqui <> is mainly responsible. - -SEE ALSO --------- - -lightning-commando-listrunes(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-commando-listrunes.7.md b/doc/lightning-commando-listrunes.7.md deleted file mode 100644 index e656e3443cff..000000000000 --- a/doc/lightning-commando-listrunes.7.md +++ /dev/null @@ -1,184 +0,0 @@ -lightning-commando-listrunes -- Command to list previously generated runes -========================================================================== - -SYNOPSIS --------- - -**commando-listrunes** [*rune*] - -DESCRIPTION ------------ - -Command **deprecated in v23.08, removed after v24.05**. - -Command *added* in v23.05. - -The **commando-listrunes** RPC command either lists runes that we stored as we generate them (see lightning-commando-rune(7)) or decodes the rune given on the command line. - -NOTE: Runes generated prior to v23.05 were not stored, so will not appear in this list. - -- **rune** (string, optional): Optional rune to list. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:commando-listrunes#1", - "method": "commando-listrunes", - "params": "{}" -} -{ - "id": "example:commando-listrunes#2", - "method": "commando-listrunes", - "params": { - "rune": "Am3W_wI0PRn4qVNEsJ2iInHyFPQK8wfdqEXztm8-icQ9MA==" - } -} -{ - "id": "example:commando-listrunes#3", - "method": "commando-listrunes", - "params": { - "rune": "m_tyR0qqHUuLEbFJW6AhmBg-9npxVX2yKocQBFi9cvY9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJzJnBuYW1lbGV2ZWwhfHBuYW1lbGV2ZWwvaW8mcGFycjEhfHBhcnIxL2lv" - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **runes** is returned. It is an array of objects, where each object contains: - -- **rune** (string): Base64 encoded rune. -- **unique\_id** (string): Unique id assigned when the rune was generated; this is always a u64 for commando runes. -- **restrictions** (array of objects): The restrictions on what commands this rune can authorize.: - - **alternatives** (array of objects): - - **fieldname** (string): The field this restriction applies to; see commando-rune(7). - - **value** (string): The value accepted for this field. - - **condition** (string): The way to compare fieldname and value. - - **english** (string): English readable description of this alternative. - - **english** (string): English readable summary of alternatives above. -- **restrictions\_as\_english** (string): English readable description of the restrictions array above. -- **stored** (boolean, optional) (always *false*): This is false if the rune does not appear in our datastore (only possible when `rune` is specified). -- **blacklisted** (boolean, optional) (always *true*): The rune has been blacklisted; see commando-blacklist(7). -- **last\_used** (number, optional): The last time this rune was successfully used. *(added 23.11)* -- **our\_rune** (boolean, optional) (always *false*): This is not a rune for this node (only possible when `rune` is specified). - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "runes": [ - { - "rune": "OSqc7ixY6F-gjcigBfxtzKUI54uzgFSA6YfBQoWGDV89MA==", - "unique_id": "0", - "restrictions": [], - "restrictions_as_english": "" - }, - { - "rune": "Am3W_wI0PRn4qVNEsJ2iInHyFPQK8wfdqEXztm8-icQ9MA==", - "stored": false, - "our_rune": false, - "unique_id": "1", - "restrictions": [], - "restrictions_as_english": "" - } - ] -} -{ - "runes": [ - { - "rune": "Am3W_wI0PRn4qVNEsJ2iInHyFPQK8wfdqEXztm8-icQ9MA==", - "stored": false, - "our_rune": false, - "unique_id": "1", - "restrictions": [], - "restrictions_as_english": "" - } - ] -} -{ - "runes": [ - { - "rune": "m_tyR0qqHUuLEbFJW6AhmBg-9npxVX2yKocQBFi9cvY9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJzJnBuYW1lbGV2ZWwhfHBuYW1lbGV2ZWwvaW8mcGFycjEhfHBhcnIxL2lv", - "stored": false, - "unique_id": "3", - "restrictions": [ - { - "alternatives": [ - { - "fieldname": "id", - "value": "022d223620a359a47ff7", - "condition": "^", - "english": "id starts with 022d223620a359a47ff7" - } - ], - "english": "id starts with 022d223620a359a47ff7" - }, - { - "alternatives": [ - { - "fieldname": "method", - "value": "listpeers", - "condition": "=", - "english": "method equal to listpeers" - } - ], - "english": "method equal to listpeers" - }, - { - "alternatives": [ - { - "fieldname": "pnamelevel", - "value": "", - "condition": "!", - "english": "pnamelevel is missing" - }, - { - "fieldname": "pnamelevel", - "value": "io", - "condition": "/", - "english": "pnamelevel unequal to io" - } - ], - "english": "pnamelevel is missing OR pnamelevel unequal to io" - }, - { - "alternatives": [ - { - "fieldname": "parr1", - "value": "", - "condition": "!", - "english": "parr1 is missing" - }, - { - "fieldname": "parr1", - "value": "io", - "condition": "/", - "english": "parr1 unequal to io" - } - ], - "english": "parr1 is missing OR parr1 unequal to io" - } - ], - "restrictions_as_english": "id starts with 022d223620a359a47ff7 AND method equal to listpeers AND pnamelevel is missing OR pnamelevel unequal to io AND parr1 is missing OR parr1 unequal to io" - } - ] -} -``` - -AUTHOR ------- - -Shahana Farooqui <> is mainly responsible. - -SEE ALSO --------- - -lightning-commando-rune(7), lightning-commando-blacklist(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-commando-rune.7.md b/doc/lightning-commando-rune.7.md deleted file mode 100644 index 599952fbc9f2..000000000000 --- a/doc/lightning-commando-rune.7.md +++ /dev/null @@ -1,269 +0,0 @@ -lightning-commando-rune -- Command to Authorize Remote Peer Access -================================================================== - -SYNOPSIS --------- - -**commando-rune** [*rune*] [*restrictions*] - -DESCRIPTION ------------ - -Command **deprecated in v23.08, removed after v23.05**. - -The **commando-rune** RPC command creates a base64 string called a *rune* which can be used to access commands on this node. Each *rune* contains a unique id (a number starting at 0), and can have restrictions inside it. Nobody can remove restrictions from a rune: if you try, the rune will be rejected. There is no limit on how many runes you can issue; the node simply decodes and checks them as they are received (we do store them for lightning-commando- listrunes(7) however). - -- **rune** (string, optional): If supplied, the restrictions are simple appended to that *rune* (it doesn't need to be a rune belonging to this node). If not supplied, a new *rune* is constructed, with a new unique id. -- **restrictions** (one of, optional): It can be the string `readonly`, or an array of restrictions. - Each restriction is an array of one or more alternatives, such as "method is listpeers", or "method is listpeers OR time is before 2023".: - - (array of arrays): Alternatives use a simple language to examine the command which is being run: - * time: the current UNIX time, e.g. "time<1656759180". - * id: the node\_id of the peer, e.g. "id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605". - * method: the command being run, e.g. "method=withdraw". - * per: how often the rune can be used, with suffix "sec" (default), "min", "hour", "day" or "msec", "usec" or "nsec". e.g. "per=5sec". - * rate: the rate limit, per minute, e.g. "rate=60" is equivalent to "per=1sec". - * pnum: the number of parameters. e.g. "pnum<2". - * pnameX: the parameter named X (with any punctuation like `_` removed). e.g. "pnamedestination=1RustyRX2oai4EYYDpQGWvEL62BBGqN9T". - * parrN: the N'th parameter. e.g. "parr0=1RustyRX2oai4EYYDpQGWvEL62BBGqN9T". - - (array of strings) - - (string, optional) - - (always "readonly"): A rune which allows most *get* and *list* commands, and the *summary* command. - -RESTRICTION FORMAT ------------------- - -Restrictions are one or more alternatives. Each alternative is *name* *operator* *value*. The valid names are shown above. - -Note that if a value contains `\`, it must be preceeded by another `\` to form valid JSON: -* `=`: passes if equal ie. identical. e.g. `method=withdraw` -* `/`: not equals, e.g. `method/withdraw` -* `^`: starts with, e.g. `id^024b9a1fa8e006f1e3937f` -* `$`: ends with, e.g. `id$381df1cc449605`. -* `~`: contains, e.g. `id~006f1e3937f65f66c40`. -* `<`: is a decimal integer, and is less than. e.g. `time<1656759180` -* `>`: is a decimal integer, and is greater than. e.g. `time>1656759180` -* `{`: preceeds in alphabetical order (or matches but is shorter), - e.g. `id{02ff`. -* `}`: follows in alphabetical order (or matches but is longer), - e.g. `id}02ff`. -* `#`: a comment, ignored, e.g. `dumb example#`. -* `!`: only passes if the *name* does *not* exist. e.g. `pnamedestination!`. -Every other operator except `#` fails if *name* does not exist! - -EXAMPLE USAGE -------------- - -This creates a fresh rune which can do anything: - -```shell -$ lightning-cli commando-rune -{ - "rune": "KUhZzNlECC7pYsz3QVbF1TqjIUYi3oyESTI7n60hLMs9MA==", - "unique_id": "0" -} -``` -We can add restrictions to that rune, like so: - -```shell -$ lightning-cli commando-rune rune=KUhZzNlECC7pYsz3QVbF1TqjIUYi3oyESTI7n60hLMs9MA== restrictions=readonly -{ - "rune": "NbL7KkXcPQsVseJ9TdJNjJK2KsPjnt_q4cE_wvc873I9MCZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl", - "unique_id": "0" -} -``` -The "readonly" restriction is a short-cut for two restrictions: - -1. `["method^list", "method^get", "method=summary"]`: You may call list, get or summary. -2. `["method/listdatastore"]`: But not listdatastore: that contains sensitive stuff! - -We can do the same manually, like so: - -```shell -$ lightning-cli commando-rune rune=KUhZzNlECC7pYsz3QVbF1TqjIUYi3oyESTI7n60hLMs9MA== restrictions='[["method^list", "method^get", "method=summary"],["method/listdatastore"]]' -{ - "rune": "NbL7KkXcPQsVseJ9TdJNjJK2KsPjnt_q4cE_wvc873I9MCZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl", - "unique_id": "0" -} -``` -Let's create a rune which lets a specific peer (024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605) run "listpeers" on themselves: - -```shell -$ lightning-cli commando-rune restrictions='[["id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605"],["method=listpeers"],["pnum=1"],["pnameid=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605","parr0=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605"]]' -{ - "rune": "FE8GHiGVvxcFqCQcClVRRiNE_XEeLYQzyG2jmqto4jM9MiZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDV8cGFycjA9MDI0YjlhMWZhOGUwMDZmMWUzOTM3ZjY1ZjY2YzQwOGU2ZGE4ZTFjYTcyOGVhNDMyMjJhNzM4MWRmMWNjNDQ5NjA1", - "unique_id": "2" -} -``` -This allows `listpeers` with 1 argument (`pnum=1`), which is either by name (`pnameid`), or position (`parr0`). We could shorten this in several ways: either allowing only positional or named parameters, or by testing the start of the parameters only. Here's an example which only checks the first 9 bytes of the `listpeers` parameter: - -```shell -$ lightning-cli commando-rune restrictions='[["id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605"],["method=listpeers"],["pnum=1"],["pnameid^024b9a1fa8e006f1e393", "parr0^024b9a1fa8e006f1e393"]' - { - "rune": "fTQnfL05coEbiBO8SS0cvQwCcPLxE9c02pZCC6HRVEY9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5Mw==", - "unique_id": "3" -} -``` -Before we give this to our peer, let's add two more restrictions: that it only be usable for 24 hours from now (`time<`), and that it can only be used twice a minute (`rate=2`). `date +%s` can give us the current time in seconds: - -```shell -$ lightning-cli commando-rune rune=fTQnfL05coEbiBO8SS0cvQwCcPLxE9c02pZCC6HRVEY9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5Mw== restrictions='[["time<'$(($(date +%s) + 24*60*60))'","rate=2"]]' -{ - "rune": "tU-RLjMiDpY2U0o3W1oFowar36RFGpWloPbW9-RuZdo9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5MyZ0aW1lPDE2NTY5MjA1MzgmcmF0ZT0y", - "unique_id": "3" -} -``` -You can also use lightning-decode(7) to examine runes you have been given: - -```shell -$ lightning-cli decode tU-RLjMiDpY2U0o3W1oFowar36RFGpWloPbW9-RuZdo9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5MyZ0aW1lPDE2NTY5MjA1MzgmcmF0ZT0y -{ - "type": "rune", - "unique_id": "3", - "string": "b54f912e33220e9636534a375b5a05a306abdfa4451a95a5a0f6d6f7e46e65da:=3&id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605&method=listpeers&pnum=1&pnameid^024b9a1fa8e006f1e393|parr0^024b9a1fa8e006f1e393&time<1656920538&rate=2", - "restrictions": [ - { - "alternatives": [ - "id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605" - ], - "summary": "id (of commanding peer) equal to '024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605'" - }, - { - "alternatives": [ - "method=listpeers" - ], - "summary": "method (of command) equal to 'listpeers'" - }, - { - "alternatives": [ - "pnum=1" - ], - "summary": "pnum (number of command parameters) equal to 1" - }, - { - "alternatives": [ - "pnameid^024b9a1fa8e006f1e393", - "parr0^024b9a1fa8e006f1e393" - ], - "summary": "pnameid (object parameter 'id') starts with '024b9a1fa8e006f1e393' OR parr0 (array parameter #0) starts with '024b9a1fa8e006f1e393'" - }, - { - "alternatives": [ - "time<1656920538" - ], - "summary": "time (in seconds since 1970) less than 1656920538 (approximately 19 hours 18 minutes from now)" - }, - { - "alternatives": [ - "rate=2" - ], - "summary": "rate (max per minute) equal to 2" - } - ], - "valid": true -} -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:commando-rune#1", - "method": "commando-rune", - "params": "{}" -} -{ - "id": "example:commando-rune#2", - "method": "commando-rune", - "params": { - "restrictions": "readonly" - } -} -{ - "id": "example:commando-rune#3", - "method": "commando-rune", - "params": { - "restrictions": [ - [ - "id^022d223620a359a47ff7" - ], - [ - "method=listpeers" - ] - ] - } -} -{ - "id": "example:commando-rune#4", - "method": "commando-rune", - "params": { - "restrictions": [ - [ - "method=pay" - ], - [ - "pnameamountmsat<10000" - ] - ] - } -} -``` - -SHARING RUNES -------------- - -Because anyone can add a restriction to a rune, you can always turn a normal rune into a read-only rune, or restrict access for 30 minutes from the time you give it to someone. Adding restrictions before sharing runes is best practice. - -If a rune has a ratelimit, any derived rune will have the same id, and thus will compete for that ratelimit. You might want to consider adding a tighter ratelimit to a rune before sharing it, so you will keep the remainder. For example, if you rune has a limit of 60 times per minute, adding a limit of 5 times per minute and handing that rune out means you can still use your original rune 55 times per minute. - -RETURN VALUE ------------- - -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). - -The following warnings may also be returned: - -- **warning\_unrestricted\_rune**: A warning shown when runes are created with powers that could drain your node. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "rune": "OSqc7ixY6F-gjcigBfxtzKUI54uzgFSA6YfBQoWGDV89MA==", - "unique_id": "0", - "warning_unrestricted_rune": "WARNING: This rune has no restrictions! Anyone who has access to this rune could drain funds from your node. Be careful when giving this to apps that you don't trust. Consider using the restrictions parameter to only allow access to specific rpc methods." -} -{ - "rune": "zm0x_eLgHexaTvZn3Cz7gb_YlvrlYGDo_w4BYlR9SS09MSZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl", - "unique_id": "1" -} -{ - "rune": "YPojv9qgHPa3im0eiqRb-g8aRq76OasyfltGGqdFUOU9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJz", - "unique_id": "2" -} -{ - "rune": "b3hXuEM7Pqzk-C7HUw83xzvHOV7fmuGaWjdo-wHdfg89MCZtZXRob2Q9cGF5JnBuYW1lYW1vdW50bXNhdDwxMDAwMA==", - "unique_id": "3" -} -``` - -AUTHOR ------- - -Rusty Russell <> wrote the original Python commando.py plugin, the in-tree commando plugin, and this manual page. - -Christian Decker came up with the name "commando", which almost excuses his previous adoption of the name "Eltoo". - -SEE ALSO --------- - -lightning-commando(7), lightning-decode(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-commando.7.md b/doc/lightning-commando.7.md deleted file mode 100644 index a4735f1e6424..000000000000 --- a/doc/lightning-commando.7.md +++ /dev/null @@ -1,159 +0,0 @@ -lightning-commando -- Command to Send a Command to a Remote Peer -================================================================ - -SYNOPSIS --------- - -**commando** *peer\_id* *method* [*params*] [*rune*] [*filter*] - -DESCRIPTION ------------ - -The **commando** RPC command is a homage to bad 80s movies. It also sends a directly-connected *peer\_id* a custom message, containing a request to run *method* (with an optional dictionary of *params*); generally the peer will only allow you to run a command if it has provided you with a *rune* which allows it. - -- **peer\_id** (pubkey): Peer to command. -- **method** (string): Method to invoke on peer. -- **params** (one of, optional): - - (array): Array of positional parameters. - - (object): Parameters for method.: -- **rune** (string, optional): Rune to authorize the command. -- **filter** (object, optional): Filter to peer to apply to any successful result.: - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:commando#1", - "method": "commando", - "params": { - "peer_id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "rune": "zm0x_eLgHexaTvZn3Cz7gb_YlvrlYGDo_w4BYlR9SS09MSZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl", - "method": "getinfo", - "params": {} - } -} -{ - "id": "example:commando#2", - "method": "commando", - "params": { - "peer_id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "rune": "m_tyR0qqHUuLEbFJW6AhmBg-9npxVX2yKocQBFi9cvY9MyZpZF4wMjJkMjIzNjIwYTM1OWE0N2ZmNyZtZXRob2Q9bGlzdHBlZXJzJnBuYW1lbGV2ZWwhfHBuYW1lbGV2ZWwvaW8mcGFycjEhfHBhcnIxL2lv", - "method": "listpeers", - "params": [ - "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "broken" - ] - } -} -{ - "id": "example:commando#3", - "method": "commando", - "params": { - "peer_id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "rune": "b3hXuEM7Pqzk-C7HUw83xzvHOV7fmuGaWjdo-wHdfg89MCZtZXRob2Q9cGF5JnBuYW1lYW1vdW50bXNhdDwxMDAwMA==", - "method": "pay", - "params": { - "bolt11": "lnbcrt1pja05v6sp5n6gnm380ckkrnhzvytz0hvym0vcf0mlrk586nlp72cq7e2hhhffspp5cwhuvl4jhlqep3st2703z89jp7j6wucm8ytlj7rk9ckk0mv7whysdq5v3jhxcmjd9c8g6t0dceqxqyjw5qcqp99qxpqysgq40udwjtktkry0yyq9408q5vtmj534h88j5nn562lamam0rtfqfu3093t2dhhc63qnqe5maa5jc9ad5pm08q2k2udvp6skw9f6ez9c9qptatlau", - "amount_msat": 9999 - } - } -} -``` - -RETURN VALUE ------------- - -On success, the return depends on the *method* invoked. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "alias": "JUNIORBEAM-v23.11-415-gd120eba", - "color": "0266e4", - "num_peers": 1, - "num_pending_channels": 0, - "num_active_channels": 0, - "num_inactive_channels": 0, - "address": [], - "binding": [ - { - "type": "ipv4", - "address": "127.0.0.1", - "port": 42513 - } - ], - "version": "v23.11-415-gd120eba", - "blockheight": 101, - "network": "regtest", - "fees_collected_msat": 0, - "lightning-dir": "/tmp/ltests-7u_8_rtu/test_commando_rune_1/lightning-1/regtest", - "our_features": { - "init": "08a0000a8a5961", - "node": "88a0000a8a5961", - "channel": "", - "invoice": "02000002024100" - } -} -{ - "peers": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "connected": true, - "num_channels": 0, - "netaddr": [ - "127.0.0.1:40119" - ], - "features": "08a0000a8a5961", - "log": [ - { - "type": "SKIPPED", - "num_skipped": 30 - } - ] - } - ] -} -{ - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "payment_hash": "c3afc67eb2bfc190c60b579f111cb20fa5a7731b3917f978762e2d67ed9e75c9", - "created_at": 1708642714.8110592, - "parts": 1, - "amount_msat": 9999, - "amount_sent_msat": 9999, - "payment_preimage": "17632717785b1a833a296ba1831cb968602872e68881c2f324e06e87979296dc", - "status": "complete" -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32600: Usually means peer is not connected -- 19535: the local commando plugin discovered an error. -- 19536: the remote commando plugin discovered an error. -- 19537: the remote commando plugin said we weren't authorized. - -It can also fail if the peer does not respond, in which case it will simply hang awaiting a response. - -AUTHOR ------- - -Rusty Russell <> wrote the original Python commando.py plugin, the in-tree commando plugin, and this manual page. - -Christian Decker came up with the name "commando", which almost excuses his previous adoption of the name "Eltoo". - -SEE ALSO --------- - -lightning-commando-rune(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-connect.7.md b/doc/lightning-connect.7.md deleted file mode 100644 index ff4613b9f203..000000000000 --- a/doc/lightning-connect.7.md +++ /dev/null @@ -1,117 +0,0 @@ -lightning-connect -- Command for connecting to another lightning node -===================================================================== - -SYNOPSIS --------- - -**connect** *id* [*host*] [*port*] - -DESCRIPTION ------------ - -The **connect** RPC command establishes a new connection with another node in the Lightning Network. - -Connecting to a node is just the first step in opening a channel with another node. Once the peer is connected a channel can be opened with lightning-fundchannel(7). - -If there are active channels with the peer, **connect** returns once all the subdaemons are in place to handle the channels, not just once it's connected. - -- **id** (string): The target node's public key. As a convenience, *id* may be of the form *id@host* or *id@host:port*. In this case, the *host* and *port* parameters must be omitted. This can fail if your C-lightning node is a fresh install that has not connected to any peers yet (your node has no gossip yet), or if the target *id* is a fresh install that has no channels yet (nobody will gossip about a node until it has one published channel). -- **host** (string, optional): The peer's hostname or IP address. If *host* is not specified (or doesn't work), the connection will be attempted to an IP belonging to *id* obtained through gossip with other already connected peers. If *host* begins with a `/` it is interpreted as a local path and the connection will be made to that local socket (see **bind-addr** in lightningd-config(5)). -- **port** (u16, optional): The peer's port number. If not specified, the *port* depends on the current network: - * bitcoin **mainnet**: 9735. - * bitcoin **testnet**: 19735. - * bitcoin **signet**: 39735. - * bitcoin **regtest**: 19846. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:connect#1", - "method": "connect", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "host": "localhost", - "port": 44619 - } -} -{ - "id": "example:connect#2", - "method": "connect", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "host": "127.0.0.1", - "port": 42839 - } -} -``` - -RETURN VALUE ------------- - -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) (one of "in", "out"): Whether they initiated connection or we did. -- **address** (object): Address information (mainly useful if **direction** is *out*).: - - **type** (string) (one of "local socket", "ipv4", "ipv6", "torv2", "torv3"): Type of connection (*torv2*/*torv3* only if **direction** is *out*). - - 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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "features": "08a0000a0a69a2", - "direction": "out", - "address": { - "type": "ipv4", - "address": "127.0.0.1", - "port": 44619 - } -} -{ - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "features": "08a0000a8a5961", - "direction": "out", - "address": { - "type": "ipv4", - "address": "127.0.0.1", - "port": 42839 - } -} -``` - -ERRORS ------- - -On failure, one of the following errors will be returned: - -- 400: Unable to connect, no address known for peer -- 401: If some addresses are known but connecting to all of them failed, the message will contain details about the failures -- 402: If the peer disconnected while we were connecting -- -32602: If the given parameters are wrong - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. Felix <> is the original author of this manpage. - -SEE ALSO --------- - -lightning-fundchannel(7), lightning-listpeers(7), lightning-listchannels(7), lightning-disconnect(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-createinvoice.7.md b/doc/lightning-createinvoice.7.md deleted file mode 100644 index 2b80ccae88e9..000000000000 --- a/doc/lightning-createinvoice.7.md +++ /dev/null @@ -1,68 +0,0 @@ -lightning-createinvoice -- Low-level invoice creation -===================================================== - -SYNOPSIS --------- - -**createinvoice** *invstring* *label* *preimage* - -DESCRIPTION ------------ - -The **createinvoice** RPC command signs and saves an invoice into the database. - -- **invstring** (string): The bolt11 form, but the final signature is ignored. Minimal sanity checks are done. (Note: if **experimental-offers** is enabled, *invstring* can actually be an unsigned bolt12 invoice). -- **label** (one of): A unique string or number (which is treated as a string, so `01` is different from `1`); it is never revealed to other nodes on the lightning network, but it can be used to query the status of this invoice.: - - (string) - - (integer) -- **preimage** (hex): The preimage to supply upon successful payment of the invoice. - -RETURN VALUE ------------- - -(Note: the return format is the same as lightning-listinvoices(7)). -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. -- **status** (string) (one of "paid", "expired", "unpaid"): Whether it has been paid, or can no longer be paid. -- **description** (string): Description extracted from **bolt11** or **bolt12**. -- **expires\_at** (u64): UNIX timestamp of when invoice expires (or expired). -- **created\_index** (u64): 1-based index indicating order this invoice was created in. *(added v23.08)* -- **bolt11** (string, optional): The bolt11 string (always present unless **bolt12** is). -- **bolt12** (string, optional): The bolt12 string instead of **bolt11** (**experimental-offers** only). -- **amount\_msat** (msat, optional): The amount of the invoice (if it has one). -- **pay\_index** (u64, optional): Incrementing id for when this was paid (**status** *paid* only). -- **amount\_received\_msat** (msat, optional): Amount actually received (**status** *paid* only). -- **paid\_at** (u64, optional): UNIX timestamp of when invoice was paid (**status** *paid* only). -- **paid\_outpoint** (object, optional): Outpoint this invoice was paid with (**status** *paid* only). *(added v23.11)*: - - **txid** (txid): ID of the transaction that paid the invoice (**status** *paid* only). *(added v23.11)* - - **outnum** (u32): The 0-based output number of the transaction that paid the invoice (**status** *paid* only). *(added v23.11)* -- **payment\_preimage** (secret, optional): The proof of payment: SHA256 of this **payment\_hash**. -- **local\_offer\_id** (hex, optional) (always 64 characters): The *id* of our offer which created this invoice (**experimental-offers** only). -- **invreq\_payer\_note** (string, optional): The optional *invreq\_payer\_note* from invoice\_request which created this invoice (**experimental-offers** only). - -ERRORS ------- - -On failure, an error is returned and no invoice is created. If the lightning process fails before responding, the caller should use lightning-listinvoices(7) to query whether this invoice was created or not. - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 900: An invoice with the given *label* already exists. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-invoice(7), lightning-listinvoices(7), lightning-delinvoice(7), lightning-getroute(7), lightning-sendpay(7), lightning-offer(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-createonion.7.md b/doc/lightning-createonion.7.md deleted file mode 100644 index 7ed75a9dea5c..000000000000 --- a/doc/lightning-createonion.7.md +++ /dev/null @@ -1,186 +0,0 @@ -lightning-createonion -- Low-level command to create a custom onion -=================================================================== - -SYNOPSIS --------- - -**createonion** *hops* *assocdata* [*session\_key*] [*onion\_size*] - -DESCRIPTION ------------ - -The **createonion** RPC command allows the caller to create a custom onion with custom payloads at each hop in the route. A custom onion can be used to implement protocol extensions that are not supported by Core Lightning directly. - -- **hops** (array of objects): A JSON list of dicts, each specifying a node and the payload destined for that node.: - - **pubkey** (pubkey): Node pubkey. - - **payload** (hex): Payload to be sent to the node. -- **assocdata** (hex): The associated data that the onion should commit to. If the onion is to be used to send a payment later it MUST match the `payment_hash` of the payment in order to be valid. -- **session\_key** (secret, optional): Can be used to specify a secret that is used to generate the shared secrets used to encrypt the onion for each hop. It should only be used for testing or if a specific shared secret is important. If not specified it will be securely generated internally, and the shared secrets will be returned. -- **onion\_size** (u16, optional): A size different from the default payment onion (1300 bytes). May be used for custom protocols like trampoline routing. - -EXAMPLE USAGE -------------- - -The following is an example of a 3 hop onion: - -```json -[ - { - "pubkey": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "payload": "11020203e904017b06080000670000010001" - }, { - "pubkey": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "payload": "11020203e804017506080000670000030001" - }, { - "pubkey": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199", - "payload": "07020203e8040175" - } -] -``` - -The *hops* parameter is very similar to the result from `getroute` however it needs to be modified slightly. The following is the `getroute` response from which the above *hops* parameter was generated: - -```json -[ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "channel": "103x2x1", - "direction": 1, - "msatoshi": 1002, - "amount_msat": "1002msat", - "delay": 21, - }, { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "channel": "103x1x1", - "direction": 0, - "msatoshi": 1001, - "amount_msat": "1001msat", - "delay": 15, - }, { - "id": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199", - "channel": "103x3x1", - "direction": 0, - "msatoshi": 1000, - "amount_msat": "1000msat", - "delay": 9, - } -] -``` - - - Notice that the payload in the *hops* parameter is the hex-encoded TLV of the parameters in the `getroute` response, with length prepended as a `bigsize_t`. - - Except for the pubkey, the values are shifted left by one, i.e., the 1st payload in `createonion` corresponds to the 2nd set of values from `getroute`. - - The final payload is a copy of the last payload sans `channel` - -These rules are directly derived from the onion construction. Please refer BOLT 04 for details and rationale. - -The following example is the result of calling *createonion* with the above hops parameter: - - ```json - { - "onion": "0003f3f80d2142b953319336d2fe4097[...]6af33fcf4fb113bce01f56dd62248a9e5fcbbfba35c", - "shared_secrets": [ - "88ce98c73e4d9293ab1797b0a913fe9bca0213a566252047d01b8af6da871f3e", - "4474d296810e57bd460ef8b83d2e7d288321f8a99ff7686f87384699747bcfc4", - "2a862e4123e01799a732be487fbce297f7dc7cc1467e410f18369cfee476adc2" - ] - } -``` - -The `onion` corresponds to 1366 hex-encoded bytes. Each shared secret consists of 32 hex-encoded bytes. Both arguments can be passed on to **sendonion**. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:createonion#1", - "method": "createonion", - "params": { - "hops": [ - { - "pubkey": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "payload": "e4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - }, - { - "pubkey": "0324653eac434488002cc06bbfb7f10fe18991e35f9fe4302dbea6d2353dc0ab1c", - "payload": "e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - }, - { - "pubkey": "027f31ebc5462c1fdce1b737ecff52d37d75dea43ce11c74d25aa297165faa2007", - "payload": "e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - }, - { - "pubkey": "032c0b7cf95324a07d05398b240174dc0c2be444d96b159aa6c7f7b1e668680991", - "payload": "e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - }, - { - "pubkey": "02edabbd16b41c8371b92ef2f04c1185b4f03b6dcd52ba9b78d9d7c89c8f221145", - "payload": "e30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } - ], - "assocdata": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", - "onion_size": 1301 - } -} -{ - "id": "example:createonion#2", - "method": "createonion", - "params": { - "hops": [ - { - "pubkey": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "payload": "0cfdb000084869207468657265" - } - ], - "assocdata": "36bf44cc8d80498b95eb05e36ae5811206d3a1d8b5c8d59bbcad035d386a4de8" - } -} -``` - -RETURN VALUE ------------- - -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.: - - (secret, optional): The shared secret with this hop. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "onion": "00034c3f9e11d92555260db3ee4ba0378a645d01c2556451f4289a1d9b43c7afa9a4f9ecc7010dafb26787bb583c514c3b3990d40c8168b1046659d7bc2512d2f1ee0afd2b87c42de2b70102b649634d211b38049593dbb6ed8ee8f93f0b9ff23cd9654c1341137711ce67751d40867cc90c290a9446be2b8a5a43641d4549505b13e807b4240b5b82ffaf22cb534cff01be46db3985ac83b7db465fbd86d4c8d472f60678946c71eca97dd5db732fe5a6d3765e5a5afad72f035207173e7eaaa0da4f0a4540472c7dd269a030428ae586a61b2a70a428055c3848427d2a2e8bd521aadbaf79d56ea39df63c059772e026d57f0b6844c1ab99e936beadf42aaa78193b05f7380e242258deeaa90db316a943d311ef4f2a08f422422c9da454f9666742ad61c6ae003bce83cf6243adf64a728ea50bdaf129ab2ac70e1988a117609cbefc01c884f86b2494349d1067f5cf17760cdab6ae076631693147e8712412d4f0b17cf288b394fd9e29419156ee629966553c2e7598631cbf7493820388eef1ae9f4d2f9da88872e8afbbedb3b46cd7c461cbe4c5491dc6f4a68bc244584bc79b1bb227c869fae16dab4b16412523c984d3ed2b872f63b95a62f66563d2b03c3d1b5fff0290411b293569ce8435b96b447be776b49395a8d94f48cb2f7699a38e8de58d6fff04075d226dcac07668512b6d2c20d4c49d03ad300a52769e4ebbacf97378633126958df1817effc12fd679723123df244fd9b5421f8a2aedb9a8b6fb4049e3a7cae3985059081239bea38351f0c90ed5a0ff45cc492e6ab353e4c13d22ff48912d6ecfda711edfb88dc0767ecfc5dddf8fb0e112a538aeee55c0f73b3b8afc4f40ef3588eabde5b95344a4525adf67841dd67b1db10da180fb346e0bd2958f095d011827063c42361964f8ac2c356d2ec1868a9498dcd6b5915a4df4601c58fcbeb688e14de61300f13183c154b3320cc8e80042a46f22d796f56ff1fdd7e28440c05f14b960c1d0a7c627b09295112bcb635b0e2447a9374fafc4a23ceaf9de4d10b29b2f6cabd7f0c7706cf0404452681d7372d559b644627b2695960deb3b4ae57028e0164b29d5ef9e701d3122b6a5715c502e1dca5252e8c215ed754b01a193041ad9751ed2fff1b55991e256edd6099a38004a367ad097c7caf953da302201263715517f6d32cff57969be994df42fd6cadb649e3c738be798f779aaf4c07cada6bf1e4115b74e2670baf4b1592c70b10a6c043b6606b428b3f79545dc8e9783c876e5402909858f9c604963c37fbc477137c8908e6cfa11ece18c8784a6f25428a5ee1e91d0095fe310d6a91139a7c5c6624bbfcaa15ee847a25b06f57332917f68526a6317f575792e9bcba8576a96bc5859b1f2a00fd8ab08a5ac4ab71833b0b711d1f120cbdb374bcedcdcbeba3806644f5082ec737a945221f5d99562fcbb02a43beeafb16ceecd4e35f06a04c9ff9f4f33725ab62cf22c36650280e4cfb9e150a2c4ebee7785108522e8ecb4682d2d751168e7597299346c3a5e885e36eda66b9a1112997111135767972d771b02c1a36c1d1fb1ce539ecfb98e9e1d8f8fdbf89aec28ad34ff5c00c1a4a8c59848dc8b64c0e65f6f10122e60b4adc1cfc602f49d6cfbdd54be6b0951d3f9cafe8cdd0428f9ce6994844e92d8b72d44edda623bad428b398f88643c3904bda16dd15e886ca4ef6ea7f1450744ac38ffce902569d2e9026bcedd6d0ee54aceabda22bf2de72cba89e6c274064619e32a1192cf2d78b56cf497f7785a6d599de9f8383d1f66f47fc385dc569ee1f08ddbbc7f1aeb0a0126fc4020d948dda10255f11e776db7a037059a40fde38a2ee0c0ce49c7f3df175881bf12371fa72fec3fba657107892a97efe41dcc18aeecd99f3e46c33cf42c2a0ba8b75cf000", - "shared_secrets": [ - "ccf2512684e2508cb4a842393757e6040b7d25e29d3a2031f29d00a000af6128", - "d4cec39fe6287d41165bf5c608b0c720a411208a83c64c805a012c86662a2e5a", - "91bc712ebd4a900e05830394ca8b1f1168777ecdd6996029d96ec8838b9903b9", - "93c373dcb14dc36ababa3e0c5c55869a667ca175e09913a98c3be67e6af97e16", - "b2642a5770a6b61ade071fdf69d3ea365cf48434fc2a2c399512778821a33e5c" - ] -} -{ - "onion": "0002cdce4bfaa9faa2c060afafe001b80bde07fc670e882c063a80b4738d5f78c9351825c6461cdfcd4fe4144d3b51f63da6351b28dd49c7bfdb0b4f7d8bda4ad0d99699eda39e551084c0a095746c358d1dc6d2eec8082f2aa2f69ae8f61b1f1437ae0ed673078fec6c0510a34058167ad1a34e819a3813d4cf27b2c4917a8c6ca3d70c3381a2a41b4c1b4540adf0e922e25f57d1cfc3064f29cfec4c17244160121975cab59b44c83b4a4905bf7ebfbd308de376334bf86d8aa92c674f7bcfec85680d73e9fee72642c98c603128e358c86e0bc88a60aaebc2637441a57261c61c6be145f00f2fc56164a6495f4b52d3172cb0ef52e91fa0d32a9ae2502d17433bda58d93fbc24a70ec6b5e740952a61404c7370eafe52599c7ee52e77b1cda87c46da98d2ff0d02fe09db5adcb2d2e9bcd083ef58392907b8a21681fa4ea1e4806b4676656457fea000fa504f9b4d159fe8b241266ac91dcc0351053c6dcc1493a6b02bed652cc8b92a8470c98924ebfde6ddc5cf7fd75f6e83a7350642053b70d4834179c30eb56d8c86656cda784daf3b6cd125779bec51099301e3f79f78d85d0454aef8bf5f9058491881b73e99b662b64080cd3eb16fd7f9d9640c18738736cfc15f391232b7df92f46ceb5abf08732ff833e9409ee541d7c926f7a0fe3e233d3eee4a63b65ab23b7c835b7cdd809ddfac8abb1df471fa66a54092815aa41e6fc1a026b86c5675d39c4e8c5c4b4acd48534165239f5634b9e828a7f9df94efcd2a39045efdee4d2f006a63ae828e6e90e3610c522085da6e0198141d6e501d83aba32057f4e59f9b7dfb0bf949c5ef91917cb54561d45a9e7ead049c57deb62d14ba6e18f5d7b0fb9f15e97bf5bd9f909f99c86c787357946654b87c489d34245d07fbb72119166e338b608a4178b452695235dd96bf7fd338e29a9f054ec1a63a442e12602d2329834297f6a197d8a377d608f402f0bcc936f45f33c8d2f9d40e5aef41816dd883add81ca20f1e0631457fe00aa2bd75c9165ffcd96c100c1db83a53aeee23d59f2a542ee3ba39ba62298ddfbd9ecfafd6b5d2121eb003ee23a2ebb8c6b6b687f42492c962510c5acf5231ff96635eba37354559ba39b042d9b6883cac662f418d7c62f9908b2a67964af5e5471804f7684e0d582b8bfec99816bb3442cca1d1fe4efd75d573ebf09fa9cad811063864fb14be4a7768ec2ddb118a77969e986c6584c4b20f8622941ca73d73562857d36e17a46a68d6e10147aaefff1ffb9809f0652a5f760148ed33550661b63c8176d5679e701c221d8a49d4062eb04010ea74cc1132fbeb8934c6e582ba2a16162b7e9171f95bce4ec3e339e70c781f95aaca406cd718b74397658fdefdd093486664be7ed13efa437012f1f57f9f1f4fb4eef7501ccf0e0ac4edc01fde138038c4dd65cb5c3291ad02a6728d6761b1afa35d49bd6ef117012bdd9bd6ee8a175620feb2249aa18d6175351b4bfc2b2b4fd57ff52f5969b109aa9b6cb2cde8f350917c0da2da1bc3d52eb0c7e6080b8f69c5783f2ed26feceb05ba4e7ed66676041d03d0acd3dd6343a85ac0b9c36f9640ddd0db884822f98dc42ea7911a6938dc14ba19d3d25a2b2f82794a2b5dd751dc856d7a9ccdb2d351a0b84e7030fa925ac949a37594f3aa2ba28ae5155b0aaac9c6820b8888d0b8a9db148513b9e3dbde68333ac30a0720289b6a0145d88629d49e76a6d3538330c5aececc9d54127b0a5a0e92d5a5a73beb71132c208b589cab61d53ed357c907929198c559426ae729b374a803dd3321a45ccca39efd39eddaba6e79a2f8911bdf74e18733dc7efc51132b5608d97fd2d0f22fa8961de04cdf6d0dbfbab21e362e7abaef3976f993088aa97ed3f1f4bcf3fffb012f583558bd2f15face9cba20b3e6754b70", - "shared_secrets": [ - "3f53c03f98eb83db88ff97c2c4004051ce23265ed2414a7aebf7a3e7078839ab" - ] -} -``` - -AUTHOR ------- - -Christian Decker <> is mainly responsible. - -SEE ALSO --------- - -lightning-sendonion(7), lightning-getroute(7) - -RESOURCES ---------- - -Main web site: - -[BOLT 04](https://github.com/lightning/bolts/blob/master/04-onion-routing.md) diff --git a/doc/lightning-createrune.7.md b/doc/lightning-createrune.7.md deleted file mode 100644 index bc3094e87063..000000000000 --- a/doc/lightning-createrune.7.md +++ /dev/null @@ -1,256 +0,0 @@ -lightning-createrune -- Command to Create/Update Rune for Authorizing Remote Peer Access -======================================================================================== - -SYNOPSIS --------- - -**createrune** [*rune*] [*restrictions*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -The **createrune** RPC command creates a base64 string called a *rune* which can be used to access commands on this node. Each *rune* contains a unique id (a number starting at 0), and can have restrictions inside it. Nobody can remove restrictions from a rune: if you try, the rune will be rejected. There is no limit on how many runes you can issue; the node simply decodes and checks them as they are received. - -Oh, I almost forgot. Runes can also be invoked like in ancient times with the **invokerune** command. Feel the magical powers of a rune by invoking it. - -- **rune** (string, optional): If supplied, the restrictions are simple appended to that *rune* (it doesn't need to be a rune belonging to this node). If not supplied, a new *rune* is constructed, with a new unique id. -- **restrictions** (one of, optional): It can be the string `readonly`, or an array of restrictions. - Each restriction is an array of one or more alternatives, such as "method is listpeers", or "method is listpeers OR time is before 2023".: - - (array of arrays): Alternatives use a simple language to examine the command which is being run: - * time: the current UNIX time, e.g. "time<1656759180". - * id: the node\_id of the peer, e.g. "id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605". - * method: the command being run, e.g. "method=withdraw". - * per: how often the rune can be used, with suffix "sec" (default), "min", "hour", "day" or "msec", "usec" or "nsec". e.g. "per=5sec". - * rate: the rate limit, per minute, e.g. "rate=60" is equivalent to "per=1sec". - * pnum: the number of parameters. e.g. "pnum<2". - * pnameX: the parameter named X (with any punctuation like `_` removed). e.g. "pnamedestination=1RustyRX2oai4EYYDpQGWvEL62BBGqN9T". - * parrN: the N'th parameter. e.g. "parr0=1RustyRX2oai4EYYDpQGWvEL62BBGqN9T". - - (array of strings) - - (string, optional) - - (always "readonly"): A rune which allows most *get* and *list* commands, and the *summary* command. - -RESTRICTION FORMAT ------------------- - -Restrictions are one or more alternatives. Each alternative is *name* *operator* *value*. The valid names are shown above. - -Note that if a value contains `\`, it must be preceeded by another `\` to form valid JSON: -* `=`: passes if equal ie. identical. e.g. `method=withdraw` -* `/`: not equals, e.g. `method/withdraw` -* `^`: starts with, e.g. `id^024b9a1fa8e006f1e3937f` -* `$`: ends with, e.g. `id$381df1cc449605`. -* `~`: contains, e.g. `id~006f1e3937f65f66c40`. -* `<`: is a decimal integer, and is less than. e.g. `time<1656759180` -* `>`: is a decimal integer, and is greater than. e.g. `time>1656759180` -* `{`: preceeds in alphabetical order (or matches but is shorter), - e.g. `id{02ff`. -* `}`: follows in alphabetical order (or matches but is longer), - e.g. `id}02ff`. -* `#`: a comment, ignored, e.g. `dumb example#`. -* `!`: only passes if the *name* does *not* exist. e.g. `pnamedestination!`. -Every other operator except `#` fails if *name* does not exist! - -EXAMPLE USAGE -------------- - -This creates a fresh rune which can do anything: - -```shell -$ lightning-cli commando-rune -{ - "rune": "KUhZzNlECC7pYsz3QVbF1TqjIUYi3oyESTI7n60hLMs9MA==", - "unique_id": "0" -} -``` -We can add restrictions to that rune, like so: - -```shell -$ lightning-cli commando-rune rune=KUhZzNlECC7pYsz3QVbF1TqjIUYi3oyESTI7n60hLMs9MA== restrictions=readonly -{ - "rune": "NbL7KkXcPQsVseJ9TdJNjJK2KsPjnt_q4cE_wvc873I9MCZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl", - "unique_id": "0" -} -``` -The "readonly" restriction is a short-cut for two restrictions: - -1. `["method^list", "method^get", "method=summary"]`: You may call list, get or summary. -2. `["method/listdatastore"]`: But not listdatastore: that contains sensitive stuff! - -We can do the same manually, like so: - -```shell -$ lightning-cli commando-rune rune=KUhZzNlECC7pYsz3QVbF1TqjIUYi3oyESTI7n60hLMs9MA== restrictions='[["method^list", "method^get", "method=summary"],["method/listdatastore"]]' -{ - "rune": "NbL7KkXcPQsVseJ9TdJNjJK2KsPjnt_q4cE_wvc873I9MCZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl", - "unique_id": "0" -} -``` -Let's create a rune which lets a specific peer (024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605) run "listpeers" on themselves: - -```shell -$ lightning-cli commando-rune restrictions='[["id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605"],["method=listpeers"],["pnum=1"],["pnameid=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605","parr0=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605"]]' -{ - "rune": "FE8GHiGVvxcFqCQcClVRRiNE_XEeLYQzyG2jmqto4jM9MiZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDV8cGFycjA9MDI0YjlhMWZhOGUwMDZmMWUzOTM3ZjY1ZjY2YzQwOGU2ZGE4ZTFjYTcyOGVhNDMyMjJhNzM4MWRmMWNjNDQ5NjA1", - "unique_id": "2" -} -``` -This allows `listpeers` with 1 argument (`pnum=1`), which is either by name (`pnameid`), or position (`parr0`). We could shorten this in several ways: either allowing only positional or named parameters, or by testing the start of the parameters only. Here's an example which only checks the first 9 bytes of the `listpeers` parameter: - -```shell -$ lightning-cli commando-rune restrictions='[["id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605"],["method=listpeers"],["pnum=1"],["pnameid^024b9a1fa8e006f1e393", "parr0^024b9a1fa8e006f1e393"]' - { - "rune": "fTQnfL05coEbiBO8SS0cvQwCcPLxE9c02pZCC6HRVEY9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5Mw==", - "unique_id": "3" -} -``` -Before we give this to our peer, let's add two more restrictions: that it only be usable for 24 hours from now (`time<`), and that it can only be used twice a minute (`rate=2`). `date +%s` can give us the current time in seconds: - -```shell -$ lightning-cli commando-rune rune=fTQnfL05coEbiBO8SS0cvQwCcPLxE9c02pZCC6HRVEY9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5Mw== restrictions='[["time<'$(($(date +%s) + 24*60*60))'","rate=2"]]' -{ - "rune": "tU-RLjMiDpY2U0o3W1oFowar36RFGpWloPbW9-RuZdo9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5MyZ0aW1lPDE2NTY5MjA1MzgmcmF0ZT0y", - "unique_id": "3" -} -``` -You can also use lightning-decode(7) to examine runes you have been given: - -```shell -$ lightning-cli decode tU-RLjMiDpY2U0o3W1oFowar36RFGpWloPbW9-RuZdo9MyZpZD0wMjRiOWExZmE4ZTAwNmYxZTM5MzdmNjVmNjZjNDA4ZTZkYThlMWNhNzI4ZWE0MzIyMmE3MzgxZGYxY2M0NDk2MDUmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjRiOWExZmE4ZTAwNmYxZTM5M3xwYXJyMF4wMjRiOWExZmE4ZTAwNmYxZTM5MyZ0aW1lPDE2NTY5MjA1MzgmcmF0ZT0y -{ - "type": "rune", - "unique_id": "3", - "string": "b54f912e33220e9636534a375b5a05a306abdfa4451a95a5a0f6d6f7e46e65da:=3&id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605&method=listpeers&pnum=1&pnameid^024b9a1fa8e006f1e393|parr0^024b9a1fa8e006f1e393&time<1656920538&rate=2", - "restrictions": [ - { - "alternatives": [ - "id=024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605" - ], - "summary": "id (of commanding peer) equal to '024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605'" - }, - { - "alternatives": [ - "method=listpeers" - ], - "summary": "method (of command) equal to 'listpeers'" - }, - { - "alternatives": [ - "pnum=1" - ], - "summary": "pnum (number of command parameters) equal to 1" - }, - { - "alternatives": [ - "pnameid^024b9a1fa8e006f1e393", - "parr0^024b9a1fa8e006f1e393" - ], - "summary": "pnameid (object parameter 'id') starts with '024b9a1fa8e006f1e393' OR parr0 (array parameter #0) starts with '024b9a1fa8e006f1e393'" - }, - { - "alternatives": [ - "time<1656920538" - ], - "summary": "time (in seconds since 1970) less than 1656920538 (approximately 19 hours 18 minutes from now)" - }, - { - "alternatives": [ - "rate=2" - ], - "summary": "rate (max per minute) equal to 2" - } - ], - "valid": true -} -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:createrune#1", - "method": "createrune", - "params": { - "restrictions": [ - [ - "method/getinfo" - ] - ] - } -} -{ - "id": "example:createrune#2", - "method": "createrune", - "params": { - "restrictions": "readonly" - } -} -{ - "id": "example:createrune#3", - "method": "createrune", - "params": [ - "enX0sTpHB8y1ktyTAF80CnEvGetG340Ne3AGItudBS49NCZwbnVtPTA=", - [ - [ - "rate=3" - ] - ] - ] -} -``` - -SHARING RUNES -------------- - -Because anyone can add a restriction to a rune, you can always turn a normal rune into a read-only rune, or restrict access for 30 minutes from the time you give it to someone. Adding restrictions before sharing runes is best practice. - -If a rune has a ratelimit, any derived rune will have the same id, and thus will compete for that ratelimit. You might want to consider adding a tighter ratelimit to a rune before sharing it, so you will keep the remainder. For example, if you rune has a limit of 60 times per minute, adding a limit of 5 times per minute and handing that rune out means you can still use your original rune 55 times per minute. - -RETURN VALUE ------------- - -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). - -The following warnings may also be returned: - -- **warning\_unrestricted\_rune**: A warning shown when runes are created with powers that could drain your node. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "rune": "S5f-BKt3rR-cvJmujdpDCUQm_XLahfB4iQuDlwqMJiQ9MCZtZXRob2QvZ2V0aW5mbw==", - "unique_id": "0" -} -{ - "rune": "oVkzoiQ67VCU1h_aRjPqCeWktGX54ARDsqqQgDL-uMs9MCZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl", - "unique_id": "1" -} -{ - "rune": "_h2eKjoK7ITAF-JQ1S5oum9oMQesrz-t1FR9kDChRB49NCZwbnVtPTAmcmF0ZT0z", - "unique_id": "2" -} -``` - -AUTHOR ------- - -Rusty Russell <> wrote the original Python commando.py plugin, the in-tree commando plugin, and this manual page. - -Shahana Farooqui <> is mainly responsible for migrating commando-rune to createrune. - -SEE ALSO --------- - -lightning-commando-rune(7), lightning-checkrune(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-datastore.7.md b/doc/lightning-datastore.7.md deleted file mode 100644 index c9aef86f44d9..000000000000 --- a/doc/lightning-datastore.7.md +++ /dev/null @@ -1,147 +0,0 @@ -lightning-datastore -- Command for storing (plugin) data -======================================================== - -SYNOPSIS --------- - -**datastore** *key* [*string*] [*hex*] [*mode*] [*generation*] - -DESCRIPTION ------------ - -The **datastore** RPC command allows plugins to store data in the Core Lightning database, for later retrieval. - -- **key** (one of): A key can either have children or a value, never both: parents are created and removed automatically.: - - (array of strings): An array of values to form a hierarchy (though a single value is treated as a one-element array). Using the first element of the key as the plugin name (e.g. `[ 'summary' ]`) is recommended. - - (string, optional) - - (string) -- **string** (string, optional): Data to be saved in string format. -- **hex** (hex, optional): Data to be saved in hex format. -- **mode** (string, optional) (one of "must-create", "must-replace", "create-or-replace", "must-append", "create-or-append"): Write mode to determine how the record is updated: - * `must-create`: fails if it already exists. - * `must-replace`: fails if it doesn't already exist. - * `create-or-replace`: never fails. - * `must-append`: must already exist, append this to what's already there. - * `create-or-append`: append if anything is there, otherwise create. The default is `must-create`. -- **generation** (u64, optional): If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with *mode* `must-replace` or `must-append`. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:datastore#1", - "method": "datastore", - "params": { - "key": [ - "test_libplugin", - "name" - ], - "string": "foobar", - "hex": null, - "mode": "must-replace", - "generation": null - } -} -{ - "id": "example:datastore#2", - "method": "datastore", - "params": { - "key": "somekey", - "string": null, - "hex": "61", - "mode": "create-or-append", - "generation": null - } -} -{ - "id": "example:datastore#3", - "method": "datastore", - "params": { - "key": [ - "a", - "d", - "e", - "f", - "g" - ], - "string": "somedatatostoreinthedatastore", - "hex": null, - "mode": null, - "generation": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **key** (array of strings): - - (string, optional): Part of the key added to the datastore. -- **generation** (u64, optional): The number of times this has been updated. -- **hex** (hex, optional): The hex data which has been added to the datastore. -- **string** (string, optional): The data as a string, if it's valid utf-8. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "key": [ - "test_libplugin", - "name" - ], - "generation": 1, - "hex": "666f6f626172", - "string": "foobar" -} -{ - "key": [ - "somekey" - ], - "generation": 3, - "hex": "736f6d6564617461", - "string": "somedata" -} -{ - "key": [ - "a", - "d", - "e", - "f", - "g" - ], - "generation": 0, - "hex": "736f6d6564617461746f73746f7265696e7468656461746173746f7265", - "string": "somedatatostoreinthedatastore" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- 1202: The key already exists (and mode said it must not) -- 1203: The key does not exist (and mode said it must) -- 1204: The generation was wrong (and generation was specified) -- 1205: The key has children already. -- 1206: One of the parents already exists with a value. -- -32602: invalid parameters - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listdatastore(7), lightning-deldatastore(7), lightning-datastoreusage(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-datastoreusage.7.md b/doc/lightning-datastoreusage.7.md deleted file mode 100644 index 5b76b40e9d2a..000000000000 --- a/doc/lightning-datastoreusage.7.md +++ /dev/null @@ -1,98 +0,0 @@ -lightning-datastoreusage -- Command for listing datastore usage info -==================================================================== - -SYNOPSIS --------- - -**datastoreusage** [*key*] - -DESCRIPTION ------------ - -Command *added* in v23.11. - -The **datastoreusage** RPC command allows the caller to fetch the total bytes that are stored under a certain *key* (or from the root), including the size of the *key*. - -All descendants of the *key* (or root) are taken into account. - -- **key** (one of, optional): - - (array of strings): Key is an array of values (though a single value is treated as a one-element array). Used as the starting point to traverse the datastore. - - (string, optional) - - (string) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:datastoreusage#1", - "method": "datastoreusage", - "params": { - "key": null - } -} -{ - "id": "example:datastoreusage#2", - "method": "datastoreusage", - "params": { - "key": "a" - } -} -{ - "id": "example:datastoreusage#3", - "method": "datastoreusage", - "params": { - "key": [ - "a", - "thisissomelongkeythattriestostore46bytesofdata" - ] - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **datastoreusage** is returned. It is an object containing: - -- **key** (string): The key from which the database was traversed. *(added v23.11)* -- **total\_bytes** (u64): The total bytes that are stored under the *key*, including the all descendants data and the size of the keys themselves. *(added v23.11)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "datastoreusage": { - "key": "[]", - "total_bytes": 0 - } -} -{ - "datastoreusage": { - "key": "[a]", - "total_bytes": 32 - } -} -{ - "datastoreusage": { - "key": "[a,thisissomelongkeythattriestostore46bytesofdata]", - "total_bytes": 77 - } -} -``` - -AUTHOR ------- - -Peter Neuroth <> is mainly responsible. - -SEE ALSO --------- - -lightning-datastore(7), lightning-deldatastore(7), lightning-listdatastore(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-decode.7.md b/doc/lightning-decode.7.md deleted file mode 100644 index caedb6d458fc..000000000000 --- a/doc/lightning-decode.7.md +++ /dev/null @@ -1,369 +0,0 @@ -lightning-decode -- Command for decoding an invoice string (low-level) -====================================================================== - -SYNOPSIS --------- - -**decode** *string* - -DESCRIPTION ------------ - -Command *added* in v23.05. - -The **decode** RPC command checks and parses `bolt11`, `bolt12`, `rune` or `emergency_recover`. It may decode other formats in future. - -- **string** (string): Value to be decoded: - * a *bolt11* or *bolt12* string (optionally prefixed by `lightning:` or `LIGHTNING:`) as specified by the BOLT 11 and BOLT 12 specifications. - * a *rune* as created by lightning-commando-rune(7). - * an *emergency\_recover* string generated by hsmtool like `lightning-hsmtool getemergencyrecover `. It holds `emergency.recover` contents and starts with `clnemerg1`. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:decode#1", - "method": "decode", - "params": [ - "zm0x_eLgHexaTvZn3Cz7gb_YlvrlYGDo_w4BYlR9SS09MSZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl" - ] -} -{ - "id": "example:decode#2", - "method": "decode", - "params": [ - "lnbcrt1m1pja0f2hsp5xyssdvdsu24dmmesrt6x84wfrm4mscsnzq7hl2suzeu90wy6g53qpp5zyyu3anwfsfl64pewe0tg7j28map2wwnhvaam5nt70rlwxa0cegqdqjv3jhxcmjd9c8g6t0dcxqyjw5qcqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqvuqqqqgqqqqqqqlgqqqq86qqqc9qxpqysgq7u4f99u4kepagme27t5c3gdl7czlnjaw7kxryxgm87w2j02j3g94r2vrukhpgedhcdkcdec27m7jrl2lvcr6uh3rdv9lgpz0vc0zcfcqnugjdw" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **type** (string) (one of "bolt12 offer", "bolt12 invoice", "bolt12 invoice\_request", "bolt11 invoice", "rune", "emergency recover"): What kind of object it decoded to. -- **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) (always 64 characters): The id we use to identify this offer. - - **offer\_description** (string): The description of the purpose of the offer. - - **offer\_node\_id** (pubkey): Public key of the offering node. - - **offer\_chains** (array of hashs, optional): Which blockchains this offer is for (missing implies bitcoin mainnet only).: - - (hash, optional): The genesis blockhash. - - **offer\_metadata** (hex, optional): Any metadata the creator of the offer includes. - - **offer\_currency** (string, optional) (always 3 characters): ISO 4217 code of the currency (missing implies Bitcoin). - - **currency\_minor\_unit** (u32, optional): The number of decimal places to apply to amount (if currency known). - - **offer\_amount** (u64, optional): The amount in the `offer_currency` adjusted by `currency_minor_unit`, if any. - - **offer\_amount\_msat** (msat, optional): The amount in bitcoin (if specified, and no `offer_currency`). - - **offer\_issuer** (string, optional): The description of the creator of the offer. - - **offer\_features** (hex, optional): The feature bits of the offer. - - **offer\_absolute\_expiry** (u64, optional): UNIX timestamp of when this offer expires. - - **offer\_quantity\_max** (u64, optional): The maximum quantity (or, if 0, means any quantity). - - **offer\_paths** (array of objects, optional): Paths to the destination.: - - **first\_node\_id** (pubkey): The (presumably well-known) public key of the start of the path. - - **blinding** (pubkey): Blinding factor for this path. - - **path** (array of objects): An individual path.: - - **blinded\_node\_id** (pubkey): Node\_id of the hop. - - **encrypted\_recipient\_data** (hex): Encrypted TLV entry for this hop. - - **offer\_recurrence** (object, optional): How often to this offer should be used.: - - **time\_unit** (u32): The BOLT12 time unit. - - **period** (u32): How many `time_unit` per payment period. - - **time\_unit\_name** (string, optional): The name of `time_unit` (if valid). - - **basetime** (u64, optional): Period starts at this UNIX timestamp. - - **start\_any\_period** (u64, optional): You can start at any period (only if `basetime` present). - - **limit** (u32, optional): Maximum period number for recurrence. - - **paywindow** (object, optional): When within a period will payment be accepted. The default is prior and during the period.: - - **seconds\_before** (u32): Seconds prior to period start. - - **seconds\_after** (u32): Seconds after to period start. - - **proportional\_amount** (boolean, optional) (always *true*): Amount should be scaled if paid after period start. - - **unknown\_offer\_tlvs** (array of objects, optional): Any extra fields we didn't know how to parse.: - - **type** (u64): The type. - - **length** (u64): The length. - - **value** (hex): The value. - - the following warnings are possible: - - **warning\_unknown\_offer\_currency**: The currency code is unknown (so no `currency_minor_unit`). - -If **type** is "bolt12 offer", and **valid** is *false*: - - the following warnings are possible: - - **warning\_missing\_offer\_node\_id**: `offer_node_id` is not present. - - **warning\_invalid\_offer\_description**: `offer_description` is not valid UTF8. - - **warning\_missing\_offer\_description**: `offer_description` is not present. - - **warning\_invalid\_offer\_currency**: `offer_currency_code` is not valid UTF8. - - **warning\_invalid\_offer\_issuer**: `offer_issuer` is not valid UTF8. - -If **type** is "bolt12 invoice\_request", and **valid** is *true*: - - **offer\_description** (string): The description of the purpose of the offer. - - **offer\_node\_id** (pubkey): Public key of the offering node. - - **invreq\_metadata** (hex): The payer-provided blob to derive invreq\_payer\_id. - - **invreq\_payer\_id** (hex): The payer-provided key. - - **signature** (bip340sig): BIP-340 signature of the `invreq_payer_id` on this invoice\_request. - - **offer\_id** (hex, optional) (always 64 characters): The id we use to identify this offer. - - **offer\_chains** (array of hexs, optional): Which blockchains this offer is for (missing implies bitcoin mainnet only).: - - (hex, optional) (always 64 characters): The genesis blockhash. - - **offer\_metadata** (hex, optional): Any metadata the creator of the offer includes. - - **offer\_currency** (string, optional) (always 3 characters): ISO 4217 code of the currency (missing implies Bitcoin). - - **currency\_minor\_unit** (u32, optional): The number of decimal places to apply to amount (if currency known). - - **offer\_amount** (u64, optional): The amount in the `offer_currency` adjusted by `currency_minor_unit`, if any. - - **offer\_amount\_msat** (msat, optional): The amount in bitcoin (if specified, and no `offer_currency`). - - **offer\_issuer** (string, optional): The description of the creator of the offer. - - **offer\_features** (hex, optional): The feature bits of the offer. - - **offer\_absolute\_expiry** (u64, optional): UNIX timestamp of when this offer expires. - - **offer\_quantity\_max** (u64, optional): The maximum quantity (or, if 0, means any quantity). - - **offer\_paths** (array of objects, optional): Paths to the destination.: - - **first\_node\_id** (pubkey): The (presumably well-known) public key of the start of the path. - - **blinding** (pubkey): Blinding factor for this path. - - **path** (array of objects): An individual path.: - - **blinded\_node\_id** (pubkey): Node\_id of the hop. - - **encrypted\_recipient\_data** (hex): Encrypted TLV entry for this hop. - - **offer\_recurrence** (object, optional): How often to this offer should be used.: - - **time\_unit** (u32): The BOLT12 time unit. - - **period** (u32): How many `time_unit` per payment period. - - **time\_unit\_name** (string, optional): The name of `time_unit` (if valid). - - **basetime** (u64, optional): Period starts at this UNIX timestamp. - - **start\_any\_period** (u64, optional): You can start at any period (only if `basetime` present). - - **limit** (u32, optional): Maximum period number for recurrence. - - **paywindow** (object, optional): When within a period will payment be accepted. The default is prior and during the period.: - - **seconds\_before** (u32): Seconds prior to period start. - - **seconds\_after** (u32): Seconds after to period start. - - **proportional\_amount** (boolean, optional) (always *true*): Amount should be scaled if paid after period start. - - **invreq\_chain** (hex, optional) (always 64 characters): Which blockchain this offer is for (missing implies bitcoin mainnet only). - - **invreq\_amount\_msat** (msat, optional): The amount the invoice should be for. - - **invreq\_features** (hex, optional): The feature bits of the invoice\_request. - - **invreq\_quantity** (u64, optional): The number of items to invoice for. - - **invreq\_payer\_note** (string, optional): A note attached by the payer. - - **invreq\_recurrence\_counter** (u32, optional): Which number request this is for the same invoice. - - **invreq\_recurrence\_start** (u32, optional): When we're requesting to start an invoice at a non-zero period. - - **unknown\_invoice\_request\_tlvs** (array of objects, optional): Any extra fields we didn't know how to parse.: - - **type** (u64): The type. - - **length** (u64): The length. - - **value** (hex): The value. - - the following warnings are possible: - - **warning\_unknown\_offer\_currency**: The currency code is unknown (so no `currency_minor_unit`). - -If **type** is "bolt12 invoice\_request", and **valid** is *false*: - - the following warnings are possible: - - **warning\_invalid\_offer\_description**: `offer_description` is not valid UTF8. - - **warning\_missing\_offer\_description**: `offer_description` is not present. - - **warning\_invalid\_offer\_currency**: `offer_currency_code` is not valid UTF8. - - **warning\_invalid\_offer\_issuer**: `offer_issuer` is not valid UTF8. - - **warning\_missing\_invreq\_metadata**: `invreq_metadata` is not present. - - **warning\_missing\_invreq\_payer\_id**: `invreq_payer_id` is not present. - - **warning\_invalid\_invreq\_payer\_note**: `invreq_payer_note` is not valid UTF8. - - **warning\_missing\_invoice\_request\_signature**: `signature` is not present. - - **warning\_invalid\_invoice\_request\_signature**: Incorrect `signature`. - -If **type** is "bolt12 invoice", and **valid** is *true*: - - **offer\_description** (string): The description of the purpose of the offer. - - **offer\_node\_id** (pubkey): Public key of the offering node. - - **invreq\_metadata** (hex): The payer-provided blob to derive invreq\_payer\_id. - - **invreq\_payer\_id** (hex): The payer-provided key. - - **invoice\_paths** (array of objects): Paths to pay the destination.: - - **first\_node\_id** (pubkey): The (presumably well-known) public key of the start of the path. - - **blinding** (pubkey): Blinding factor for this path. - - **payinfo** (object): - - **fee\_base\_msat** (msat): Basefee for path. - - **fee\_proportional\_millionths** (u32): Proportional fee for path. - - **cltv\_expiry\_delta** (u32): CLTV delta for path. - - **features** (hex): Features allowed for path. - - **path** (array of objects): An individual path.: - - **blinded\_node\_id** (pubkey): Node\_id of the hop. - - **encrypted\_recipient\_data** (hex): Encrypted TLV entry for this hop. - - **invoice\_created\_at** (u64): The UNIX timestamp of invoice creation. - - **invoice\_payment\_hash** (hex) (always 64 characters): The hash of the *payment\_preimage*. - - **invoice\_amount\_msat** (msat): The amount required to fulfill invoice. - - **signature** (bip340sig): BIP-340 signature of the `offer_node_id` on this invoice. - - **offer\_id** (hex, optional) (always 64 characters): The id we use to identify this offer. - - **offer\_chains** (array of hexs, optional): Which blockchains this offer is for (missing implies bitcoin mainnet only).: - - (hex, optional) (always 64 characters): The genesis blockhash. - - **offer\_metadata** (hex, optional): Any metadata the creator of the offer includes. - - **offer\_currency** (string, optional) (always 3 characters): ISO 4217 code of the currency (missing implies Bitcoin). - - **currency\_minor\_unit** (u32, optional): The number of decimal places to apply to amount (if currency known). - - **offer\_amount** (u64, optional): The amount in the `offer_currency` adjusted by `currency_minor_unit`, if any. - - **offer\_amount\_msat** (msat, optional): The amount in bitcoin (if specified, and no `offer_currency`). - - **offer\_issuer** (string, optional): The description of the creator of the offer. - - **offer\_features** (hex, optional): The feature bits of the offer. - - **offer\_absolute\_expiry** (u64, optional): UNIX timestamp of when this offer expires. - - **offer\_quantity\_max** (u64, optional): The maximum quantity (or, if 0, means any quantity). - - **offer\_paths** (array of objects, optional): Paths to the destination.: - - **first\_node\_id** (pubkey): The (presumably well-known) public key of the start of the path. - - **blinding** (pubkey): Blinding factor for this path. - - **path** (array of objects): An individual path.: - - **blinded\_node\_id** (pubkey): Node\_id of the hop. - - **encrypted\_recipient\_data** (hex): Encrypted TLV entry for this hop. - - **offer\_recurrence** (object, optional): How often to this offer should be used.: - - **time\_unit** (u32): The BOLT12 time unit. - - **period** (u32): How many `time_unit` per payment period. - - **time\_unit\_name** (string, optional): The name of `time_unit` (if valid). - - **basetime** (u64, optional): Period starts at this UNIX timestamp. - - **start\_any\_period** (u64, optional): You can start at any period (only if `basetime` present). - - **limit** (u32, optional): Maximum period number for recurrence. - - **paywindow** (object, optional): When within a period will payment be accepted. The default is prior and during the period.: - - **seconds\_before** (u32): Seconds prior to period start. - - **seconds\_after** (u32): Seconds after to period start. - - **proportional\_amount** (boolean, optional) (always *true*): Amount should be scaled if paid after period start. - - **invreq\_chain** (hex, optional) (always 64 characters): Which blockchain this offer is for (missing implies bitcoin mainnet only). - - **invreq\_amount\_msat** (msat, optional): The amount the invoice should be for. - - **invreq\_features** (hex, optional): The feature bits of the invoice\_request. - - **invreq\_quantity** (u64, optional): The number of items to invoice for. - - **invreq\_payer\_note** (string, optional): A note attached by the payer. - - **invreq\_recurrence\_counter** (u32, optional): Which number request this is for the same invoice. - - **invreq\_recurrence\_start** (u32, optional): When we're requesting to start an invoice at a non-zero period. - - **invoice\_relative\_expiry** (u32, optional): The number of seconds after *invoice\_created\_at* when this expires. - - **invoice\_fallbacks** (array of objects, optional): Onchain addresses.: - - **version** (u8): Segwit address version. - - **hex** (hex): Raw encoded segwit address. - - **address** (string, optional): Bech32 segwit address. - - **invoice\_features** (hex, optional): The feature bits of the invoice. - - **invoice\_node\_id** (pubkey, optional): The id to pay (usually the same as offer\_node\_id). - - **invoice\_recurrence\_basetime** (u64, optional): The UNIX timestamp to base the invoice periods on. - - **unknown\_invoice\_tlvs** (array of objects, optional): Any extra fields we didn't know how to parse.: - - **type** (u64): The type. - - **length** (u64): The length. - - **value** (hex): The value. - - the following warnings are possible: - - **warning\_unknown\_offer\_currency**: The currency code is unknown (so no `currency_minor_unit`). - -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. - - the following warnings are possible: - - **warning\_invalid\_offer\_description**: `offer_description` is not valid UTF8. - - **warning\_missing\_offer\_description**: `offer_description` is not present. - - **warning\_invalid\_offer\_currency**: `offer_currency_code` is not valid UTF8. - - **warning\_invalid\_offer\_issuer**: `offer_issuer` is not valid UTF8. - - **warning\_missing\_invreq\_metadata**: `invreq_metadata` is not present. - - **warning\_invalid\_invreq\_payer\_note**: `invreq_payer_note` is not valid UTF8. - - **warning\_missing\_invoice\_paths**: `invoice_paths` is not present. - - **warning\_missing\_invoice\_blindedpay**: `invoice_blindedpay` is not present. - - **warning\_missing\_invoice\_created\_at**: `invoice_created_at` is not present. - - **warning\_missing\_invoice\_payment\_hash**: `invoice_payment_hash` is not present. - - **warning\_missing\_invoice\_amount**: `invoice_amount` is not present. - - **warning\_missing\_invoice\_recurrence\_basetime**: `invoice_recurrence_basetime` is not present. - - **warning\_missing\_invoice\_node\_id**: `invoice_node_id` is not present. - - **warning\_missing\_invoice\_signature**: `signature` is not present. - - **warning\_invalid\_invoice\_signature**: Incorrect `signature`. - -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 `created_at`. - - **payee** (pubkey): The public key of the recipient. - - **payment\_hash** (hash): The hash of the *payment\_preimage*. - - **signature** (signature): Signature of the *payee* on this invoice. - - **min\_final\_cltv\_expiry** (u32): The minimum CLTV delay for the final node. - - **amount\_msat** (msat, optional): Amount the invoice asked for. - - **description** (string, optional): The description of the purpose of the purchase. - - **description\_hash** (hash, optional): The hash of the description, in place of *description*. - - **payment\_secret** (secret, optional): The secret to hand to the payee node. - - **features** (hex, optional): The features bitmap for this invoice. - - **payment\_metadata** (hex, optional): The payment\_metadata to put in the payment. - - **fallbacks** (array of objects, optional): Onchain addresses.: - - **type** (string) (one of "P2PKH", "P2SH", "P2WPKH", "P2WSH", "P2TR"): The address type (if known). - - **hex** (hex): Raw encoded address. - - **addr** (string, optional): The address in appropriate format for *type*. - - **routes** (array of arrays, optional): Route hints to the *payee*.: - - (array of objects): Hops in the route. - - **pubkey** (pubkey): The public key of the node. - - **short\_channel\_id** (short\_channel\_id): A channel to the next peer. - - **fee\_base\_msat** (msat): The base fee for payments. - - **fee\_proportional\_millionths** (u32): The parts-per-million fee for payments. - - **cltv\_expiry\_delta** (u32): The CLTV delta across this hop. - - **extra** (array of objects, optional): Any extra fields we didn't know how to parse.: - - **tag** (string) (always 1 characters): The bech32 letter which identifies this field. - - **data** (string): The bech32 data for this field. - -If **type** is "rune", and **valid** is *true*: - - **valid** (boolean) (always *true*) - - **string** (string): The string encoding of the rune. - - **restrictions** (array of objects): Restrictions built into the rune: all must pass.: - - **alternatives** (array of strings): Each way restriction can be met: any can pass.: - - (string, optional): The alternative of form fieldname condition fieldname. - - **summary** (string): Human-readable summary of this restriction. - - **unique\_id** (string, optional): Unique id (always a numeric id on runes we create). - - **version** (string, optional): Rune version, not currently set on runes we create. - -If **type** is "rune", and **valid** is *false*: - - **valid** (boolean) (always *false*) - - **hex** (hex, optional): The raw rune in hex. - - the following warnings are possible: - - **warning\_rune\_invalid\_utf8**: The rune contains invalid UTF-8 strings. - -If **type** is "emergency recover", and **valid** is *true*: - - **decrypted** (hex): The decrypted value of the provided bech32 of emergency.recover. *(added v23.11)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "type": "rune", - "unique_id": "1", - "string": "ce6d31fde2e01dec5a4ef667dc2cfb81bfd896fae56060e8ff0e0162547d492d:=1&method^list|method^get|method=summary&method/listdatastore", - "restrictions": [ - { - "alternatives": [ - "method^list", - "method^get", - "method=summary" - ], - "summary": "method (of command) starts with 'list' OR method (of command) starts with 'get' OR method (of command) equal to 'summary'" - }, - { - "alternatives": [ - "method/listdatastore" - ], - "summary": "method (of command) unequal to 'listdatastore'" - } - ], - "valid": true -} -{ - "type": "bolt11 invoice", - "currency": "bcrt", - "created_at": 1708631383, - "expiry": 604800, - "payee": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "amount_msat": 100000000, - "description": "description", - "min_final_cltv_expiry": 5, - "payment_secret": "312106b1b0e2aaddef301af463d5c91eebb86213103d7faa1c167857b89a4522", - "features": "02024100", - "routes": [ - [ - { - "pubkey": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "short_channel_id": "103x1x0", - "fee_base_msat": 1000, - "fee_proportional_millionths": 1000, - "cltv_expiry_delta": 6 - } - ] - ], - "payment_hash": "1109c8f66e4c13fd5439765eb47a4a3efa1539d3bb3bddd26bf3c7f71bafc650", - "signature": "3045022100f72a929795b643d46f2af2e988a1bff605f9cbaef58c32191b3f9ca93d528a0b022051a983e5ae1465b7c36d86e70af6fd21fd5f6607ae5e236b0bf4044f661e2c27", - "valid": true -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-pay(7), lightning-offer(7), lightning-fetchinvoice(7), lightning-sendinvoice(7), lightning-commando-rune(7) - -RESOURCES ---------- - -[BOLT #11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) - -[BOLT #12](https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md) -(experimental, [bolt](https://github.com/lightning/bolts) #798) - -Main web site: diff --git a/doc/lightning-decodepay.7.md b/doc/lightning-decodepay.7.md deleted file mode 100644 index 31a5171419d4..000000000000 --- a/doc/lightning-decodepay.7.md +++ /dev/null @@ -1,104 +0,0 @@ -lightning-decodepay -- Command for decoding a bolt11 string (low-level) -======================================================================= - -SYNOPSIS --------- - -**decodepay** *bolt11* [*description*] - -DESCRIPTION ------------ - -Command *added* in v23.05. - -The **decodepay** RPC command checks and parses a *bolt11* string as specified by the BOLT 11 specification. - -- **bolt11** (string): Bolt11 invoice to decode. -- **description** (string, optional): Description of the invoice to decode. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:decodepay#1", - "method": "decodepay", - "params": { - "bolt11": "lnbcrt110u1pjmr5lzsp5sfjyj3xn7ux592k36hmmt4ax98n6lgct22wvj54yck0upcmep63qpp5qu436g855lr40ftdt7csatk5pdvtdzzfmfqluwtvm0fds95jsadqdpq0pzk7s6j8y69xjt6xe25j5j4g44hsatdxqyjw5qcqp99qxpqysgquwma3zrw4cd8e8j4u9uh4gxukaacckse64kx2l9dqv8rvrysdq5r5dt38t9snqj9u5ar07h2exr4fg56wpudkhkk7gtxlyt72ku5fpqqd4fnlk", - "description": null - } -} -``` - -RETURN VALUE ------------- - -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*. -- **payee** (pubkey): The public key of the recipient. -- **payment\_hash** (hash): The hash of the *payment\_preimage*. -- **signature** (signature): Signature of the *payee* on this invoice. -- **min\_final\_cltv\_expiry** (u32): The minimum CLTV delay for the final node. -- **amount\_msat** (msat, optional): Amount the invoice asked for. -- **description** (string, optional): The description of the purpose of the purchase. -- **description\_hash** (hash, optional): The hash of the description, in place of *description*. -- **payment\_secret** (hash, optional): The secret to hand to the payee node. -- **features** (hex, optional): The features bitmap for this invoice. -- **payment\_metadata** (hex, optional): The payment\_metadata to put in the payment. -- **fallbacks** (array of objects, optional): Onchain addresses.: - - **type** (string) (one of "P2PKH", "P2SH", "P2WPKH", "P2WSH", "P2TR"): The address type (if known). - - **hex** (hex): Raw encoded address. - - **addr** (string, optional): The address in appropriate format for *type*. -- **routes** (array of arrays, optional): Route hints to the *payee*.: - - (array of objects): Hops in the route. - - **pubkey** (pubkey): The public key of the node. - - **short\_channel\_id** (short\_channel\_id): A channel to the next peer. - - **fee\_base\_msat** (msat): The base fee for payments. - - **fee\_proportional\_millionths** (u32): The parts-per-million fee for payments. - - **cltv\_expiry\_delta** (u32): The CLTV delta across this hop. -- **extra** (array of objects, optional): Any extra fields we didn't know how to parse.: - - **tag** (string) (always 1 characters): The bech32 letter which identifies this field. - - **data** (string): The bech32 data for this field. - -Technically, the *description* field is optional if a *description\_hash* field is given, but in this case **decodepay** will only succeed if the optional *description* field is passed and matches the *description\_hash*. In practice, these are currently unused. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "currency": "bcrt", - "created_at": 1706152930, - "expiry": 604800, - "payee": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount_msat": 11000000, - "description": [ - "XEoCR94SIz6UIRUEkxum." - ], - "min_final_cltv_expiry": 5, - "payment_secret": "82644944d3f70d42aad1d5f7b5d7a629e7afa30b529cc952a4c59fc0e3790ea2", - "features": "02024100", - "payment_hash": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "signature": "3045022100e3b7d8886eae1a7c9e55e1797aa0dcb77b8c5a19d56c657cad030e360c90682802203a35713acb098245e53a37faeac98754a29a7078db5ed6f2166f917e55b94484" -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-pay(7), lightning-getroute(7), lightning-sendpay(7) - -RESOURCES ---------- - -[BOLT #11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) - -Main web site: diff --git a/doc/lightning-deldatastore.7.md b/doc/lightning-deldatastore.7.md deleted file mode 100644 index c6b8c5f78f5c..000000000000 --- a/doc/lightning-deldatastore.7.md +++ /dev/null @@ -1,101 +0,0 @@ -lightning-deldatastore -- Command for removing (plugin) data -============================================================ - -SYNOPSIS --------- - -**deldatastore** *key* [*generation*] - -DESCRIPTION ------------ - -The **deldatastore** RPC command allows plugins to delete data it has stored in the Core Lightning database. - -The command fails if the *key* isn't present, or if *generation* is specified and the generation of the data does not exactly match. - -- **key** (one of): - - (array of strings): Key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically. - - (string, optional) - - (string) -- **generation** (u64, optional): If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode `must-replace` or `must-append`. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:deldatastore#1", - "method": "deldatastore", - "params": { - "key": "otherkey", - "generation": 1 - } -} -{ - "id": "example:deldatastore#2", - "method": "deldatastore", - "params": { - "key": [ - "a" - ], - "generation": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **key** (array of strings): - - (string, optional): Part of the key added to the datastore. -- **generation** (u64, optional): The number of times this has been updated. -- **hex** (hex, optional): The hex data which has removed from the datastore. -- **string** (string, optional): The data as a string, if it's valid utf-8. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "key": [ - "otherkey" - ], - "generation": 1, - "hex": "6f746865726461746161", - "string": "otherdataa" -} -{ - "key": [ - "a" - ], - "generation": 0, - "hex": "6176616c", - "string": "aval" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- 1200: the key does not exist -- 1201: the key does exist, but the generation is wrong -- -32602: invalid parameters - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listdatastore(7), lightning-datastore(7), lightning-datastoreusage(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-delexpiredinvoice.7.md b/doc/lightning-delexpiredinvoice.7.md deleted file mode 100644 index c0b5083e950f..000000000000 --- a/doc/lightning-delexpiredinvoice.7.md +++ /dev/null @@ -1,54 +0,0 @@ -lightning-delexpiredinvoice -- Command for removing expired invoices -==================================================================== - -SYNOPSIS --------- - -**delexpiredinvoice** [*maxexpirytime*] - -DESCRIPTION ------------ - -The **delexpiredinvoice** RPC command removes all invoices that have expired on or before the given *maxexpirytime*. - -- **maxexpirytime** (u64, optional): Invoice expiry time in seconds. If not specified then all expired invoices are deleted. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:delexpiredinvoice#1", - "method": "delexpiredinvoice", - "params": { - "maxexpirytime": null - } -} -``` - -RETURN VALUE ------------- - -On success, an empty object is returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -``` - -AUTHOR ------- - -ZmnSCPxj <> is mainly responsible. - -SEE ALSO --------- - -lightning-delinvoice(7), lightning-autoclean-status(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-delforward.7.md b/doc/lightning-delforward.7.md deleted file mode 100644 index 4377a26878ed..000000000000 --- a/doc/lightning-delforward.7.md +++ /dev/null @@ -1,77 +0,0 @@ -lightning-delforward -- Command for removing a forwarding entry -=============================================================== - -SYNOPSIS --------- - -**delforward** *in\_channel* *in\_htlc\_id* *status* - -DESCRIPTION ------------ - -The **delforward** RPC command removes a single forward from **listforwards**, using the uniquely-identifying *in\_channel* and *in\_htlc\_id* (and, as a sanity check, the *status*) given by that command. - -This command is mainly used by the *autoclean* plugin (see lightningd- config(7)), As these database entries are only kept for your own analysis, removing them has no effect on the running of your node. - -- **in\_channel** (short\_channel\_id): Only the matching forwards on the given inbound channel are deleted. Note: for **listforwards** entries without an *in\_htlc\_id* entry (no longer created in v22.11, but can exist from older versions), a value of 18446744073709551615 can be used, but then it will delete *all* entries without *in\_htlc\_id* for this *in\_channel* and *status*. -- **in\_htlc\_id** (u64): The unique HTLC id the sender gave this (not present if incoming channel was closed before upgrade to v22.11). -- **status** (string) (one of "settled", "local\_failed", "failed"): The status of the forward to delete. You cannot delete forwards which have status *offered* (i.e. are currently active). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:delforward#1", - "method": "delforward", - "params": { - "in_channel": "103x1x0", - "in_htlc_id": 2, - "status": "local_failed" - } -} -{ - "id": "example:delforward#2", - "method": "delforward", - "params": [ - "103x1x0", - 1, - "failed" - ] -} -``` - -RETURN VALUE ------------- - -On success, an empty object is returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -{} -``` - -ERRORS ------- - -The following errors may be reported: - -- 1401: The forward specified does not exist. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-autoclean(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-delinvoice.7.md b/doc/lightning-delinvoice.7.md deleted file mode 100644 index 953fdd7d4d39..000000000000 --- a/doc/lightning-delinvoice.7.md +++ /dev/null @@ -1,123 +0,0 @@ -lightning-delinvoice -- Command for removing an invoice (or just its description) -================================================================================= - -SYNOPSIS --------- - -**delinvoice** *label* *status* [*desconly*] - -DESCRIPTION ------------ - -The **delinvoice** RPC command removes an invoice with *status* as given in **listinvoices**, or with *desconly* set, removes its description. - -- **label** (one of): Label of the invoice to be deleted.: - - (string) - - (u64) -- **status** (string) (one of "paid", "expired", "unpaid"): Label of the invoice to be deleted. The caller should be particularly aware of the error case caused by the *status* changing just before this command is invoked! -- **desconly** (boolean, optional): If set to True, the invoice is not deleted, but has its description removed (this can save space with very large descriptions, as would be used with lightning-invoice(7) *deschashonly*. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:delinvoice#1", - "method": "delinvoice", - "params": { - "label": "invlabel2", - "status": "unpaid", - "desconly": true - } -} -{ - "id": "example:delinvoice#2", - "method": "delinvoice", - "params": { - "label": "keysend-1708640419.666098582", - "status": "paid", - "desconly": null - } -} -``` - -RETURN VALUE ------------- - -Note: The return is the same as an object from lightning-listinvoice(7). -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. -- **created\_index** (u64): 1-based index indicating order this invoice was created in. *(added v23.08)* -- **status** (string) (one of "paid", "expired", "unpaid"): State of invoice. -- **expires\_at** (u64): UNIX timestamp when invoice expires (or expired). -- **bolt11** (string, optional): BOLT11 string. -- **bolt12** (string, optional): BOLT12 string. -- **amount\_msat** (msat, optional): The amount required to pay this invoice. -- **description** (string, optional): Description used in the invoice. -- **updated\_index** (u64, optional): 1-based index indicating order this invoice was changed (only present if it has changed since creation). *(added v23.08)* - -If **bolt12** is present: - - **local\_offer\_id** (hex, optional): Offer for which this invoice was created. - - **invreq\_payer\_note** (string, optional): The optional *invreq\_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. - - **payment\_preimage** (secret): SHA256 of this is the *payment\_hash* offered in the invoice. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "label": "invlabel2", - "bolt11": "lnbcrt420p1pja0tefsp5vvzg40t4g24l0eqk0jch7mc6jm3ec52ts8w8gwzpwtx9c8nv05rspp533e9csxurt7j9sn2cx7hsn6m00475qgrau8sux5r7djpdedwy2fshp5xqsmrtgfcwsnhxcxmf3tuc65kl6fxvqhvujfmxw2kpeh95yy2x8sxqyjw5qcqp99qxpqysgqgfjrz4q5zcq2lluxxg9h475mq2d3w0tpdstm5274zmhadjl8cqapylfskzk96apka5599a2flm90rmavsk7q8mhh87yle3sgh5vrlycq72fern", - "payment_hash": "8c725c40dc1afd22c26ac1bd784f5b7bebea0103ef0f0e1a83f36416e5ae2293", - "amount_msat": 42, - "status": "unpaid", - "expires_at": 1709238697, - "created_index": 3 -} -{ - "label": "keysend-1708640419.666098582", - "bolt11": "lnbcrt1pja0j9rsp5tg3zvj846gcdzw394njazq40s946sq2ur3hkl4xu4xudtjdtckxspp5fuunrfzsnyz2uxjmg2n95mqhghv4fpvv2kud3kvq4fkys3vmzu5sdqvddjhjum9dejqxqyjw5qcqp99qxpqysgqwt7r0gjlgt7zrfldc3um9myfc36acpqnsdn77c2m42facjtps30yufc5nsmwzhgexlj59f6xa5hess6e3tqrxynt9fejzj3rrshddtcqnappmj", - "payment_hash": "4f3931a4509904ae1a5b42a65a6c1745d954858c55b8d8d980aa6c48459b1729", - "status": "paid", - "pay_index": 1, - "amount_received_msat": 10000000, - "paid_at": 1708640419, - "payment_preimage": "b760af47f456a217e8dfda21a282f1f78c903487c1b21b3b318135f75aa3bf11", - "description": "keysend", - "expires_at": 1709245219, - "created_index": 1, - "updated_index": 1 -} -``` - -ERRORS ------- - -The following errors may be reported: - -- -1: Database error. -- 905: An invoice with that label does not exist. -- 906: The invoice *status* does not match the parameter. An error object will be returned as error *data*, containing *current\_status* and *expected\_status* fields. This is most likely due to the *status* of the invoice changing just before this command is invoked. -- 908: The invoice already has no description, and *desconly* was set. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listinvoice(7), lightning-waitinvoice(7), lightning-invoice(7), lightning-delexpiredinvoice(7), lightning-autoclean-status(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-delpay.7.md b/doc/lightning-delpay.7.md deleted file mode 100644 index 87c8f8f55eb9..000000000000 --- a/doc/lightning-delpay.7.md +++ /dev/null @@ -1,160 +0,0 @@ -lightning-delpay -- Command for removing a completed or failed payment -====================================================================== - -SYNOPSIS --------- - -**delpay** *payment\_hash* *status* [*partid* *groupid*] - -DESCRIPTION ------------ - -The **delpay** RPC command deletes a payment with the given `payment_hash` if its status is either `complete` or `failed`. If *partid* and *groupid* are not specified, all payment parts with matchin status are deleted. - -- **payment\_hash** (hash): The unique identifier of a payment. -- **status** (string) (one of "complete", "failed"): Expected status of the payment. Only deletes if the payment status matches. Deleting a `pending` payment will return an error. -- **partid** (u64, optional): Specific partid to delete (must be paired with *groupid*). -- **groupid** (u64, optional): Specific groupid to delete (must be paired with *partid*). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:delpay#1", - "method": "delpay", - "params": { - "payment_hash": "4fa2f1b001067ec06d7f95b8695b8acd9ef04c1b4d1110e3b94e1fa0687bb1e0", - "status": "complete" - } -} -{ - "id": "example:delpay#2", - "method": "delpay", - "params": [ - "c9d4547473d0d646f1fdd8ca7f01803e4d31ceab01df33c79456f9c24b04034e", - "failed" - ] -} -{ - "id": "example:delpay#3", - "method": "delpay", - "params": { - "payment_hash": "bbc35e0a46d1483292a4ff8d4daaceaab8c3c084dd835be4128785b52e469c64", - "status": "complete", - "groupid": 1, - "partid": 1 - } -} -``` - -RETURN VALUE ------------- - -The returned format is the same as lightning-listsendpays(7). If the payment is a multi-part payment (MPP) the command return a list of payments will be returned -- one payment object for each partid. -On success, an object containing **payments** is returned. It is an array of objects, where each object contains: - -- **created\_index** (u64): 1-based index indicating order this payment was created in. *(added v23.11)* -- **id** (u64): Old synonym for created\_index. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **status** (string) (one of "pending", "failed", "complete"): Status of the payment. -- **amount\_sent\_msat** (msat): The amount we actually sent, including fees. -- **created\_at** (u64): The UNIX timestamp showing when this payment was initiated. -- **partid** (u64, optional): Unique ID within this (multi-part) payment. -- **destination** (pubkey, optional): The final destination of the payment if known. -- **amount\_msat** (msat, optional): The amount the destination received, if known. -- **updated\_index** (u64, optional): 1-based index indicating order this payment was changed (only present if it has changed since creation). *(added v23.11)* -- **completed\_at** (u64, optional): The UNIX timestamp showing when this payment was completed. -- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment\_hash. -- **payment\_preimage** (secret, optional): Proof of payment. -- **label** (string, optional): The label, if given to sendpay. -- **bolt11** (string, optional): The bolt11 string (if pay supplied one). -- **bolt12** (string, optional): The bolt12 string (if supplied for pay: **experimental-offers** only). -- **erroronion** (hex, optional): The error onion returned on failure, if any. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "payments": [ - { - "id": 1, - "payment_hash": "8dfd6538eeb33811c9114a75f792a143728d7f05643f38c3d574d3097e8910c0", - "destination": "0219f8900ee78a89f050c24d8b69492954f9fdbabed753710845eb75d3a75a5880", - "msatoshi": 1000, - "amount_msat": "1000msat", - "msatoshi_sent": 1000, - "amount_sent_msat": "1000msat", - "created_at": 1596224858, - "status": "complete", - "payment_preimage": "35bd4e2b481a1a84a22215b5372672cf81460a671816960ddb206464359e1822", - "bolt11": "lntb10n1p0jga20pp53h7k2w8wkvuprjg3ff6l0y4pgdeg6lc9vsln3s74wnfsjl5fzrqqdqdw3jhxazldahx2xqyjw5qcqp2sp5wut5jnhr6n7jd5747ky2g5flmw7hgx9yjnqzu60ps2jf6f7tc0us9qy9qsqu2a0k37nckl62005p69xavlkydkvhnypk4dphffy4x09zltwh9437ad7xkl83tefdarzhu5t30ju5s56wlrg97qkx404pq3srfc425cq3ke9af" - } - ] -} -{ - "payments": [ - { - "created_index": 2, - "id": 2, - "payment_hash": "c9d4547473d0d646f1fdd8ca7f01803e4d31ceab01df33c79456f9c24b04034e", - "groupid": 1, - "updated_index": 2, - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "amount_msat": 100000, - "amount_sent_msat": 100002, - "created_at": 1706316468, - "completed_at": 1706316471, - "status": "failed", - "bolt11": "lnbcrt1u1pjmg54nsp5ke626txv6wwwmqmpuy63t3jnu9hqxwj880zsfkkj7jjqagdaz2sqpp5e829garn6rtydu0amr987qvq8exnrn4tq80n83u52muuyjcyqd8qdq8v3jhxccxqyjw5qcqp99qxpqysgqalktfwy9svsamvvvrzzzzpdaa4rh7n6s5p7t9lx7qv0raz4vnm9knkh5ury3u5cmnhx2gms98nxkclm3833uhjrlnzmftc685vz2f0gpfnjy4y" - } - ] -} -{ - "payments": [ - { - "created_index": 3, - "id": 3, - "payment_hash": "bbc35e0a46d1483292a4ff8d4daaceaab8c3c084dd835be4128785b52e469c64", - "groupid": 1, - "updated_index": 3, - "partid": 1, - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "amount_msat": 100000, - "amount_sent_msat": 102100, - "created_at": 1708641193, - "completed_at": 1708641194, - "status": "complete", - "payment_preimage": "a6ebb1cfbf69e76200f196f1eafd28a3d850633499c223a7eb7a7dba3b995286" - } - ] -} -``` - -ERRORS ------- - -On failure, an error is returned. If the lightning process fails before responding, the -caller should use lightning-listsentpays(7) or lightning-listpays(7) to query whether this payment was deleted or not. - -The following error codes may occur: - -- -32602: Parameter missed or malformed; -- 211: Payment status mismatch. Check the correct status via **paystatus**; -- 208: Payment with payment\_hash not found. - -AUTHOR ------- - -Vincenzo Palazzo <> is mainly responsible. - -SEE ALSO --------- - -lightning-listpays(7), lightning-listsendpays(7), lightning-paystatus(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-deprecations.7.md b/doc/lightning-deprecations.7.md deleted file mode 100644 index 9b55e86f422b..000000000000 --- a/doc/lightning-deprecations.7.md +++ /dev/null @@ -1,63 +0,0 @@ -lightning-deprecations -- Command to enable/disable deprecated APIs -=================================================================== - -SYNOPSIS --------- - -**deprecations** *enable* - -DESCRIPTION ------------ - -Command *added* in v24.02. - -The **deprecations** RPC command is used to override global config option `allow-deprecated-apis` for further RPC commands on this same connection. This can be useful for developer testing to ensure you don't accidentally rely on deprecated features. - -- **enable** (boolean): Flag to enable or disable deprecated APIs. Setting it to `false` will neither accept deprecated parameters or commands, nor output deprecated fields. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:deprecations#1", - "method": "deprecations", - "params": { - "enable": false - } -} -``` - -RETURN VALUE ------------- - -On success, an empty object is returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters. - -AUTHOR ------- - -Rusty Russell <> wrote the initial version of this man page. - -SEE ALSO --------- - -lightningd-config(5), lightning-notifications(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-disableinvoicerequest.7.md b/doc/lightning-disableinvoicerequest.7.md deleted file mode 100644 index 8d3f598f46ae..000000000000 --- a/doc/lightning-disableinvoicerequest.7.md +++ /dev/null @@ -1,48 +0,0 @@ -lightning-disableinvoicerequest -- Command for removing an invoice request -========================================================================== - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - -**disableinvoicerequest** *invreq\_id* - -DESCRIPTION ------------ - -Command *added* in v22.11. - -The **disableinvoicerequest** RPC command disables an invoice\_request, so that no further invoices will be accepted (and thus, no further payments made).. - -We currently don't support deletion of invoice\_requests, so they are not forgotten entirely (there may be payments which refer to this invoice\_request). - -- **invreq\_id** (string): A specific invoice can be disabled by providing the `invreq_id`, which is presented by lightning-invoicerequest(7). - -RETURN VALUE ------------- - -Note: the returned object is the same format as **listinvoicerequest**. -On success, an object is returned, containing: - -- **invreq\_id** (hash): The SHA256 hash of all invoice\_request fields less than 160. -- **active** (boolean) (always *false*): Whether the invoice\_request is currently active. -- **single\_use** (boolean): Whether the invoice\_request will become inactive after we pay an invoice for it. -- **bolt12** (string): The bolt12 string starting with lnr. -- **used** (boolean): Whether the invoice\_request has already been used. -- **label** (string, optional): The label provided when creating the invoice\_request. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-invoicerequest(7), lightning-listinvoicerequest(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-disableoffer.7.md b/doc/lightning-disableoffer.7.md deleted file mode 100644 index d77e723f500d..000000000000 --- a/doc/lightning-disableoffer.7.md +++ /dev/null @@ -1,72 +0,0 @@ -lightning-disableoffer -- Command for removing an offer -======================================================= - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - -**disableoffer** *offer\_id* - -DESCRIPTION ------------ - -The **disableoffer** RPC command disables an offer, so that no further 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). - -- **offer\_id** (hash): The id we use to identify this offer. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:disableoffer#1", - "method": "disableoffer", - "params": { - "offer_id": "713a16ccd4eb10438bdcfbc2c8276be301020dd9d489c530773ba64f3b33307d" - } -} -``` - -RETURN VALUE ------------- - -Note: the returned object is the same format as **listoffers**. -On success, an object is returned, containing: - -- **offer\_id** (hash): The merkle hash of the offer. -- **active** (boolean) (always *false*): Whether the offer can produce invoices/payments. -- **single\_use** (boolean): Whether the offer is disabled after first successful use. -- **bolt12** (string): The bolt12 string representing this offer. -- **used** (boolean): Whether the offer has had an invoice paid / payment made. -- **label** (string, optional): The label provided when offer was created. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "offer_id": "053a5c566fbea2681a5ff9c05a913da23e45b95d09ef5bd25d7d408f23da7084", - "active": false, - "single_use": false, - "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqvqcdgq2z9pk7enxv4jjqen0wgs8yatnw3ujz83qkc6rvp4j28rt3dtrn32zkvdy7efhnlrpr5rp5geqxs783wtlj550qs8czzku4nk3pqp6m593qxgunzuqcwkmgqkmp6ty0wyvjcqdguv3pnpukedwn6cr87m89t74h3auyaeg89xkvgzpac70z3m9rn5xzu28c", - "used": false -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-offer(7), lightning-listoffers(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-disconnect.7.md b/doc/lightning-disconnect.7.md deleted file mode 100644 index 4ca0407410e5..000000000000 --- a/doc/lightning-disconnect.7.md +++ /dev/null @@ -1,83 +0,0 @@ -lightning-disconnect -- Command for disconnecting from another lightning node -============================================================================= - -SYNOPSIS --------- - -**disconnect** *id* [*force*] - -DESCRIPTION ------------ - -The disconnect RPC command closes an existing connection to a peer, identified by *id*, in the Lightning Network, as long as it doesn't have an active channel. - -- **id** (pubkey): The public key of the peer to terminate the connection. It can be discovered in the output of the listpeers command, which returns a set of peers: - { - 'peers': - [ - { - 'id': '0563aea81...', - 'connected': true, - ... - } - ] - } -- **force** (boolean, optional): If set to True, it will disconnect even with an active channel. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:disconnect#1", - "method": "disconnect", - "params": { - "id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "force": false - } -} -{ - "id": "example:disconnect#2", - "method": "disconnect", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "force": true - } -} -``` - -RETURN VALUE ------------- - -On success, an empty object is returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -{} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. - -AUTHOR ------- - -Michael Hawkins <>. - -SEE ALSO --------- - -lightning-connect(1), lightning-listpeers(1) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-emergencyrecover.7.md b/doc/lightning-emergencyrecover.7.md deleted file mode 100644 index 285c09e003da..000000000000 --- a/doc/lightning-emergencyrecover.7.md +++ /dev/null @@ -1,67 +0,0 @@ -lightning-emergencyrecover -- Command for recovering channels from the emergency.recovery file in the lightning directory -========================================================================================================================= - -SYNOPSIS --------- - -**emergencyrecover** - -DESCRIPTION ------------ - -The **emergencyrecover** RPC command fetches data from the emergency.recover file and tries to reconnect to the peer and force him to close the channel. The data in this file has enough information to reconnect and sweep the funds. - -This recovery method is not spontaneous and it depends on the peer, so it should be used as a last resort to recover the funds stored in a channel in case of severe data loss. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:emergencyrecover#1", - "method": "emergencyrecover", - "params": "{}" -} -{ - "id": "example:emergencyrecover#2", - "method": "emergencyrecover", - "params": "{}" -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **stubs** (array of hashs): - - (hash, optional): Channel IDs of channels successfully inserted. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "stubs": [] -} -{ - "stubs": [ - "c00734472f344fdadd0bf787de182e5cf144ccda5d731b0f7c75befd1f1eff52" - ] -} -``` - -AUTHOR ------- - -Aditya <> is mainly responsible. - -SEE ALSO --------- - -lightning-getsharedsecret(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-feerates.7.md b/doc/lightning-feerates.7.md deleted file mode 100644 index 774fe1abc879..000000000000 --- a/doc/lightning-feerates.7.md +++ /dev/null @@ -1,229 +0,0 @@ -lightning-feerates -- Command for querying recommended onchain feerates -======================================================================= - -SYNOPSIS --------- - -**feerates** *style* - -DESCRIPTION ------------ - -The **feerates** command returns the feerates that CLN will use. The feerates will be based on the recommended feerates from the backend. The backend may fail to provide estimates, but if it was able to provide estimates in the past, CLN will continue to use those for a while. CLN will also smoothen feerate estimations from the backend. - -Explorers often present fees in "sat/vB": 4 sat/vB is `4000perkb` or `1000perkw`. - -Bitcoin transactions have non-witness and witness bytes: - -* Non-witness bytes count as 4 weight, 1 virtual byte. All bytes other than SegWit witness count as non-witness bytes. * Witness bytes count as 1 weight, 0.25 virtual bytes. - -Thus, all *perkb* feerates will be exactly 4 times *perkw* feerates. - -To compute the fee for a transaction, multiply its weight or virtual bytes by the appropriate *perkw* or *perkw* feerate returned by this command, then divide by 1000. - -There is currently no way to change these feerates from the RPC. If you need custom control over onchain feerates, you will need to provide your own plugin that replaces the `bcli` plugin backend. For commands like lightning-withdraw(7) or lightning-fundchannel(7) you can provide a preferred feerate directly as a parameter, which will override the recommended feerates returned by **feerates**. - -- **style** (string) (one of "perkb", "perkw"): Fee rate style to use. This can be: - *perkw* - provide feerate in units of satoshis per 1000 weight (e.g. the minimum fee is usually `253perkw`). - *perkb* - provide feerate in units of satoshis per 1000 virtual bytes (eg. the minimum fee is usually `1000perkb`). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:feerates#1", - "method": "feerates", - "params": { - "style": "perkw", - "urgent": null, - "normal": null, - "slow": null - } -} -{ - "id": "example:feerates#2", - "method": "feerates", - "params": { - "style": "perkb", - "urgent": null, - "normal": null, - "slow": null - } -} -``` - -NOTES ------ - -Many other commands have a *feerate* parameter. This can be: - -* One of the strings to use lightningd's internal estimates: - * *urgent* (next 6 blocks or so) - * *normal* (next 12 blocks or so) - * *slow* (next 100 blocks or so) - * *minimum* for the lowest value bitcoind will currently accept (added in v23.05) - -* A number, with an optional suffix: - * *blocks* means aim for confirmation in that many blocks (added in v23.05) - * *perkw* means the number is interpreted as satoshi-per-kilosipa (weight) - * *perkb* means it is interpreted bitcoind-style as satoshi-per-kilobyte. - -Omitting the suffix is equivalent to *perkb*. - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **perkb** (object, optional): If *style* parameter was perkb.: - - **min\_acceptable** (u32): The smallest feerate that we allow peers to specify: half the 100-block estimate. - - **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). - - **floor** (u32): The smallest feerate that our backend tells us it will accept (i.e. minrelayfee or mempoolminfee). *(added v23.05)* - - **estimates** (array of objects): Feerate estimates from plugin which we are using (usuallly bcli). *(added v23.05)*: - - **blockcount** (u32): The number of blocks the feerate is expected to get a transaction in. *(added v23.05)* - - **feerate** (u32): The feerate for this estimate, in given *style*. *(added v23.05)* - - **smoothed\_feerate** (u32): The feerate, smoothed over time (useful for coordinating with other nodes). *(added v23.05)* - - **opening** (u32, optional): Default feerate for lightning-fundchannel(7) and lightning-withdraw(7). - - **mutual\_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer. - - **unilateral\_close** (u32, optional): Feerate for commitment\_transaction in a live channel which we originally funded. - - **unilateral\_anchor\_close** (u32, optional): Feerate for commitment\_transaction in a live channel which we originally funded (if anchor\_outputs was negotiated). *(added v23.08)* - - **delayed\_to\_us** (u32, optional): Feerate for returning unilateral close funds to our wallet. **deprecated in v23.05, removed after v24.05** - - **htlc\_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet. **deprecated in v23.05, removed after v24.05** - - **penalty** (u32, optional): Feerate to use when creating penalty tx for watchtowers. -- **perkw** (object, optional): If *style* parameter was perkw.: - - **min\_acceptable** (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend. - - **max\_acceptable** (u32): The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet). - - **floor** (u32): The smallest feerate that our backend tells us it will accept (i.e. minrelayfee or mempoolminfee). *(added v23.05)* - - **estimates** (array of objects): Feerate estimates from plugin which we are using (usuallly bcli). *(added v23.05)*: - - **blockcount** (u32): The number of blocks the feerate is expected to get a transaction in. *(added v23.05)* - - **feerate** (u32): The feerate for this estimate, in given *style*. *(added v23.05)* - - **smoothed\_feerate** (u32): The feerate, smoothed over time (useful for coordinating with other nodes). *(added v23.05)* - - **opening** (u32, optional): Default feerate for lightning-fundchannel(7) and lightning-withdraw(7). - - **mutual\_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer. - - **unilateral\_close** (u32, optional): Feerate for commitment\_transaction in a live channel which we originally funded (if anchor\_outputs was not negotiated). - - **unilateral\_anchor\_close** (u32, optional): Feerate for commitment\_transaction in a live channel which we originally funded (if anchor\_outputs was negotiated). *(added v23.08)* - - **delayed\_to\_us** (u32, optional): Feerate for returning unilateral close funds to our wallet. **deprecated in v23.05, removed after v24.05** - - **htlc\_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet. **deprecated in v23.05, removed after v24.05** - - **penalty** (u32, optional): Feerate to use when creating penalty tx for watchtowers. -- **onchain\_fee\_estimates** (object, optional): - - **opening\_channel\_satoshis** (u64): Estimated cost of typical channel open. - - **mutual\_close\_satoshis** (u64): Estimated cost of typical channel close. - - **unilateral\_close\_satoshis** (u64): Estimated cost of typical unilateral close (without HTLCs). If anchors are supported, this assumes a channel with anchors. - - **htlc\_timeout\_satoshis** (u64): Estimated cost of typical HTLC timeout transaction (non-anchors). - - **htlc\_success\_satoshis** (u64): Estimated cost of typical HTLC fulfillment transaction (non-anchors). - - **unilateral\_close\_nonanchor\_satoshis** (u64, optional): Estimated cost of non-anchor typical unilateral close (without HTLCs). *(added v23.08)* - -The following warnings may also be returned: - -- **warning\_missing\_feerates**: Some fee estimates are missing. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "perkw": { - "opening": 1000000, - "mutual_close": 26362, - "unilateral_close": 26362, - "unilateral_anchor_close": 1000000, - "penalty": 26362, - "min_acceptable": 3750, - "max_acceptable": 10000000, - "floor": 253, - "estimates": [ - { - "blockcount": 2, - "feerate": 1000000, - "smoothed_feerate": 26362 - }, - { - "blockcount": 6, - "feerate": 1000000, - "smoothed_feerate": 26362 - }, - { - "blockcount": 12, - "feerate": 1000000, - "smoothed_feerate": 26362 - }, - { - "blockcount": 100, - "feerate": 1000000, - "smoothed_feerate": 26362 - } - ] - }, - "onchain_fee_estimates": { - "opening_channel_satoshis": 702000, - "mutual_close_satoshis": 17741, - "unilateral_close_satoshis": 1112000, - "unilateral_close_nonanchor_satoshis": 15764, - "htlc_timeout_satoshis": 17478, - "htlc_success_satoshis": 18532 - } -} -{ - "perkb": { - "opening": 25000, - "mutual_close": 25000, - "unilateral_close": 44000, - "unilateral_anchor_close": 25000, - "penalty": 25000, - "min_acceptable": 12500, - "max_acceptable": 600000, - "floor": 1012, - "estimates": [ - { - "blockcount": 2, - "feerate": 60000, - "smoothed_feerate": 60000 - }, - { - "blockcount": 6, - "feerate": 44000, - "smoothed_feerate": 44000 - }, - { - "blockcount": 12, - "feerate": 25000, - "smoothed_feerate": 25000 - } - ] - }, - "onchain_fee_estimates": { - "opening_channel_satoshis": 4387, - "mutual_close_satoshis": 4206, - "unilateral_close_satoshis": 6578, - "unilateral_close_nonanchor_satoshis": 6578, - "htlc_timeout_satoshis": 7293, - "htlc_success_satoshis": 7733 - } -} -``` - -ERRORS ------- - -The **feerates** command will never error, however some fields may be missing in the result if feerate estimates for that kind of transaction are unavailable. - -TRIVIA ------- - -In C-lightning we like to call the weight unit "sipa" in honor of Pieter Wuille, who uses the name "sipa" on IRC and elsewhere. Internally we call the *perkw* style as "feerate per kilosipa". - -AUTHOR ------- - -ZmnSCPxj <> wrote the initial version of this manpage. - -SEE ALSO --------- - -lightning-parsefeerate(7), lightning-fundchannel(7), lightning-withdraw(7), lightning-txprepare(7), lightning-fundchannel\_start(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-fetchinvoice.7.md b/doc/lightning-fetchinvoice.7.md deleted file mode 100644 index ccd253c48c14..000000000000 --- a/doc/lightning-fetchinvoice.7.md +++ /dev/null @@ -1,118 +0,0 @@ -lightning-fetchinvoice -- Command for fetch an invoice for an offer -=================================================================== - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - -**fetchinvoice** *offer* [*amount\_msat*] [*quantity*] [*recurrence\_counter*] [*recurrence\_start*] [*recurrence\_label*] [*timeout*] [*payer\_note*] - -DESCRIPTION ------------ - -The **fetchinvoice** RPC command contacts the issuer of an *offer* to get an actual invoice that can be paid. It highlights any changes between the offer and the returned invoice. - -If **fetchinvoice-noconnect** is not specified in the configuation, it will connect to the destination in the (currently common!) case where it cannot find a route which supports `option_onion_messages`. - -- **offer** (string): Offer string to get an actual invoice that can be paid. -- **amount\_msat** (msat, optional): Required if the offer does not specify an amount at all, otherwise it is optional (but presumably if you set it to less than the offer, you will get an error from the issuer). -- **quantity** (u64, optional): Required if the offer specifies quantity\_max, otherwise it is not allowed. -- **recurrence\_counter** (u64, optional): Required if the offer specifies recurrence, otherwise it is not allowed. recurrence\_counter should first be set to 0, and incremented for each successive invoice in a given series. -- **recurrence\_start** (number, optional): Required if the offer specifies recurrence\_base with start\_any\_period set, otherwise it is not allowed. It indicates what period number to start at. -- **recurrence\_label** (string, optional): Required if recurrence\_counter is set, and otherwise is not allowed. It must be the same as prior fetchinvoice calls for the same recurrence, as it is used to link them together. -- **timeout** (number, optional): If we don't get a reply before this we fail (default, 60 seconds). -- **payer\_note** (string, optional): To ask the issuer to include in the fetched invoice. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:fetchinvoice#1", - "method": "fetchinvoice", - "params": { - "offer": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqypq5zmnd9khqmr9yp6x2um5zcssxhftzxfdlwsnfcgw2sy8t5mxa0ytcdfat2nkdwqvpy9nnsa9mzza", - "payer_note": "Thanks for the fish!" - } -} -{ - "id": "example:fetchinvoice#2", - "method": "fetchinvoice", - "params": { - "offer": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqypq5zmnd9khqmr9yp6x2um5zcssxhftzxfdlwsnfcgw2sy8t5mxa0ytcdfat2nkdwqvpy9nnsa9mzza", - "amount_msat": 3 - } -} -{ - "id": "example:fetchinvoice#3", - "method": "fetchinvoice", - "params": { - "offer": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqypq5zmnd9khqmr9yp6x2um5zsqs593pqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4j", - "quantity": 2 - } -} -``` - -RETURN VALUE ------------- - -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. - - **description** (string, optional): A completely replaced *description* field. - - **vendor\_removed** (string, optional): The *vendor* from the offer, which is missing in the invoice. - - **vendor** (string, optional): A completely replaced *vendor* field. - - **amount\_msat** (msat, optional): The amount, if different from the offer amount multiplied by any *quantity* (or the offer had no amount, or was not in BTC). -- **next\_period** (object, optional): Only for recurring invoices if the next period is under the *recurrence\_limit*.: - - **counter** (u64): The index of the next period to fetchinvoice. - - **starttime** (u64): UNIX timestamp that the next period starts. - - **endtime** (u64): UNIX timestamp that the next period ends. - - **paywindow\_start** (u64): UNIX timestamp of the earliest time that the next invoice can be fetched. - - **paywindow\_end** (u64): UNIX timestamp of the latest time that the next invoice can be fetched. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "invoice": "lni1qqgvcm9h7yakcmw4mzazspu8vfgpwq3qqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy8ssqgzpg9hx6tdwpkx2gr5v4ehg93pqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky965pqqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy84sggren772kj8mau5jp86nc6fszx48rv7ep0quszyyls8rlld3sshjr94j9z5dpsku6mnypnx7u3qw35x2grxd9eksgdqnqp462c3jt0m5y6wzrj5pp6axehtez7r20265antsrqfpvuu8fwcshgr0tsv8e6829e8xmv7laz0kwhtlx6vtk8q3d6rtthdhtwvnn6j585szquc2t7us8kguxypzasg8ewkakgx2ny5ugks0f32x67sm9e5fms4asqrylajc2dqh8ag55mv5p5ghy3e2z8zwmllle8uu7jsxv5ke8d6rr5h7kthmz7ya0hxp4nt7elvw7vghcl6fgsuqqqqqqqqqqqqqqq9qqqqqqqqqqqqq8fykt06c5sqqqqqpfqyvhtunn4gyzy0lphn4wn6ctzlsajy46wscjcglf3hxcnvlaxqs3ydkhgaklsc42spq2czzq6a9vge9ha6zd8ppe2qsawnvm4u30p484d2we4cpsyskwwr5hvgthcyqyuen02ejwpa9cjjrttvp223yxsqkrwnlaszkhas84w0ape300ued4p75xu3cqtcg0cslsx9fvh7dhdqx565t6wa0alf6u2hug90j2hs", - "changes": {} -} -{ - "invoice": "lni1qqg0mfchkz0gkmn8zzu5zaxd0qvlzq3qqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy8ssqgzpg9hx6tdwpkx2gr5v4ehg93pqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky965pqqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy84yqgrtqss8d4vgzd3286u9rk0zg9qr7a6z2xm6mjnz9pydztcn0j74tjvch0f5zvqxhftzxfdlwsnfcgw2sy8t5mxa0ytcdfat2nkdwqvpy9nnsa9mzzaqth4fzjqxxmsaxvc4v2urs6hsh6k0e564x00g68vuyp5w7yjedzxvqgr8ltzmj0n7ltxr0tz9rafn9zcy9jldjqfuf20w6gjmr7nj04d360sqvkdwprxn22dlp3xay9yq4nhrw2jm0c8t6r7japhdad6leawxyqzkg92tx8gqxp9f2d8j5k2axta0gr7yr9zrsqqqqqqqqqqqqqqq5qqqqqqqqqqqqqayjedltzjqqqqqq9yq3ja0jwj4qswt3kgs9mxq7gck66x60m5rndykpw3a7hf4ntlp9qe2vgwzzrvcwd2qypmqggrt543ryklhgf5uy89gzr46dnwhj9ux5744fmxhqxqjzeecwja3pwlqsxyjcdwur4hl4qf7nsjgg8euvy45lznufh5kydkwz6llsucuhvwp9ezeggaj3k057ge6ftvaffjkwn6j3y7faeuysrx3m2xccphu65sx", - "changes": {} -} -{ - "invoice": "lni1qqgd508mv9rpjg2ec8dr8qcslf2cjq3qqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy8ssqgzpg9hx6tdwpkx2gr5v4ehg9qppgtzzq3dygmzpg6e53ll0aavg37gt3rvjg762vufygdqq4xprs0regcat9gzqp3zderpzxstt8927ynqg044h0egcd8n5h3n9g0u0v4h8ncc3yg02cqsykppqfkyy6q8ry9pchxtuajh456hhcf7dxx733cx76etuv5ftfmfa2ymhgycqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jq6uhkeymz26zx7zgw4gdmw2vj9xqn4hu2sqxhp0pcgt87pf9chyfvqsywtejxjh603kx7am3zaf6d6xuumw30p8zmcdz7r95nn4lr92exk3qqe2x6xqwpdzh2zwq3vnyra8nfc6d7y6hegpkvc7p2nulj7hvhwl5hjfr23wn60mjftqspn7d4ejhrpsr5m2y8qqqqqqqqqqqqqqqpgqqqqqqqqqqqqp6f9jm7k9yqqqqqq2gpr96l9mt2pqxuyr0gqw92h0xz2y2uy5uxss4ujcac5jehj9ay2sxkapr80t5ha65qgykqssytfzxcs2xkdy0lml0tzy0jzugmyj8kjn8zfzrgq9fsgurc72x82e7pqxhl4u29cjluw5s8fwa9wtvh0qytr7vqk0vtndsz07mrrtmjw629m8mnqkjaf43kt889qeq2f7deu6t853lngpzclapt8nj0g528v9ay", - "changes": {} -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 1002: Offer has expired. -- 1003: Cannot find a route to the node making the offer. -- 1004: The node making the offer returned an error message. -- 1005: We timed out trying to fetch an invoice. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-sendinvoice(7), lightning-pay(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-fundchannel.7.md b/doc/lightning-fundchannel.7.md deleted file mode 100644 index 79097f2c62e8..000000000000 --- a/doc/lightning-fundchannel.7.md +++ /dev/null @@ -1,166 +0,0 @@ -lightning-fundchannel -- Command for establishing a lightning channel -===================================================================== - -SYNOPSIS --------- - -**fundchannel** *id* *amount* [*feerate*] [*announce*] [*minconf*] [*push\_msat*] [*close\_to*] [*request\_amt*] [*compact\_lease*] [*utxos*] [*mindepth*] [*reserve*] [*channel\_type*] - -DESCRIPTION ------------ - -The **fundchannel** RPC command opens a payment channel with a peer by committing a funding transaction to the blockchain as defined in BOLT #2. - -If not already connected, **fundchannel** will automatically attempt to connect if Core Lightning knows a way to contact the node (either from normal gossip, or from a previous **connect** call). - -This auto-connection can fail if Core Lightning does not know how to contact the target node; see lightning-connect(7). - -Once the transaction is confirmed, normal channel operations may begin. Readiness is indicated by **listpeers** reporting a *state* of `CHANNELD_NORMAL` for the channel. - -- **id** (pubkey): Id is the peer id obtained from connect. -- **amount** (msat\_or\_all): The amount in satoshis taken from the internal wallet to fund the channel (but if we have any anchor channels, this will always leave at least `min-emergency- msat` as change). The string *all* can be used to specify all available funds (or 16777215 satoshi if more is available and large channels were not negotiated with the peer). Otherwise, it is in satoshi precision; it can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. The value cannot be less than the dust limit, currently set to 546, nor more than 16777215 satoshi (unless large channels were negotiated with the peer). -- **feerate** (feerate, optional): Used for the opening transaction and (unless *option\_anchors\_zero\_fee\_htlc\_tx* is negotiated), as initial feerate for commitment and HTLC transactions (see NOTES in lightning-feerates(7)). The default is *normal*. -- **announce** (boolean, optional): Whether to announce this channel or not. An unannounced channel is considered private. The default is True. -- **minconf** (u32, optional): The minimum number of confirmations that used outputs should have. The default is 1. -- **push\_msat** (msat, optional): The amount of millisatoshis to push to the channel peer at open. Note that this is a gift to the peer -- these satoshis are added to the initial balance of the peer at channel start and are largely unrecoverable once pushed. -- **close\_to** (string, optional): A Bitcoin address to which the channel funds should be sent to on close. Only valid if both peers have negotiated `option_upfront_shutdown_script`. Returns `close_to` set to closing script iff is negotiated. -- **request\_amt** (msat, optional): An amount of liquidity you'd like to lease from the peer. If peer supports `option_will_fund`, indicates to them to include this much liquidity into the channel. Must also pass in *compact\_lease*. -- **compact\_lease** (string, optional): A compact representation of the peer's expected channel lease terms. If the peer's terms don't match this set, we will fail to open the channel. -- **utxos** (array of outpoints, optional): The utxos to be used to fund the channel, as an array of `txid:vout`.: - - (outpoint, optional) -- **mindepth** (u32, optional): Number of confirmations required before we consider the channel active. -- **reserve** (msat, optional): The amount we want the peer to maintain on its side of the channel. It can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. The default is 1% of the funding amount. -- **channel\_type** (array of u32s, optional) *(added v24.02)*: - - (u32, optional): Represents the explicit channel type to request. There is currently no sanity checking on this value so if you use strange values and your channel breaks, you get to keep both pieces. BOLT 2 defines the following value types: - `` - The currently defined basic types are: - - no features (no bits set). - - `option_static_remotekey` (bit 12). - - `option_anchor_outputs` and `option_static_remotekey` (bits 20 and 12). - - `option_anchors_zero_fee_htlc_tx` and `option_static_remotekey` (bits 22 and 12). - - Each basic type has the following variations allowed: - - `option_scid_alias` (bit 46). - - `option_zeroconf` (bit 50). - `` - -EXAMPLE USAGE -------------- - -This example shows how to use lightning-cli to open new channel with peer 03f...fc1 from one whole utxo bcc1...39c:0 (you can use **listfunds** command to get txid and vout): - -```shell -lightning-cli -k fundchannel id=03f...fc1 amount=all feerate=normal utxos='["bcc1...39c:0"]' -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:fundchannel#1", - "method": "fundchannel", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount": 1000000, - "feerate": null, - "announce": true, - "minconf": null, - "utxos": null, - "push_msat": null, - "close_to": null, - "request_amt": null, - "compact_lease": null, - "mindepth": null, - "reserve": null - } -} -{ - "id": "example:fundchannel#2", - "method": "fundchannel", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount": 10000000, - "feerate": null, - "announce": true, - "minconf": null, - "utxos": null, - "push_msat": 1000000000, - "close_to": null, - "request_amt": null, - "compact_lease": null, - "mindepth": null, - "reserve": null, - "channel_type": null - } -} -``` - -RETURN VALUE ------------- - -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. -- **channel\_id** (hash): The channel\_id of the resulting channel. -- **channel\_type** (object): Channel\_type as negotiated with peer. *(added v24.02)*: - - **bits** (array of u32s): Each bit set in this channel\_type. *(added v24.02)*: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type. *(added v24.02)*: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. -- **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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "tx": "020000000001014ca47b75e6982fce6b5ebb6e7ec163dc5b6bed1562934e6febe816103b2b207e0000000000fdffffff0240420f00000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd012f0f000000000022512063ffee4ea7d51e6cadf9086e286a2527922aaa25b8c53aebf32fa32a0a627f5a02473044022058fc4d51c8254d37b266d3db3f8fda7420882b6ec9226d66b8c0139f2707c09602205798d8ce23d4c692a7384362a2e0afd9703f062239a786d7a1840a28d3a1152e012103d745445c9362665f22e0d96e9e766f273f3260dea39c8a76bfa05dd2684ddccf66000000", - "txid": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b", - "channel_id": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "outnum": 0 -} -{ - "tx": "0200000000010141cfa0e9957c7c6d0bb5069d92937f9545e6e6ee9b4650f47f509d5ea65df4690100000000fdffffff0280969800000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd4118530b0000000022512063ffee4ea7d51e6cadf9086e286a2527922aaa25b8c53aebf32fa32a0a627f5a0247304402206488c7dfbc4180781ed0d5ca7ff2c8ce134480c349d03978765053a393229d9a022066c75dee1f19b410ea1c7756d0cb2c097e52b13f4d9bbd033efa4ed95d817e14012103d745445c9362665f22e0d96e9e766f273f3260dea39c8a76bfa05dd2684ddccf66000000", - "txid": "6aa1231b6356777468a55aea1f49dad6415592aef6c1e652f8a64357c7235301", - "channel_id": "015323c75743a6f852e6c1f6ae925541d6da491fea5aa568747756631b23a16a", - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "outnum": 0 -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 300: The maximum allowed funding amount is exceeded. -- 301: There are not enough funds in the internal wallet (including fees) to create the transaction. -- 302: The output amount is too small, and would be considered dust. -- 303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error. -- 313: The `min-emergency-msat` reserve not be preserved (and we have or are opening anchor channels). - -Failure may also occur if **lightningd** and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc.). - -SEE ALSO --------- - -lightning-connect(7), lightning-listfunds(), lightning-listpeers(7), lightning-feerates(7), lightning-multifundchannel(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-fundchannel_cancel.7.md b/doc/lightning-fundchannel_cancel.7.md deleted file mode 100644 index 260f0b16658a..000000000000 --- a/doc/lightning-fundchannel_cancel.7.md +++ /dev/null @@ -1,82 +0,0 @@ -lightning-fundchannel\_cancel -- Command for completing channel establishment -============================================================================= - -SYNOPSIS --------- - -**fundchannel\_cancel** *id* - -DESCRIPTION ------------ - -`fundchannel_cancel` is a lower level RPC command. It allows channel opener to cancel a channel before funding broadcast with a connected peer. - -Note that the funding transaction MUST NOT be broadcast before `fundchannel_cancel`. Broadcasting transaction before `fundchannel_cancel` WILL lead to unrecoverable loss of funds. - -If `fundchannel_cancel` is called after `fundchannel_complete`, the remote peer may disconnect when command succeeds. In this case, user need to connect to remote peer again before opening channel. - -- **id** (pubkey): Node id of the remote peer with which to cancel. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:fundchannel_cancel#1", - "method": "fundchannel_cancel", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59" - } -} -{ - "id": "example:fundchannel_cancel#2", - "method": "fundchannel_cancel", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **cancelled** (string): A message indicating it was cancelled by RPC. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "cancelled": "Channel open canceled by RPC" -} -{ - "cancelled": "Channel open canceled by RPC(after fundchannel_complete)" -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- 306: Unknown peer id. -- 307: No channel currently being funded that can be cancelled. -- 308: It is unsafe to cancel the channel: the funding transaction has been broadcast, or there are HTLCs already in the channel, or the peer was the initiator and not us. - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-connect(7), lightning-fundchannel(7), lightning-multifundchannel(7), lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), lightning-openchannel\_init(7), lightning-openchannel\_update(7), lightning-openchannel\_signed(7), lightning-openchannel\_abort(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-fundchannel_complete.7.md b/doc/lightning-fundchannel_complete.7.md deleted file mode 100644 index 08bd27b3a5f3..000000000000 --- a/doc/lightning-fundchannel_complete.7.md +++ /dev/null @@ -1,75 +0,0 @@ -lightning-fundchannel\_complete -- Command for completing channel establishment -=============================================================================== - -SYNOPSIS --------- - -**fundchannel\_complete** *id* *psbt* - -DESCRIPTION ------------ - -`fundchannel_complete` is a lower level RPC command. It allows a user to complete an initiated channel establishment with a connected peer. - -Note that the funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed, as the commitment transactions for this channel are not secured until this command successfully completes. Broadcasting transaction before can lead to unrecoverable loss of funds. - -- **id** (pubkey): Node id of the remote peer. -- **psbt** (string): Transaction to use for funding (does not need to be signed but must be otherwise complete). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:fundchannel_complete#1", - "method": "fundchannel_complete", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "psbt": "cHNidP8BAIkCAAAAASYd4TeOHEIzrUbbELM2DK0IX09WaXqWsJFlLD455MPPAAAAAAD9////Av///wAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM1c8QUpAQAAACJRIH8AZYBKMKON4/oVmJVsVt6zy/+PkBPzziE+LtkuFvWXAAAAAAABAIMCAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////wJRAP////8CAPIFKgEAAAAWABQ5FIjuMd8ar9WFRV9eGNLF+3RMcAAAAAAAAAAAJmokqiGp7eL2HD9x0d79P6mZ36NpU3VcaQaJeZlitIvr2DaXToz5AAAAAAEBHwDyBSoBAAAAFgAUORSI7jHfGq/VhUVfXhjSxft0THAiBgMegIxEPDa2OseVTaV6ANtSwQuoj/j2an7X/Is2EekvWBhhFDNgVAAAgAEAAIAAAACAAAAAAAAAAAAAAAEFIEm9AFgqUlJwbPFtyt3a9dzvb+nAGZiQ3CT1CImhjBFpIQdJvQBYKlJScGzxbcrd2vXc72/pwBmYkNwk9QiJoYwRaRkAYRQzYFYAAIABAACAAAAAgAEAAAAAAAAAAA==" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **channel\_id** (hash): The channel\_id of the resulting channel. -- **commitments\_secured** (boolean) (always *true*): Indication that channel is safe to use. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channel_id": "049217e5035a4a60449c6382c445b5c105bd63588d66137ad0511c57a16db6d9", - "commitments_secured": true -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 305: Peer is not connected. -- 306: Unknown peer id. -- 309: PSBT does not have a unique, correct output to fund the channel. - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-connect(7), lightning-fundchannel(7), lightning-multifundchannel(7), lightning-fundchannel\_start(7), lightning-fundchannel\_cancel(7), lightning-openchannel\_init(7), lightning-openchannel\_update(7), lightning-openchannel\_signed(7), lightning-openchannel\_bump(7), lightning-openchannel\_abort(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-fundchannel_start.7.md b/doc/lightning-fundchannel_start.7.md deleted file mode 100644 index 770be9337aaf..000000000000 --- a/doc/lightning-fundchannel_start.7.md +++ /dev/null @@ -1,130 +0,0 @@ -lightning-fundchannel\_start -- Command for initiating channel establishment for a lightning channel -==================================================================================================== - -SYNOPSIS --------- - -**fundchannel\_start** *id* *amount* [*feerate* *announce* *close\_to* *push\_msat* *channel\_type* *mindepth* *reserve*] - -DESCRIPTION ------------ - -`fundchannel_start` is a lower level RPC command. It allows a user to initiate channel establishment with a connected peer. - -Note that the funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed by running `fundchannel_complete`, as the commitment transactions for this channel are not secured until the complete command succeeds. Broadcasting transaction before that can lead to unrecoverable loss of funds. - -- **id** (pubkey): The peer id obtained from connect. -- **amount** (sat): Satoshi value that the channel will be funded at. This value MUST be accurate, otherwise the negotiated commitment transactions will not encompass the correct channel value. -- **feerate** (feerate, optional): Feerate for subsequent commitment transactions: see **fundchannel**. Note that this is ignored for channels with *option\_anchors\_zero\_fee\_htlc\_tx* (we always use a low commitment fee for these). -- **announce** (boolean, optional): Whether or not to announce this channel. -- **close\_to** (string, optional): Bitcoin address to which the channel funds should be sent to on close. Only valid if both peers have negotiated `option_upfront_shutdown_script`. Returns `close_to` set to closing script iff is negotiated. -- **push\_msat** (msat, optional): Amount of millisatoshis to push to the channel peer at open. Note that this is a gift to the peer -- these satoshis are added to the initial balance of the peer at channel start and are largely unrecoverable once pushed. -- **mindepth** (u32, optional): Number of confirmations required before we consider the channel active. -- **reserve** (msat, optional): The amount we want the peer to maintain on its side. -- **channel\_type** (array of u32s, optional): Each bit set in this channel\_type.: - - (u32, optional): Bit number. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:fundchannel_start#1", - "method": "fundchannel_start", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount": 16777216, - "feerate": null, - "announce": true, - "close_to": null, - "mindepth": null - } -} -{ - "id": "example:fundchannel_start#2", - "method": "fundchannel_start", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount": "100000sat", - "feerate": null, - "announce": true, - "close_to": null, - "mindepth": null, - "channel_type": null - } -} -``` - -RETURN VALUE ------------- - -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. -- **channel\_type** (object, optional): Channel\_type as negotiated with peer. *(added v24.02)*: - - **bits** (array of u32s): Each bit set in this channel\_type. *(added v24.02)*: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type. *(added v24.02)*: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. -- **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!). - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "funding_address": "bcrt1qtwxd8wg5eanumk86vfeujvp48hfkgannf77evggzct048wggsrxsum2pmm", - "scriptpubkey": "00205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd", - "warning_usage": "The funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed by running `fundchannel_complete`" -} -{ - "funding_address": "bcrt1qtwxd8wg5eanumk86vfeujvp48hfkgannf77evggzct048wggsrxsum2pmm", - "scriptpubkey": "00205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd", - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "warning_usage": "The funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed by running `fundchannel_complete`" -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 300: The amount exceeded the maximum configured funding amount. -- 301: The provided `push_msat` is greater than the provided `amount`. -- 304: Still syncing with bitcoin network -- 305: Peer is not connected. -- 306: Unknown peer id. -- 312: Peer negotiated `option_dual_fund`, must use `openchannel_init` not `fundchannel_start`. (Only if ``experimental-dual-fund is enabled) - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-connect(7), lightning-fundchannel(7), lightning-multifundchannel(7), lightning-fundchannel\_complete(7), lightning-fundchannel\_cancel(7), lightning-openchannel\_init(7), lightning-openchannel\_update(7), lightning-openchannel\_signed(7), lightning-openchannel\_bump(7), lightning-openchannel\_abort(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-funderupdate.7.md b/doc/lightning-funderupdate.7.md deleted file mode 100644 index 520ee7c592b8..000000000000 --- a/doc/lightning-funderupdate.7.md +++ /dev/null @@ -1,147 +0,0 @@ -lightning-funderupdate -- Command for adjusting node funding v2 channels -======================================================================== - -SYNOPSIS --------- - -**funderupdate** [*policy*] [*policy\_mod*] [*leases\_only*] [*min\_their\_funding\_msat*] [*max\_their\_funding\_msat*] [*per\_channel\_min\_msat*] [*per\_channel\_max\_msat*] [*reserve\_tank\_msat*] [*fuzz\_percent*] [*fund\_probability*] [*lease\_fee\_base\_msat*] [*lease\_fee\_basis*] [*funding\_weight*] [*channel\_fee\_max\_base\_msat*] [*channel\_fee\_max\_proportional\_thousandths*] [*compact\_lease*] - -DESCRIPTION ------------ - -NOTE: Must have --experimental-dual-fund enabled for these settings to take effect. - -For channel open requests using dual funding. - -Note: to maximize channel leases, best policy setting is (match, 100). - -Setting any of the 5 options from *lease\_fee\_base\_msat*, *lease\_fee\_basis*, *funding\_weight*, *channel\_fee\_max\_base\_msat* and, *channel\_fee\_max\_proportional\_thousandths* will activate channel leases for this node, and advertise these values via the lightning gossip network. If any one is set, the other values will be the default. - -- **policy** (string, optional) (one of "match", "available", "fixed"): Funder plugin will use to decide how much capital to commit to a v2 open channel request. - There are three policy options, detailed below: - * `match` -- Contribute *policy\_mod* percent of their requested funds. Valid *policy\_mod* values are 0 to 200. If this is a channel lease request, we match based on their requested funds. If it is not a channel lease request (and *lease\_only* is false), then we match their funding amount. Note: any lease match less than 100 will likely fail, as clients will not accept a lease less than their request. - * `available` -- Contribute *policy\_mod* percent of our available node wallet funds. Valid *policy\_mod* values are 0 to 100. - * `fixed` -- Contributes a fixed *policy\_mod* sats to v2 channel open requests. The default is fixed. -- **policy\_mod** (sat, optional): Number or 'modification' to apply to the policy. The default is 0sats. -- **leases\_only** (boolean, optional): Only contribute funds to `option_will_fund` requests which pay to lease funds. It will fund any v2 open request using *policy* even if it's they're not seeking to lease funds. Note that `option_will_fund` commits funds for 4032 blocks (~1mo). Must also set *lease\_fee\_base\_msat*, *lease\_fee\_basis*, *funding\_weight*, *channel\_fee\_max\_base\_msat*, and *channel\_fee\_max\_proportional\_thousandths* to advertise available channel leases. The default is False. -- **min\_their\_funding\_msat** (msat, optional): Minimum funding sats that we require in order to activate our contribution policy to the v2 open. The default is 10k sats. -- **max\_their\_funding\_msat** (msat, optional): Maximum funding sats that we will consider to activate our contribution policy to the v2 open. Any channel open above this will not be funded. The default is no max (`UINT_MAX`). -- **per\_channel\_min\_msat** (msat, optional): Minimum amount that we will contribute to a channel open. The default is 10k sats. -- **per\_channel\_max\_msat** (msat, optional): Maximum amount that we will contribute to a channel open. The default is no max (`UINT_MAX`). -- **reserve\_tank\_msat** (msat, optional): Amount of sats to leave available in the node wallet. The default is zero sats. -- **fuzz\_percent** (u32, optional): A percentage to fuzz the resulting contribution amount by. Valid values are 0 to 100. Note that turning this on with (match, 100) policy will randomly fail `option_will_fund` leases, as most clients expect an exact or greater match of their `requested_funds`. The default is 0% (no fuzz). -- **fund\_probability** (u32, optional): The percent of v2 channel open requests to apply our policy to. Valid values are integers from 0 (fund 0% of all open requests) to 100 (fund every request). Useful for randomizing opens that receive funds. Useful for randomizing opens that receive funds. The default is 100. -- **lease\_fee\_base\_msat** (msat, optional): Flat fee for a channel lease. Node will receive this much extra added to their channel balance, paid by the opening node. Note that the minimum is 1sat. The default is 2k sats. -- **lease\_fee\_basis** (u32, optional): A basis fee that's calculated as 1/10k of the total requested funds the peer is asking for. Node will receive the total of *lease\_fee\_basis* times requested funds / 10k satoshis added to their channel balance, paid by the opening node. The default is 0.65% (65 basis points). -- **funding\_weight** (u32, optional): To calculate the fee the peer will compensate your node for its contributing inputs to the funding transaction. The total fee is calculated as the `open_channel2`.`funding_feerate_perkw` times this *funding\_weight* divided by 1000. Node will have this funding fee added to their channel balance, paid by the opening node. The default is 2 inputs + 1 P2WPKH output. -- **channel\_fee\_max\_base\_msat** (msat, optional): A commitment to a maximum `channel_fee_base_msat` that your node will charge for routing payments over this leased channel during the lease duration. The default is 5k sats. -- **channel\_fee\_max\_proportional\_thousandths** (u32, optional): A commitment to a maximum `channel_fee_proportional_millionths` that your node will charge for routing payments over this leased channel during the lease duration. Note that it's denominated in 'thousandths'. A setting of `1` is equal to 1k ppm; `5` is 5k ppm, etc. The default is 100 (100k ppm). -- **compact\_lease** (hex, optional): A compact description of the channel lease params. When opening a channel, passed in to `fundchannel` to indicate the terms we expect from the peer. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:funderupdate#1", - "method": "funderupdate", - "params": "{}" -} -{ - "id": "example:funderupdate#2", - "method": "funderupdate", - "params": { - "policy": "fixed", - "policy_mod": "50000sat", - "min_their_funding_msat": 1000, - "per_channel_min_msat": "1000sat", - "per_channel_max_msat": "500000sat", - "fund_probability": 100, - "fuzz_percent": 0, - "leases_only": false - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **summary** (string): Summary of the current funding policy e.g. (match 100). -- **policy** (string) (one of "match", "available", "fixed"): Policy funder plugin will use to decide how much capital to commit to a v2 open channel request. -- **policy\_mod** (u32): The *policy\_mod* is the number or 'modification' to apply to the policy. -- **leases\_only** (boolean): Only contribute funds to `option_will_fund` lease requests. -- **min\_their\_funding\_msat** (msat): The minimum funding sats that we require from peer to activate our funding policy. -- **max\_their\_funding\_msat** (msat): The maximum funding sats that we'll allow from peer to activate our funding policy. -- **per\_channel\_min\_msat** (msat): The minimum amount that we will fund a channel open with. -- **per\_channel\_max\_msat** (msat): The maximum amount that we will fund a channel open with. -- **reserve\_tank\_msat** (msat): Amount of sats to leave available in the node wallet. -- **fuzz\_percent** (u32): Percentage to fuzz our funding amount by. -- **fund\_probability** (u32): Percent of opens to consider funding. 100 means we'll consider funding every requested open channel request. -- **lease\_fee\_base\_msat** (msat, optional): Flat fee to charge for a channel lease. -- **lease\_fee\_basis** (u32, optional): Proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds. -- **funding\_weight** (u32, optional): Transaction weight the channel opener will pay us for a leased funding transaction. -- **channel\_fee\_max\_base\_msat** (msat, optional): Maximum channel\_fee\_base\_msat we'll charge for routing funds leased on this channel. -- **channel\_fee\_max\_proportional\_thousandths** (u32, optional): Maximum channel\_fee\_proportional\_millitionths we'll charge for routing funds leased on this channel, in thousandths. -- **compact\_lease** (hex, optional): Compact description of the channel lease parameters. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "summary": "match (100%)", - "policy": "match", - "policy_mod": 100, - "leases_only": true, - "min_their_funding_msat": 10000000, - "max_their_funding_msat": 4294967295000, - "per_channel_min_msat": 10000000, - "per_channel_max_msat": 4294967295000, - "reserve_tank_msat": 0, - "fuzz_percent": 0, - "fund_probability": 100, - "lease_fee_base_msat": 100000, - "lease_fee_basis": 100, - "funding_weight": 666, - "channel_fee_max_base_msat": 5000000, - "channel_fee_max_proportional_thousandths": 100, - "compact_lease": "029a00640064000000644c4b40" -} -{ - "summary": "fixed (50000sat)", - "policy": "fixed", - "policy_mod": 50000, - "leases_only": false, - "min_their_funding_msat": 1000, - "max_their_funding_msat": 4294967295000, - "per_channel_min_msat": 1000000, - "per_channel_max_msat": 500000000, - "reserve_tank_msat": 0, - "fuzz_percent": 0, - "fund_probability": 100 -} -``` - -ERRORS ------- - -The following error code may occur: - -- -32602: If the given parameters are invalid. - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-fundchannel(7), lightning-listfunds(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-fundpsbt.7.md b/doc/lightning-fundpsbt.7.md deleted file mode 100644 index 78139ea348d8..000000000000 --- a/doc/lightning-fundpsbt.7.md +++ /dev/null @@ -1,169 +0,0 @@ -lightning-fundpsbt -- Command to populate PSBT inputs from the wallet -===================================================================== - -SYNOPSIS --------- - -**fundpsbt** *satoshi* *feerate* *startweight* [*minconf*] [*reserve*] [*locktime*] [*min\_witness\_weight*] [*excess\_as\_change*] [*nonwrapped*] [*opening\_anchor\_channel*] - -DESCRIPTION ------------ - -`fundpsbt` is a low-level RPC command which creates a PSBT using unreserved inputs in the wallet, optionally reserving them as well. - -- **satoshi** (msat\_or\_all): The minimum satoshi value of the output(s) needed (or the string `all` meaning use all unreserved inputs). If a value, it can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. -- **feerate** (feerate): Used for the transaction as initial feerate. The default is *normal*. -- **startweight** (u32): The weight of the transaction before *fundpsbt* has added any inputs. -- **minconf** (u32, optional): The minimum number of confirmations that used outputs should have. The default is 1. -- **reserve** (u32, optional): If not zero, then *reserveinputs* is called (successfully, with *exclusive* true) on the returned PSBT for this number of blocks. The default is 72 blocks. -- **locktime** (u32, optional): The locktime of the transaction. if not set, it is set to a recent block height. -- **min\_witness\_weight** (u32, optional): Minimum weight to use for a UTXO's witness. If the actual witness weight is greater than the provided minimum, the actual witness weight will be used. -- **excess\_as\_change** (boolean, optional): Flag to add a change output for the excess sats. -- **nonwrapped** (boolean, optional): To signal to filter out any p2sh-wrapped inputs from funding this PSBT. *(added v23.02)* -- **opening\_anchor\_channel** (boolean, optional): To signel that it needs emergency reserve for anchors so that we can lowball our commitment tx fees, and min-emergency-msat for reserving some sats for closing anchor channels. *(added v23.08)* - -EXAMPLE USAGE -------------- - -Let's assume the caller is trying to produce a 100,000 satoshi output. - -First, the caller estimates the weight of the core (typically 42) and known outputs of the transaction (typically (9 + scriptlen) * 4). For a simple P2WPKH it's a 22 byte scriptpubkey, so that's 124 weight. - -It calls "*fundpsbt* 100000sat slow 166", which succeeds, and returns the *psbt* and *feerate\_per\_kw* it used, the *estimated\_final\_weight* and any *excess\_msat*. - -If *excess\_msat* is greater than the cost of adding a change output, the caller adds a change output randomly to position 0 or 1 in the PSBT. Say *feerate\_per\_kw* is 253, and the change output is a P2WPKH (weight 124), the cost is around 31 sats. With the dust limit disallowing payments below 546 satoshis, we would only create a change output if *excess\_msat* was greater or equal to 31 + 546. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:fundpsbt#1", - "method": "fundpsbt", - "params": { - "satoshi": 16777216, - "feerate": "253perkw", - "startweight": 250, - "minconf": null, - "reserve": 0, - "locktime": null, - "min_witness_weight": null, - "excess_as_change": false - } -} -{ - "id": "example:fundpsbt#2", - "method": "fundpsbt", - "params": { - "satoshi": "all", - "feerate": "1000perkw", - "startweight": 1000, - "minconf": null, - "reserve": null, - "locktime": null, - "min_witness_weight": null, - "excess_as_change": false - } -} -{ - "id": "example:fundpsbt#3", - "method": "fundpsbt", - "params": { - "satoshi": "109000sat", - "feerate": "slow", - "startweight": 166, - "minconf": null, - "reserve": null, - "locktime": null, - "min_witness_weight": null, - "excess_as_change": true - } -} -``` - -RETURN VALUE ------------- - -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. -- **excess\_msat** (msat): The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change\_outnum* is also returned. -- **change\_outnum** (u32, optional): The 0-based output number where change was placed (only if parameter *excess\_as\_change* was true and there was sufficient funds). -- **reservations** (array of objects, optional): If *reserve* was true or a non-zero number, just as per lightning- reserveinputs(7).: - - **txid** (txid): The txid of the transaction. - - **vout** (u32): The 0-based output number. - - **was\_reserved** (boolean) (always *false*): Whether this output was previously reserved. - - **reserved** (boolean) (always *true*): Whether this output is now reserved. - - **reserved\_to\_block** (u32): The blockheight the reservation will expire. - -If *excess\_as\_change* is true and the excess is enough to cover an additional output above the `dust_limit`, then an output is added to the PSBT for the excess amount. The *excess\_msat* will be zero. A *change\_outnum* will be returned with the index of the change output. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "psbt": "cHNidP8BADMCAAAAAWzmSFzhTtXBnQewytc32WaMwJSunScwsYndBNdU80JqAAAAAAD9////AGYAAAAAAQDeAgAAAAABAU1MpIJeOOzqAYVkZaytJCmzUadBVltKar8kWtzKSVeYAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFD8W5uBNZAxN6n1jqU62dxWQbyGAAkcwRAIgUK+vMOeWiDPiJM8fpgKCjjwXog4yfWPvtKES1ZZPaM8CIB3cgouGpV6Gc7nEvAu28Mg9tkAWt/Xl5FDOseEyeZqHASECTwjR0I3gLHdSW7jRmnVXdm0+MgJ1hihnqEfXYeFWA/NlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQA=", - "feerate_per_kw": 253, - "estimated_final_weight": 521, - "excess_msat": 9999869000 -} -{ - "psbt": "cHNidP8BAF4CAAAAAfwbEpvpi6D14YV4VLnuVB47Y0uF41kXEyJRL4IusySSAQAAAAD9////ASICAAAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL5nAAAAAAEA9gIAAAAAAQFEkxvLatohY6mw5gr5qG1aiArSrziFPR2YoqD21Hv+RAAAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNrz8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIEu1nfVRt9i+rFM219mwhMqdwJsqygWSWTFUS+cemdh6AiBG3Qo8g9J/aAMO2RHDsIBScscj6pTTIwZp7Gw8G3EOKAEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPZgAAAAEBK68/DwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oAAA==", - "feerate_per_kw": 1000, - "estimated_final_weight": 1443, - "excess_msat": 997354000, - "change_outnum": 0, - "reservations": [ - { - "txid": "9224b32e822f5122131759e3854b633b1e54eeb9547885e1f5a08be99b121bfc", - "vout": 1, - "was_reserved": false, - "reserved": true, - "reserved_to_block": 175 - } - ] -} -{ - "psbt": "cHNidP8BAF4CAAAAAbEf44mT/BPDxLkUjKy1byWksyLyuM6hbe8shzEbbXhGAQAAAAD9////AU58DQAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL5sAAAAAAEA9gIAAAAAAQEV9Sj1wfHqO/ECZeHp/u7cFL5eRaa1Vu4hXWbwH72pxgEAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIGILT3DrcNn6/WKOhsxxKq7lDWq47dV0IjRhj0bYHs4yAiApzODtmrz7ifK32G81A2XbBxWboFk2vN4T3ng/hYmb1wEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPZgAAAAEBKwEvDwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oAAA==", - "feerate_per_kw": 3750, - "estimated_final_weight": 609, - "excess_msat": 0, - "change_outnum": 0, - "reservations": [ - { - "txid": "46786d1b31872cef6da1ceb8f222b3a4256fb5ac8c14b9c4c313fc9389e31fb1", - "vout": 1, - "was_reserved": false, - "reserved": true, - "reserved_to_block": 180 - } - ] -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 301: Insufficient UTXOs to meet *satoshi* value. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-utxopsbt(7), lightning-reserveinputs(7), lightning-unreserveinputs(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-getinfo.7.md b/doc/lightning-getinfo.7.md deleted file mode 100644 index 8f17e688ea57..000000000000 --- a/doc/lightning-getinfo.7.md +++ /dev/null @@ -1,136 +0,0 @@ -lightning-getinfo -- Command to receive all information about the Core Lightning node. -====================================================================================== - -SYNOPSIS --------- - -**getinfo** - -DESCRIPTION ------------ - -The **getinfo** gives a summary of the current running node. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:getinfo#1", - "method": "getinfo", - "params": {} -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **id** (pubkey): The public key unique to this node. -- **alias** (string) (up to 32 characters): The fun alias this node will advertize. -- **color** (hex) (always 6 characters): The favorite RGB color this node will advertize. -- **num\_peers** (u32): The total count of peers, connected or with channels. -- **num\_pending\_channels** (u32): The total count of channels being opened. -- **num\_active\_channels** (u32): The total count of channels in normal state. -- **num\_inactive\_channels** (u32): The total count of channels waiting for opening or closing transactions to be mined. -- **version** (string): Identifies what bugs you are running into. -- **lightning-dir** (string): Identifies where you can find the configuration and other related files. -- **blockheight** (u32): The highest block height we've learned. -- **network** (string): Represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`). -- **fees\_collected\_msat** (msat): Total routing fees collected by this node. -- **address** (array of objects): The addresses we announce to the world.: - - **type** (string) (one of "dns", "ipv4", "ipv6", "torv2", "torv3"): Type of connection (until 23.08, `websocket` was also allowed). - - **port** (u16): Port number. - - If **type** is "dns", "ipv4", "ipv6", "torv2" or "torv3": - - **address** (string): Address in expected format for **type**. -- **our\_features** (object, optional): Our BOLT #9 feature bits (as hexstring) for various contexts.: - - **init** (hex): Features (incl. globalfeatures) in our init message, these also restrict what we offer in open\_channel or accept in accept\_channel. - - **node** (hex): Features in our node\_announcement message. - - **channel** (hex): Negotiated channel features we (as channel initiator) publish in the channel\_announcement message. - - **invoice** (hex): Features in our BOLT11 invoices. -- **binding** (array of objects, optional): The addresses we are listening on.: - - **type** (string) (one of "local socket", "websocket", "ipv4", "ipv6", "torv2", "torv3"): Type of connection. - - **address** (string, optional): Address in expected format for **type**. - - **port** (u16, optional): Port number. - - If **type** is "local socket": - - **socket** (string): Socket filename. - - If **type** is "websocket": - - **subtype** (string): Type of address. - -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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "id": "02bf811f7571754f0b51e6d41a8885f5561041a7b14fac093e4cffb95749de1a8d", - "alias": "SLICKERGOPHER", - "color": "02bf81", - "num_peers": 0, - "num_pending_channels": 0, - "num_active_channels": 0, - "num_inactive_channels": 0, - "address": [ - { - "type": "torv3", - "address": "fp463inc4w3lamhhduytrwdwq6q6uzugtaeapylqfc43agrdnnqsheyd.onion", - "port": 9736 - }, - { - "type": "torv3", - "address": "ifnntp5ak4homxrti2fp6ckyllaqcike447ilqfrgdw64ayrmkyashid.onion", - "port": 9736 - } - ], - "binding": [ - { - "type": "ipv4", - "address": "127.0.0.1", - "port": 9736 - } - ], - "version": "v0.10.2", - "blockheight": 724302, - "network": "bitcoin", - "msatoshi_fees_collected": 0, - "fees_collected_msat": "0msat", - "lightning-dir": "/media/vincent/Maxtor/C-lightning/node/bitcoin", - "our_features": { - "init": "8828226aa2", - "node": "80008828226aa2", - "channel": "", - "invoice": "20024200" - } -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters or some error happened during the command process. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -SEE ALSO --------- - -lightning-connect(7), lightning-fundchannel(7), lightning-listconfigs(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-getlog.7.md b/doc/lightning-getlog.7.md deleted file mode 100644 index 2d1ab7f76032..000000000000 --- a/doc/lightning-getlog.7.md +++ /dev/null @@ -1,95 +0,0 @@ -lightning-getlog -- Command to show logs. -========================================= - -SYNOPSIS --------- - -**getlog** [*level*] - -DESCRIPTION ------------ - -The **getlog** the RPC command to show logs, with optional log *level*. - -- **level** (string, optional) (one of "broken", "unusual", "info", "debug", "io"): A string that represents the log level. The default is *info*. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:getlog#1", - "method": "getlog", - "params": { - "level": "debug" - } -} -``` - -RETURN VALUE ------------- - -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 . -- **log** (array of objects): - - **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. - - **data** (hex): The IO which occurred. - - **node\_id** (pubkey, optional): The peer this is associated with. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "created_at": "1598192543.820753463", - "bytes_used": 89285843, - "bytes_max": 104857600, - "log": [ - { - "type": "SKIPPED", - "num_skipped": 45 - }, - { - "type": "INFO", - "time": "0.453627568", - "source": "plugin-autopilot.py", - "log": "RPCmethod'autopilot-run-once'doesnothaveadocstring." - } - ] -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-getroute.7.md b/doc/lightning-getroute.7.md deleted file mode 100644 index 0d8c493b6f40..000000000000 --- a/doc/lightning-getroute.7.md +++ /dev/null @@ -1,353 +0,0 @@ -lightning-getroute -- Command for routing a payment (low-level) -=============================================================== - -SYNOPSIS --------- - -**getroute** *id* *amount\_msat* *riskfactor* [*cltv*] [*fromid*] [*fuzzpercent*] [*exclude*] [*maxhops*] - -DESCRIPTION ------------ - -The **getroute** RPC command attempts to find the best route for the payment of *amount\_msat* to lightning node *id*, such that the payment will arrive at *id* with *cltv*. - -There are two considerations for how good a route is: how low the fees are, and how long your payment will get stuck in a delayed output if a node goes down during the process. . - -- **id** (pubkey): Node pubkey to find the best route for the payment. -- **amount\_msat** (msat): Amount to send. 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 0 value is special: it ignores any *htlc\_minimum\_msat* setting on channels, and simply returns a possible route (if any) which is useful for simple probing. -- **riskfactor** (u64): A non-negative floating-point field controls this tradeoff; it is the annual cost of your funds being stuck (as a percentage). For example, if you thought the convenience of keeping your funds liquid (not stuck) was worth 20% per annum interest, *riskfactor* would be 20. If you didn't care about risk, *riskfactor* would be zero. -- **cltv** (u32, optional): Cltv-blocks to spare. The default is 9. -- **fromid** (pubkey, optional): The node to start the route from. The default is this node. -- **fuzzpercent** (u32, optional): Used to distort fees to provide some randomization to the route generated, but it was not properly implemented and is ignored. -- **exclude** (array of strings, optional): A JSON array of short-channel-id/direction (e.g. ['564334x877x1/0', '564195x1292x0/1' ]) or node-id which should be excluded from consideration for routing. Note if the source or destination is excluded, the command result is undefined. The default is not to exclude any channels or nodes.: - - (string, optional) -- **maxhops** (u32, optional): The maximum number of channels to return. The default is 20. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:getroute#1", - "method": "getroute", - "params": { - "id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "amount_msat": 50000000, - "riskfactor": 1, - "cltv": 9, - "fromid": null, - "fuzzpercent": null, - "exclude": null, - "maxhops": null - } -} -{ - "id": "example:getroute#2", - "method": "getroute", - "params": { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "amount_msat": "50000sat", - "riskfactor": 10 - } -} -``` - -RISKFACTOR EFFECT ON ROUTING ----------------------------- - -The risk factor is treated as if it were an additional fee on the route, for the purposes of comparing routes. - -The formula used is the following approximation: - - risk-fee = amount x blocks-timeout x per-block-cost - -We are given a *riskfactor* expressed as a percentage. There are 52596 blocks per year, thus *per-block-cost* is *riskfactor* divided by 5,259,600. - -The final result is: - - risk-fee = amount x blocks-timeout x riskfactor / 5259600 - -Here are the risk fees in millisatoshis, using various parameters. I assume a channel charges the default of 1000 millisatoshis plus 1 part-per-million. Common to\_self\_delay values on the network at 14 and 144 blocks. - - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Amount (msat)RiskfactorDelayRisk FeeRoute fee

10,000

1

14

0

1001

10,000

10

14

0

1001

10,000

100

14

2

1001

10,000

1000

14

26

1001

1,000,000

1

14

2

1001

1,000,000

10

14

26

1001

1,000,000

100

14

266

1001

1,000,000

1000

14

2661

1001

100,000,000

1

14

266

1100

100,000,000

10

14

2661

1100

100,000,000

100

14

26617

1100

100,000,000

1000

14

266179

1100

10,000

1

144

0

1001

10,000

10

144

2

1001

10,000

100

144

27

1001

10,000

1000

144

273

1001

1,000,000

1

144

27

1001

1,000,000

10

144

273

1001

1,000,000

100

144

2737

1001

1,000,000

1000

144

27378

1001

100,000,000

1

144

2737

1100

100,000,000

10

144

27378

1100

100,000,000

100

144

273785

1100

100,000,000

1000

144

2737850

1100

- -RECOMMENDED RISKFACTOR VALUES ------------------------------ - -The default *fuzz* factor is 5%, so as you can see from the table above, that tends to overwhelm the effect of *riskfactor* less than about 5. - -1 is a conservative value for a stable lightning network with very few failures. - -1000 is an aggressive value for trying to minimize timeouts at all costs. - -The default for lightning-pay(7) is 10, which starts to become a major factor for larger amounts, and is basically ignored for tiny ones. - -RETURN VALUE ------------- - -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. -- **amount\_msat** (msat): The amount expected by the node at the end of this hop. -- **delay** (u32): The total CLTV expected by the node at the end of this hop. -- **style** (string) (always "tlv"): The features understood by the destination node. - -The final *id* will be the destination *id* given in the input. The difference between the first *amount\_msat* minus the *amount\_msat* given in the input is the fee (assuming the first hop is free). The first *delay* is the very worst case timeout for the payment failure, in blocks. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "route": [ - { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "channel": "103x3x0", - "direction": 1, - "amount_msat": 50001002, - "delay": 21, - "style": "tlv" - }, - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "channel": "103x1x0", - "direction": 1, - "amount_msat": 50000501, - "delay": 15, - "style": "tlv" - }, - { - "id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "channel": "103x2x0", - "direction": 0, - "amount_msat": 50000000, - "delay": 9, - "style": "tlv" - } - ] -} -{ - "route": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "channel": "103x2x0", - "direction": 1, - "amount_msat": 50051000, - "delay": 15, - "style": "tlv" - }, - { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "channel": "103x1x0", - "direction": 0, - "amount_msat": 50000000, - "delay": 9, - "style": "tlv" - } - ] -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-pay(7), lightning-sendpay(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-help.7.md b/doc/lightning-help.7.md deleted file mode 100644 index 981fb518dfa8..000000000000 --- a/doc/lightning-help.7.md +++ /dev/null @@ -1,94 +0,0 @@ -lightning-help -- Command to return all information about RPC commands. -======================================================================= - -SYNOPSIS --------- - -**help** [*command*] - -DESCRIPTION ------------ - -The **help** is a RPC command which is possible consult all information about the RPC commands, or a specific command if *command* is given. - -Note that the lightning-cli(1) tool will prefer to list a man page when a specific *command* is specified, and will only return the JSON if the man page is not found. - -- **command** (string, optional): Command to get information about. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:help#1", - "method": "help", - "params": { - "command": "pay" - } -} -{ - "id": "example:help#2", - "method": "help", - "params": { - "command": "dev" - } -} -``` - -RETURN VALUE ------------- - -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). - - **description** (string): A one-line description of the purpose of this command. - - **verbose** (string): A full description of this command (including whether it's deprecated). -- **format-hint** (string, optional) (always "simple"): Prints the help in human-readable flat form. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "help": [ - { - "command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]", - "category": "plugin", - "description": "Send payment specified by {bolt11}", - "verbose": "Attempt to pay the {bolt11} invoice." - } - ], - "format-hint": "simple" -} -{ - "help": [ - { - "command": "dev subcommand=crash|rhash|slowcmd", - "category": "developer", - "description": "Developer command test multiplexer", - "verbose": "dev rhash {secret}\n\tShow SHA256 of {secret}\ndev crash\n\tCrash lightningd by calling fatal()\ndev slowcmd {msec}\n\tTorture test for slow commands, optional {msec}\n" - } - ], - "format-hint": "simple" -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-invoice.7.md b/doc/lightning-invoice.7.md deleted file mode 100644 index ce92d6e25163..000000000000 --- a/doc/lightning-invoice.7.md +++ /dev/null @@ -1,138 +0,0 @@ -lightning-invoice -- Command for accepting payments -=================================================== - -SYNOPSIS --------- - -**invoice** *amount\_msat* *label* *description* [*expiry*] [*fallbacks*] [*preimage*] [*exposeprivatechannels*] [*cltv*] [*deschashonly*] - -DESCRIPTION ------------ - -The **invoice** RPC command creates the expectation of a payment of a given amount of milli-satoshi: it returns a unique token which another lightning daemon can use to pay this invoice. This token includes a *route hint* description of an incoming channel with capacity to pay the invoice, if any exists. - -- **amount\_msat** (msat\_or\_any): The string `any`, which creates an invoice that can be paid with any amount. Otherwise it is 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*. -- **label** (one of): A unique string or number (which is treated as a string, so `01` is different from `1`); it is never revealed to other nodes on the lightning network, but it can be used to query the status of this invoice.: - - (string) - - (integer) -- **description** (string): A short description of purpose of payment, e.g. *1 cup of coffee*. This value is encoded into the BOLT11 invoice and is viewable by any node you send this invoice to (unless *deschashonly* is true as described below). It must be UTF-8, and cannot use *\u* JSON escape codes. -- **expiry** (u64, optional): The time the invoice is valid for, in seconds. If no value is provided the default of 604800 (1 week) is used. -- **fallbacks** (array of strings, optional): One or more fallback addresses to include in the invoice (in order from most- preferred to least): note that these arrays are not currently tracked to fulfill the invoice.: - - (string, optional) -- **preimage** (hex, optional): A 64-digit hex string to be used as payment preimage for the created invoice. By default, if unspecified, lightningd will generate a secure pseudorandom preimage seeded from an appropriate entropy source on your system. **IMPORTANT**: if you specify the *preimage*, you are responsible, to ensure appropriate care for generating using a secure pseudorandom generator seeded with sufficient entropy, and keeping the preimage secret. This parameter is an advanced feature intended for use with cutting-edge cryptographic protocols and should not be used unless explicitly needed. -- **exposeprivatechannels** (one of, optional): If specified, it overrides the default route hint logic, which will use unpublished channels only if there are no published channels.: - - (boolean): If *True* unpublished channels are always considered as a route hint candidate; if *False*, never. - - (array of short\_channel\_ids): Array of short channel ids (or a remote alias), only those specific channels will be considered candidates, even if they are public or dead-ends. - - (short\_channel\_id, optional) - - (short\_channel\_id): If it is a short channel id (e.g. *1x1x3*), only this specific channel will be considered candidate, even if it is public or dead-end. -- **cltv** (u32, optional): If specified, sets the *min\_final\_cltv\_expiry* for the invoice. Otherwise, it's set to the parameter **cltv-final**. -- **deschashonly** (boolean, optional): If True, then the bolt11 returned contains a hash of the *description*, rather than the *description* itself: this allows much longer descriptions, but they must be communicated via some other mechanism. The default is False. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:invoice#1", - "method": "invoice", - "params": { - "amount_msat": 11000000, - "label": "xEoCR94SIz6UIRUEkxum", - "description": [ - "XEoCR94SIz6UIRUEkxum." - ], - "expiry": null, - "fallbacks": null, - "preimage": null, - "exposeprivatechannels": null, - "cltv": null, - "deschashonly": null - } -} -{ - "id": "example:invoice#2", - "method": "invoice", - "params": { - "amount_msat": 100, - "label": "8", - "description": "inv", - "expiry": null, - "fallbacks": null, - "preimage": null, - "exposeprivatechannels": null, - "cltv": null, - "deschashonly": null - } -} -``` - -RETURN VALUE ------------- - -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. -- **payment\_secret** (secret): The *payment\_secret* to place in the onion. -- **expires\_at** (u64): UNIX timestamp of when invoice expires. -- **created\_index** (u64): 1-based index indicating order this invoice was created in. *(added v23.08)* - -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. -- **warning\_private\_unused**: There would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't. -- **warning\_mpp**: There is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "payment_hash": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "expires_at": 1706757730, - "bolt11": "lnbcrt110u1pjmr5lzsp5sfjyj3xn7ux592k36hmmt4ax98n6lgct22wvj54yck0upcmep63qpp5qu436g855lr40ftdt7csatk5pdvtdzzfmfqluwtvm0fds95jsadqdpq0pzk7s6j8y69xjt6xe25j5j4g44hsatdxqyjw5qcqp99qxpqysgquwma3zrw4cd8e8j4u9uh4gxukaacckse64kx2l9dqv8rvrysdq5r5dt38t9snqj9u5ar07h2exr4fg56wpudkhkk7gtxlyt72ku5fpqqd4fnlk", - "payment_secret": "82644944d3f70d42aad1d5f7b5d7a629e7afa30b529cc952a4c59fc0e3790ea2", - "created_index": 1, - "warning_deadends": "Insufficient incoming capacity, once dead-end peers were excluded" -} -{ - "payment_hash": "f59ae0204dfe8e913207ea36646255b9d2c7c8229e8693d30547fc622eddb6b4", - "expires_at": 1709229182, - "bolt11": "lnbcrt1n1pja0z07sp5n8fk890nrq7zlcue0lgu7cduaaz765u5rg0kcud4amphuppu8wxspp57kdwqgzdl68fzvs8agmxgcj4h8fv0jpzn6rf85c9gl7xytkak66qdq9d9h8vxqyjw5qcqp99qxpqysgqrneaxh0plvjft457yv3q92rak57a6xw33m6phr0mrsy69sudzgez3adkzdsgwzy32z5usjpxm4rjgcg70h047wf0pgc4l9gyaj2h9ssqcrtv32", - "payment_secret": "99d36395f3183c2fe3997fd1cf61bcef45ed53941a1f6c71b5eec37e043c3b8d", - "created_index": 9, - "warning_capacity": "Insufficient incoming channel capacity to pay invoice" -} -``` - -ERRORS ------- - -On failure, an error is returned and no invoice is created. If the -lightning process fails before responding, the caller should use -lightning-listinvoices(7) to query whether this invoice was created or -not. - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 900: An invoice with the given *label* already exists. -- 901: An invoice with the given *preimage* already exists. -- 902: None of the specified *exposeprivatechannels* were usable. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listinvoices(7), lightning-delinvoice(7), lightning-pay(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-invoicerequest.7.md b/doc/lightning-invoicerequest.7.md deleted file mode 100644 index 069f6128979b..000000000000 --- a/doc/lightning-invoicerequest.7.md +++ /dev/null @@ -1,85 +0,0 @@ -lightning-invoicerequest -- Command for offering payments -========================================================= - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - -**invoicerequest** *amount* *description* [*issuer*] [*label*] [*absolute\_expiry*] [*single\_use*] - -DESCRIPTION ------------ - -Command *added* in v22.11. - -The **invoicerequest** RPC command creates an `invoice_request` to send payments: it automatically enables the processing of an incoming invoice, and payment of it. The reader of the resulting `invoice_request` can use lightning-sendinvoice(7) to collect their payment. - -- **amount** (msat): 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*. -- **description** (string): A short description of purpose of the payment, e.g. *ATM withdrawl*. This value is encoded into the resulting `invoice_request` and is viewable by anyone you expose it to. It must be UTF-8, and cannot use *\u* JSON escape codes. -- **issuer** (string, optional): Who is issuing it (i.e. you) if appropriate. -- **label** (string, optional): An internal-use name for the offer, which can be any UTF-8 string. -- **absolute\_expiry** (u64, optional): The time the offer is valid until, in seconds since the first day of 1970 UTC. If not set, the `invoice_request` remains valid (though it can be deactivated by the issuer of course). This is encoded in the `invoice_request`. -- **single\_use** (boolean, optional): Indicates that the `invoice_request` is only valid once; we may attempt multiple payments, but as soon as one is successful no more invoices are accepted (i.e. only one person can take the money). The default is True. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:invoicerequest#1", - "method": "invoicerequest", - "params": { - "amount": "10000sat", - "description": "simple test", - "issuer": "clightning test suite" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **invreq\_id** (hash): The SHA256 hash of all invoice\_request fields less than 160. -- **active** (boolean) (always *true*): Whether the invoice\_request is currently active. -- **single\_use** (boolean): Whether the invoice\_request will become inactive after we pay an invoice for it. -- **bolt12** (string): The bolt12 string starting with lnr. -- **used** (boolean) (always *false*): Whether the invoice\_request has already been used. -- **label** (string, optional): The label provided when creating the invoice\_request. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "invreq_id": "715484ead84bcdae5b33e3015c686fa1bdd4ae9ade3c4729b58257a98cfcd9b5", - "active": true, - "single_use": true, - "bolt12": "lnr1qqgteyhfyp40c79a5y3gfe33nxfs6zstwd5k6urvv5s8getnwsfp2cmvd9nksarwd9hxwgr5v4ehggrnw45hge2syqrzymjxzydqkkw24ufxqslttwlj3s608f0rx2slc7etw0833zgs75srnztgqkppqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq633uzq99smfawuu6pz0zh9jl6dl8v25u3kzes975x2j9tr0qp0ux0tlzcxjrgehxh9luz5vwjpk92tys9f9zlm038krcz4uqfxgelwf43tgfc", - "used": false -} -``` - -ERRORS ------- - -On failure, an error is returned and no `invoice_request` is created. If the lightning process fails before responding, the caller should use lightning-listinvoicerequests(7) to query whether it was created or not. - -- -1: Catchall nonspecific error. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listinvoicerequests(7), lightning-disableinvoicerequest(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-keysend.7.md b/doc/lightning-keysend.7.md deleted file mode 100644 index 1f16abb9b403..000000000000 --- a/doc/lightning-keysend.7.md +++ /dev/null @@ -1,202 +0,0 @@ -lightning-keysend -- Send funds to a node without an invoice -============================================================ - -SYNOPSIS --------- - -**keysend** *destination* *amount\_msat* [*label*] [*maxfeepercent*] [*retry\_for*] [*maxdelay*] [*exemptfee*] [*routehints*] [*extratlvs*] - -DESCRIPTION ------------ - -The **keysend** RPC command attempts to find a route to the given destination, and send the specified amount to it. Unlike the `pay` RPC command the `keysend` command does not require an invoice, instead it uses the `destination` node ID, and `amount` to find a route to the specified node. - -In order for the destination to be able to claim the payment, the `payment_key` is randomly generated by the sender and included in the encrypted payload for the destination. As a consequence there is not proof-of-payment, like there is with an invoice where the `payment_key` is generated on the destination, and the only way sender could have it is by sending a payment. Please ensure that this matches your use-case when using `keysend`. - -When using *lightning-cli*, you may skip optional parameters by using *null*. Alternatively, use **-k** option to provide parameters by name. - -- **destination** (pubkey): The 33 byte, hex-encoded, node ID of the node that the payment should go to. -- **amount\_msat** (msat): A whole number, or a whole number with suffix `msat` or `sat`, or a three decimal point number with suffix `sat`, or an 1 to 11 decimal point number suffixed by `btc`. -- **label** (string, optional): Used to attach a label to payments, and is returned in lightning-listpays(7) and lightning-listsendpays(7). -- **maxfeepercent** (number, optional): Limits the money paid in fees as percentage of the total amount that is to be transferred. The default is 0.5. -- **retry\_for** (u32, optional): Until *retry\_for* seconds passes, the command will keep finding routes and retrying the payment. However, a payment may be delayed for up to `maxdelay` blocks by another node; clients should be prepared for this worst case. The default is 60 seconds. -- **maxdelay** (u32, optional): Number of blocks the payment may be delayed. -- **exemptfee** (msat, optional): Used for tiny payments which would be dominated by the fee leveraged by forwarding nodes. Setting `exemptfee` allows the `maxfeepercent` check to be skipped on fees that are smaller than *exemptfee*. The default is 5000 millisatoshi. -- **routehints** (array of arrays, optional): - - (array of objects) - - **id** (pubkey) - - **scid** (short\_channel\_id) - - **feebase** (msat) - - **feeprop** (u32) - - **expirydelta** (u16) -- **extratlvs** (object, optional): Dictionary of additional fields to insert into the final tlv. The format is 'fieldnumber': 'hexstring'.: - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:keysend#1", - "method": "keysend", - "params": { - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "amount_msat": 10000, - "label": null, - "maxfeepercent": null, - "retry_for": null, - "maxdelay": null, - "exemptfee": null, - "extratlvs": null - } -} -{ - "id": "example:keysend#2", - "method": "keysend", - "params": { - "destination": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "amount_msat": 10000000, - "label": null, - "maxfeepercent": null, - "retry_for": null, - "maxdelay": null, - "exemptfee": null, - "extratlvs": { - "133773310": "68656c6c6f776f726c64", - "133773312": "66696c7465726d65" - } - } -} -{ - "id": "example:keysend#3", - "method": "keysend", - "params": { - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "amount_msat": 10000, - "routehints": [ - [ - { - "scid": "4615051x2233541x57738", - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "feebase": 1, - "feeprop": 10, - "expirydelta": 9 - } - ], - [ - { - "scid": "1x2x3", - "id": "020202020202020202020202020202020202020202020202020202020202020202", - "feebase": 1, - "feeprop": 1, - "expirydelta": 9 - } - ] - ] - } -} -``` - -RANDOMIZATION -------------- - -To protect user privacy, the payment algorithm performs some randomization. - -1: Route Randomization - -Route randomization means the payment algorithm does not always use the lowest-fee or shortest route. This prevents some highly-connected node from learning all of the user payments by reducing their fees below the network average. - -2: Shadow Route - -Shadow route means the payment algorithm will virtually extend the route by adding delays and fees along it, making it appear to intermediate nodes that the route is longer than it actually is. This prevents intermediate nodes from reliably guessing their distance from the payee. - -Route randomization will never exceed *maxfeepercent* of the payment. Route randomization and shadow routing will not take routes that would exceed *maxdelay*. - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **payment\_preimage** (secret): The proof of payment: SHA256 of this **payment\_hash**. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **created\_at** (number): The UNIX timestamp showing when this payment was initiated. -- **parts** (u32): How many attempts this took. -- **amount\_msat** (msat): Amount the recipient received. -- **amount\_sent\_msat** (msat): Total amount we sent (including fees). -- **status** (string) (always "complete"): Status of payment. -- **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. - -You can monitor the progress and retries of a payment using the lightning-paystatus(7) command. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "payment_hash": "b6f88603008a9f7dd84b1b94c7b972c8efbaf0b86c8d3c04512955992da9028e", - "created_at": 1706315742.6861734, - "parts": 1, - "amount_msat": 10000, - "amount_sent_msat": 10001, - "payment_preimage": "7178cf708e34dce816fc35aa692a65e1f85b92ae03bbc8ae6543302511823174", - "status": "complete" -} -{ - "destination": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "payment_hash": "e8474eea8d5673e8407ef5f4924e58479b51a68afd136384683d5d6a97c9520d", - "created_at": 1708640424.1810749, - "parts": 1, - "amount_msat": 10000000, - "amount_sent_msat": 10000000, - "payment_preimage": "40e47272ea7da20c57a2381d81a5513ec03bd8ead9d51fbd2a91ec76d3f4bcbf", - "status": "complete" -} -{ - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "payment_hash": "56e12e6f45120bef7385c9bf307319eaa6a1b9160cdb3e62a3f492abf5bfa4bc", - "created_at": 1708640437.2895157, - "parts": 1, - "amount_msat": 10000, - "amount_sent_msat": 10001, - "payment_preimage": "682870b8f96e2aed1c86694dbb2c3e64cd396b9bba9fafd824d90eb0bd371b85", - "status": "complete" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 203: Permanent failure at destination. The *data* field of the error will be routing failure object. -- 205: Unable to find a route. -- 206: Route too expensive. Either the fee or the needed total locktime for the route exceeds your *maxfeepercent* or *maxdelay* settings, respectively. The *data* field of the error will indicate the actual *fee* as well as the *feepercent* percentage that the fee has of the destination payment amount. It will also indicate the actual *delay* along the route. -- 210: Payment timed out without a payment in progress. - -A routing failure object has the fields below: - -*erring\_index*: The index of the node along the route that reported the error. 0 for the local node, 1 for the first hop, and so on. -*erring\_node*: The hex string of the pubkey id of the node that reported the error. -*erring\_channel*: The short channel ID of the channel that has the error, or *0:0:0* if the destination node raised the error. -*failcode*: The failure code, as per BOLT #4. -*channel\_update*: The hex string of the *channel\_update* message received from the remote node. Only present if error is from the remote node and the *failcode* has the `UPDATE` bit set, as per BOLT #4. - -AUTHOR ------- - -Christian Decker <> is mainly responsible. - -SEE ALSO --------- - -lightning-listpays(7), lightning-decodepay(7), lightning-listinvoice(7), lightning-delinvoice(7), lightning-getroute(7), lightning-invoice(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listchannels.7.md b/doc/lightning-listchannels.7.md deleted file mode 100644 index ab1ee903dc40..000000000000 --- a/doc/lightning-listchannels.7.md +++ /dev/null @@ -1,139 +0,0 @@ -lightning-listchannels -- Command to query active lightning channels in the entire network -========================================================================================== - -SYNOPSIS --------- - -**listchannels** [*short\_channel\_id*] [*source*] [*destination*] - -DESCRIPTION ------------ - -The **listchannels** RPC command returns data on channels that are known to the node. Because channels may be bidirectional, up to 2 objects will be returned for each channel (one for each direction). - -Only one of *short\_channel\_id*, *source* or *destination* can be supplied. If nothing is supplied, data on all lightning channels known to this node, are returned. These can be local channels or public channels broadcast on the gossip network. - -- **short\_channel\_id** (short\_channel\_id, optional): If short\_channel\_id is a short channel id, then only known channels with a matching short\_channel\_id are returned. Otherwise, it must be null. -- **source** (pubkey, optional): If source is a node id, then only channels leading from that node id are returned. -- **destination** (pubkey, optional): If destination is a node id, then only channels leading to that node id are returned. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listchannels#1", - "method": "listchannels", - "params": { - "short_channel_id": "103x1x0", - "source": null, - "destination": null - } -} -{ - "id": "example:listchannels#2", - "method": "listchannels", - "params": { - "short_channel_id": null, - "source": null, - "destination": null - } -} -``` - -RETURN VALUE ------------- - -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. -- **direction** (u32): Direction (0 if source < destination, 1 otherwise). -- **public** (boolean): True if this is announced (from *v24.02*, being false is deprecated). -- **amount\_msat** (msat): The total capacity of this channel (always a whole number of satoshis). -- **message\_flags** (u8): As defined by BOLT #7. -- **channel\_flags** (u8): As defined by BOLT #7. -- **active** (boolean): True unless source has disabled it (or (deprecated in *v24.02*) it's a local channel and the peer is disconnected or it's still opening or closing). -- **last\_update** (u32): UNIX timestamp on the last channel\_update from *source*. -- **base\_fee\_millisatoshi** (u32): Base fee changed by *source* to use this channel. -- **fee\_per\_millionth** (u32): Proportional fee changed by *source* to use this channel, in parts-per-million. -- **delay** (u32): The number of blocks delay required by *source* to use this channel. -- **htlc\_minimum\_msat** (msat): The smallest payment *source* will allow via this channel. -- **features** (hex): BOLT #9 features bitmap for this channel. -- **htlc\_maximum\_msat** (msat, optional): The largest payment *source* will allow via this channel. - -If one of *short\_channel\_id*, *source* or *destination* is supplied and no matching channels are found, a 'channels' object with an empty list is returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channels": [] -} -{ - "channels": [ - { - "source": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "destination": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "short_channel_id": "103x1x0", - "direction": 0, - "public": true, - "amount_msat": 1000000000, - "message_flags": 1, - "channel_flags": 0, - "active": true, - "last_update": 1706153393, - "base_fee_millisatoshi": 1, - "fee_per_millionth": 10, - "delay": 6, - "htlc_minimum_msat": 0, - "htlc_maximum_msat": 990000000, - "features": "" - }, - { - "source": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "short_channel_id": "103x1x0", - "direction": 1, - "public": true, - "amount_msat": 1000000000, - "message_flags": 1, - "channel_flags": 1, - "active": true, - "last_update": 1706153393, - "base_fee_millisatoshi": 1, - "fee_per_millionth": 10, - "delay": 6, - "htlc_minimum_msat": 0, - "htlc_maximum_msat": 990000000, - "features": "" - } - ] -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. - -AUTHOR ------- - -Michael Hawkins <>. - -SEE ALSO --------- - -lightning-fundchannel(7), lightning-listnodes(7) - -RESOURCES ---------- - -Main web site: - -BOLT #7: diff --git a/doc/lightning-listclosedchannels.7.md b/doc/lightning-listclosedchannels.7.md deleted file mode 100644 index 324edb4595d6..000000000000 --- a/doc/lightning-listclosedchannels.7.md +++ /dev/null @@ -1,75 +0,0 @@ -lightning-listclosedchannels -- Get data on our closed historical channels -========================================================================== - -SYNOPSIS --------- - -**listclosedchannels** [*id*] - -DESCRIPTION ------------ - -Command *added* in v23.05. - -The **listclosedchannels** RPC command returns data on channels which are otherwise forgotten (more than 100 blocks after they're completely resolved onchain). - -- **id** (pubkey, optional): If no *id* is supplied, then channel data on all historical channels are given. Supplying *id* will filter the results to only match channels to that peer. Note that prior to v23.05, old peers were forgotten. - -RETURN VALUE ------------- - -On success, an object containing **closedchannels** is returned. It is an array of objects, where each object contains: - -- **channel\_id** (hash): The full channel\_id (funding txid Xored with output number). -- **opener** (string) (one of "local", "remote"): Who initiated the channel. -- **private** (boolean): If True, we will not announce this channel. -- **total\_local\_commitments** (u64): Number of commitment transaction we made. -- **total\_remote\_commitments** (u64): Number of commitment transaction they made. -- **total\_htlcs\_sent** (u64): Number of HTLCs we ever sent. -- **funding\_txid** (txid): ID of the funding transaction. -- **funding\_outnum** (u32): The 0-based output number of the funding transaction which opens the channel. -- **leased** (boolean): Whether this channel was leased from `opener`. -- **total\_msat** (msat): Total amount in the channel. -- **final\_to\_us\_msat** (msat): Our balance in final commitment transaction. -- **min\_to\_us\_msat** (msat): Least amount owed to us ever. If the peer were to successfully steal from us, this is the amount we would still retain. -- **max\_to\_us\_msat** (msat): Most amount owed to us ever. If we were to successfully steal from the peer, this is the amount we could potentially get. -- **close\_cause** (string) (one of "unknown", "local", "user", "remote", "protocol", "onchain"): What caused the channel to close. -- **peer\_id** (pubkey, optional): Peer public key (can be missing with pre-v23.05 closes!). -- **short\_channel\_id** (short\_channel\_id, optional): The short\_channel\_id. -- **alias** (object, optional): - - **local** (short\_channel\_id, optional): An alias assigned by this node to this channel, used for outgoing payments. - - **remote** (short\_channel\_id, optional): An alias assigned by the remote node to this channel, usable in routehints and invoices. -- **closer** (string, optional) (one of "local", "remote"): Who initiated the channel close (only present if closing). -- **channel\_type** (object, optional): Channel\_type as negotiated with peer.: - - **bits** (array of u32s): Each bit set in this channel\_type.: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type.: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. -- **funding\_fee\_paid\_msat** (msat, optional): How much we paid to lease the channel (iff `leased` is true and `opener` is local). -- **funding\_fee\_rcvd\_msat** (msat, optional): How much they paid to lease the channel (iff `leased` is true and `opener` is remote). -- **funding\_pushed\_msat** (msat, optional): How much `opener` pushed immediate (if non-zero). -- **last\_commitment\_txid** (hash, optional): The final commitment tx's txid (or mutual close, if we accepted it). Not present for some very old, small channels pre-0.7.0. -- **last\_commitment\_fee\_msat** (msat, optional): The fee on `last_commitment_txid`. -- **last\_stable\_connection** (u64, optional): Last time we reestablished the open channel and stayed connected for 1 minute. *(added v24.02)* - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. - -AUTHOR ------- - -Rusty Russell <>. - -SEE ALSO --------- - -lightning-listpeerchannels(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listconfigs.7.md b/doc/lightning-listconfigs.7.md deleted file mode 100644 index 14c59bae34a8..000000000000 --- a/doc/lightning-listconfigs.7.md +++ /dev/null @@ -1,829 +0,0 @@ -lightning-listconfigs -- Command to list all configuration options. -=================================================================== - -SYNOPSIS --------- - -**listconfigs** [*config*] - -DESCRIPTION ------------ - -The **listconfigs** RPC command to list all configuration options, or with *config* only one. - -- **config** (string, optional): Configuration option name to restrict return. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listconfigs#1", - "method": "listconfigs", - "params": { - "config": "network" - } -} -{ - "id": "example:listconfigs#2", - "method": "listconfigs", - "params": { - "config": null - } -} -{ - "id": "example:listconfigs#3", - "method": "listconfigs", - "params": { - "config": "experimental-dual-fund" - } -} -``` - -RETURN VALUE ------------- - -The returned values reflect the current configuration, including showing default values (`dev-` options are not shown unless specified as *config* explicitly). - -Note: as plugins can add options, not all configuration settings are listed here! The format of each entry is as follows: - -- **source** (string): source of configuration setting (`file`:`linenum`) -- **dynamic** (boolean, optional): true if this option is settable via setconfig -- **plugin** (string, optional): set if this is from a plugin - -Depending on the option type, exactly one of the following is present: - -- **set** (boolean, optional): for simple flag options -- **value\_str** (string, optional): for string options -- **value\_msat** (msat, optional): for msat options -- **value\_int** (integer, optional): for integer options -- **value\_bool** (boolean, optional): for boolean options -On success, an object is returned, containing: - -- **configs** (object, optional) *(added v23.08)*: - - **conf** (object, optional): - - **value\_str** (string): Field from cmdline. - - **source** (string) (always "cmdline"): Source of configuration setting. - - **developer** (object, optional) *(added v23.08)*: - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **clear-plugins** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **disable-mpp** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **plugin** (string, optional): Plugin which registered this configuration setting. - - **mainnet** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **regtest** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **signet** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **testnet** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **important-plugin** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **plugin** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **plugin-dir** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **lightning-dir** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **network** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default (can also be changed by `testnet`, `signet`, `regtest` options!). - - **source** (string): Source of configuration setting. - - **allow-deprecated-apis** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **rpc-file** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **disable-plugin** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **always-use-proxy** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **daemon** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **wallet** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **large-channels** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **experimental-dual-fund** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **experimental-splicing** (object, optional) *(added v23.08)*: - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **experimental-onion-messages** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **experimental-offers** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **experimental-shutdown-wrong-funding** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **experimental-websocket-port** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **experimental-peer-storage** (object, optional) *(added v23.02)*: - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **experimental-anchors** (object, optional) *(added v23.08)*: - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **database-upgrade** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **rgb** (object, optional): - - **value\_str** (hex) (always 6 characters): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **alias** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **pid-file** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **ignore-fee-limits** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **watchtime-blocks** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **max-locktime-blocks** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **funding-confirms** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **cltv-delta** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **cltv-final** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **commit-time** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **fee-base** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **rescan** (object, optional): - - **value\_int** (integer): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **fee-per-satoshi** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **max-concurrent-htlcs** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **htlc-minimum-msat** (object, optional): - - **value\_msat** (msat): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **htlc-maximum-msat** (object, optional): - - **value\_msat** (msat): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **max-dust-htlc-exposure-msat** (object, optional): - - **value\_msat** (msat): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **min-capacity-sat** (object, optional): - - **value\_int** (u64): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **dynamic** (boolean, optional) (always *true*): Can this be set by setconfig(). - - **addr** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **announce-addr** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **bind-addr** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **offline** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **autolisten** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **proxy** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **disable-dns** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **announce-addr-discovered** (object, optional) *(added v23.02)*: - - **value\_str** (string) (one of "true", "false", "auto"): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **announce-addr-discovered-port** (object, optional) *(added v23.02)*: - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **encrypted-hsm** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **rpc-file-mode** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **log-level** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **log-prefix** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **log-file** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **log-timestamps** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **force-feerates** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **subdaemon** (object, optional): - - **values\_str** (array of strings): - - (string, optional): Field from config or cmdline. - - **sources** (array of strings): - - (string, optional): Source of configuration setting. - - **fetchinvoice-noconnect** (object, optional): - - **set** (boolean): `true` if set in config or cmdline. - - **source** (string): Source of configuration setting. - - **accept-htlc-tlv-types** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **tor-service-password** (object, optional): - - **value\_str** (string): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **announce-addr-dns** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **require-confirmed-inputs** (object, optional): - - **value\_bool** (boolean): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **commit-fee** (object, optional): - - **value\_int** (u64): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. - - **commit-feerate-offset** (object, optional): - - **value\_int** (u32): Field from config or cmdline, or default. - - **source** (string): Source of configuration setting. -- **# version** (string, optional): Special field indicating the current version. **deprecated in v23.08, removed after v24.02** -- **plugins** (array of objects, optional) **deprecated in v23.08, removed after v24.02**: - - **path** (string): Full path of the plugin. - - **name** (string): Short name of the plugin. - - **options** (object, optional): Specific options set for this plugin.: -- **important-plugins** (array of objects, optional) **deprecated in v23.08, removed after v24.02**: - - **path** (string): Full path of the plugin. - - **name** (string): Short name of the plugin. - - **options** (object, optional): Specific options set for this plugin.: -- **conf** (string, optional): `conf` field from cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **lightning-dir** (string, optional): `lightning-dir` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **network** (string, optional): `network` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **allow-deprecated-apis** (boolean, optional): `allow-deprecated-apis` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **rpc-file** (string, optional): `rpc-file` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **disable-plugin** (array of strings, optional) **deprecated in v23.08, removed after v24.02**: - - (string, optional): `disable-plugin` field from config or cmdline. -- **bookkeeper-dir** (string, optional): `bookkeeper-dir` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **bookkeeper-db** (string, optional): `bookkeeper-db` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **always-use-proxy** (boolean, optional): `always-use-proxy` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **daemon** (boolean, optional): `daemon` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **wallet** (string, optional): `wallet` field from config or cmdline default. **deprecated in v23.08, removed after v24.02** -- **large-channels** (boolean, optional): `large-channels` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **experimental-dual-fund** (boolean, optional): `experimental-dual-fund` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **experimental-splicing** (boolean, optional): `experimental-splicing` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **experimental-onion-messages** (boolean, optional): `experimental-onion-messages` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **experimental-offers** (boolean, optional): `experimental-offers` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **experimental-shutdown-wrong-funding** (boolean, optional): `experimental-shutdown-wrong-funding` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **experimental-websocket-port** (u16, optional): `experimental-websocket-port` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **experimental-peer-storage** (boolean, optional): `experimental-peer-storage` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** *(added v23.02)* -- **experimental-quiesce** (boolean, optional): `experimental-quiesce` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** *(added v23.08)* -- **experimental-upgrade-protocol** (boolean, optional): `experimental-upgrade-protocol` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** *(added v23.08)* -- **invoices-onchain-fallback** (boolean, optional): `invoices-onchain-fallback` field from config or cmdline, or default. *(added v23.11)* -- **database-upgrade** (boolean, optional): `database-upgrade` field from config or cmdline. **deprecated in v23.08, removed after v24.02** -- **rgb** (hex, optional) (always 6 characters): `rgb` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **alias** (string, optional): `alias` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **pid-file** (string, optional): `pid-file` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **ignore-fee-limits** (boolean, optional): `ignore-fee-limits` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **watchtime-blocks** (u32, optional): `watchtime-blocks` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **max-locktime-blocks** (u32, optional): `max-locktime-blocks` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **funding-confirms** (u32, optional): `funding-confirms` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **cltv-delta** (u32, optional): `cltv-delta` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **cltv-final** (u32, optional): `cltv-final` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **commit-time** (u32, optional): `commit-time` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **fee-base** (u32, optional): `fee-base` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **rescan** (integer, optional): `rescan` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **fee-per-satoshi** (u32, optional): `fee-per-satoshi` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **max-concurrent-htlcs** (u32, optional): `max-concurrent-htlcs` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **htlc-minimum-msat** (msat, optional): `htlc-minimum-msat` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **htlc-maximum-msat** (msat, optional): `htlc-maximum-msat` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **max-dust-htlc-exposure-msat** (msat, optional): `max-dust-htlc-exposure-mast` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **min-capacity-sat** (u64, optional): `min-capacity-sat` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **addr** (string, optional): `addr` field from config or cmdline (can be more than one). **deprecated in v23.08, removed after v24.02** -- **announce-addr** (string, optional): `announce-addr` field from config or cmdline (can be more than one). **deprecated in v23.08, removed after v24.02** -- **bind-addr** (string, optional): `bind-addr` field from config or cmdline (can be more than one). **deprecated in v23.08, removed after v24.02** -- **offline** (boolean, optional): `true` if `offline` was set in config or cmdline. **deprecated in v23.08, removed after v24.02** -- **autolisten** (boolean, optional): `autolisten` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **proxy** (string, optional): `proxy` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **disable-dns** (boolean, optional): `true` if `disable-dns` was set in config or cmdline. **deprecated in v23.08, removed after v24.02** -- **announce-addr-discovered** (string, optional): `true`/`false`/`auto` depending on how `announce-addr-discovered` was set in config or cmdline. **deprecated in v23.08, removed after v24.02** *(added v23.02)* -- **announce-addr-discovered-port** (integer, optional): Sets the announced TCP port for dynamically discovered IPs. **deprecated in v23.08, removed after v24.02** *(added v23.02)* -- **encrypted-hsm** (boolean, optional): `true` if `encrypted-hsm` was set in config or cmdline. **deprecated in v23.08, removed after v24.02** -- **rpc-file-mode** (string, optional): `rpc-file-mode` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **log-level** (string, optional): `log-level` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **log-prefix** (string, optional): `log-prefix` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **log-file** (string, optional): `log-file` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **log-timestamps** (boolean, optional): `log-timestamps` field from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **force-feerates** (string, optional): Force-feerate configuration setting, if any. **deprecated in v23.08, removed after v24.02** -- **subdaemon** (string, optional): `subdaemon` fields from config or cmdline if any (can be more than one). **deprecated in v23.08, removed after v24.02** -- **fetchinvoice-noconnect** (boolean, optional): `fetchinvoice-noconnect` fields from config or cmdline, or default. **deprecated in v23.08, removed after v24.02** -- **accept-htlc-tlv-types** (string, optional): `accept-htlc-tlv-types` field from config or cmdline, or not present. **deprecated in v23.08, removed after v24.02** -- **tor-service-password** (string, optional): `tor-service-password` field from config or cmdline, if any. **deprecated in v23.08, removed after v24.02** -- **dev-allowdustreserve** (boolean, optional): Whether we allow setting dust reserves. **deprecated in v23.08, removed after v24.02** -- **announce-addr-dns** (boolean, optional): Whether we put DNS entries into node\_announcement. **deprecated in v23.08, removed after v24.02** *(added v22.11.1)* -- **require-confirmed-inputs** (boolean, optional): Request peers to only send confirmed inputs (dual-fund only). **deprecated in v23.08, removed after v24.02** -- **developer** (boolean, optional): Whether developer mode is enabled. *(added v23.08)* -- **commit-fee** (u64, optional): The percentage of the 6-block fee estimate to use for commitment transactions. **deprecated in v23.08, removed after v24.02** *(added v23.05)* -- **min-emergency-msat** (msat, optional): Field from config or cmdline, or default. *(added v23.08)* -- **commit-feerate-offset** (u32, optional): Additional commitment feerate applied by channel owner. *(added v23.11)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "#version": "v0.9.0-1", - "lightning-dir": "/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev", - "network": "testnet", - "allow-deprecated-apis": true, - "rpc-file": "lightning-rpc", - "plugins": [ - { - "path": "/home/vincent/Github/plugins/sauron/sauron.py", - "name": "sauron.py", - "options": { - "sauron-api-endpoint": "http://blockstream.info/testnet/api/", - "sauron-tor-proxy": "" - } - }, - { - "path": "/home/vincent/Github/reckless/reckless.py", - "name": "reckless.py" - } - ], - "important-plugins": [ - { - "path": "/home/vincent/Github/lightning/lightningd/../plugins/autoclean", - "name": "autoclean", - "options": { - "autocleaninvoice-cycle": null, - "autocleaninvoice-expired-by": null - } - }, - { - "path": "/home/vincent/Github/lightning/lightningd/../plugins/fundchannel", - "name": "fundchannel" - }, - { - "path": "/home/vincent/Github/lightning/lightningd/../plugins/keysend", - "name": "keysend" - }, - { - "path": "/home/vincent/Github/lightning/lightningd/../plugins/pay", - "name": "pay", - "options": { - "disable-mpp": false - } - } - ], - "important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/pay", - "plugin": "/home/vincent/Github/reckless/reckless.py", - "disable-plugin": [ - "bcli" - ], - "always-use-proxy": false, - "daemon": "false", - "wallet": "sqlite3:///media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev/testnet/lightningd.sqlite3", - "wumbo": true, - "rgb": "03ad98", - "alias": "BRUCEWAYN-TES-DEV", - "pid-file": "/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev/lightningd-testne...", - "ignore-fee-limits": true, - "watchtime-blocks": 6, - "max-locktime-blocks": 2016, - "funding-confirms": 1, - "commit-fee-min": 0, - "commit-fee-max": 0, - "cltv-delta": 6, - "cltv-final": 10, - "commit-time": 10, - "fee-base": 1, - "rescan": 30, - "fee-per-satoshi": 10, - "max-concurrent-htlcs": 483, - "min-capacity-sat": 10000, - "addr": "autotor:127.0.0.1:9051", - "bind-addr": "127.0.0.1:9735", - "announce-addr": "fp463inc4w3lamhhduytrwdwq6q6uzugtaeapylqfc43agrdnnqsheyd.onion:9735", - "offline": "false", - "autolisten": true, - "proxy": "127.0.0.1:9050", - "disable-dns": "false", - "encrypted-hsm": false, - "rpc-file-mode": "0600", - "log-level": "DEBUG", - "log-prefix": "lightningd" -} -{ - "configs": { - "developer": { - "set": true, - "source": "cmdline" - }, - "lightning-dir": { - "value_str": "/tmp/ltests-giwf5tc7/test_plugin_start_1/lightning-1/", - "source": "cmdline" - }, - "network": { - "value_str": "regtest", - "source": "cmdline" - }, - "testnet": { - "set": false, - "source": "default" - }, - "signet": { - "set": false, - "source": "default" - }, - "mainnet": { - "set": false, - "source": "default" - }, - "regtest": { - "set": false, - "source": "default" - }, - "rpc-file": { - "value_str": "lightning-rpc", - "source": "default" - }, - "allow-deprecated-apis": { - "value_bool": false, - "source": "cmdline" - }, - "plugin": { - "values_str": [ - "~/lightning/target/debug/examples/cln-plugin-startup" - ], - "sources": [ - "cmdline" - ] - }, - "plugin-dir": { - "values_str": [], - "sources": [] - }, - "clear-plugins": { - "set": false, - "source": "default" - }, - "disable-plugin": { - "values_str": [], - "sources": [] - }, - "important-plugin": { - "values_str": [], - "sources": [] - }, - "always-use-proxy": { - "value_bool": false, - "source": "default" - }, - "daemon": { - "set": false, - "source": "default" - }, - "experimental-dual-fund": { - "set": false, - "source": "default" - }, - "experimental-splicing": { - "set": false, - "source": "default" - }, - "experimental-onion-messages": { - "set": false, - "source": "default" - }, - "experimental-offers": { - "set": false, - "source": "default" - }, - "experimental-shutdown-wrong-funding": { - "set": false, - "source": "default" - }, - "experimental-peer-storage": { - "set": false, - "source": "default" - }, - "experimental-quiesce": { - "set": false, - "source": "default" - }, - "experimental-anchors": { - "set": false, - "source": "default" - }, - "rgb": { - "value_str": "0266e4", - "source": "default" - }, - "alias": { - "value_str": "JUNIORBEAM-1-102-g7549e10-modded", - "source": "default" - }, - "pid-file": { - "value_str": "/tmp/ltests-giwf5tc7/test_plugin_start_1/lightning-1/lightningd-regtest.pid", - "source": "default" - }, - "ignore-fee-limits": { - "value_bool": false, - "source": "cmdline" - }, - "watchtime-blocks": { - "value_int": 5, - "source": "cmdline" - }, - "max-locktime-blocks": { - "value_int": 2016, - "source": "default" - }, - "funding-confirms": { - "value_int": 1, - "source": "default" - }, - "require-confirmed-inputs": { - "value_bool": false, - "source": "default" - }, - "cltv-delta": { - "value_int": 6, - "source": "cmdline" - }, - "cltv-final": { - "value_int": 5, - "source": "cmdline" - }, - "commit-time": { - "value_int": 10, - "source": "default" - }, - "fee-base": { - "value_int": 1, - "source": "default" - }, - "rescan": { - "value_int": 1, - "source": "cmdline" - }, - "fee-per-satoshi": { - "value_int": 10, - "source": "default" - }, - "htlc-minimum-msat": { - "value_msat": 0, - "source": "default" - }, - "htlc-maximum-msat": { - "value_msat": 18446744073709552000, - "source": "default" - }, - "max-concurrent-htlcs": { - "value_int": 483, - "source": "default" - }, - "max-dust-htlc-exposure-msat": { - "value_msat": 50000000, - "source": "default" - }, - "min-capacity-sat": { - "value_int": 10000, - "source": "default", - "dynamic": true - }, - "addr": { - "values_str": [ - "127.0.0.1:33157" - ], - "sources": [ - "cmdline" - ] - }, - "bind-addr": { - "values_str": [], - "sources": [] - }, - "announce-addr": { - "values_str": [], - "sources": [] - }, - "announce-addr-discovered": { - "value_str": "auto", - "source": "default" - }, - "announce-addr-discovered-port": { - "value_int": 19846, - "source": "default" - }, - "offline": { - "set": false, - "source": "default" - }, - "autolisten": { - "value_bool": false, - "source": "default" - }, - "accept-htlc-tlv-type": { - "values_int": [], - "sources": [] - }, - "disable-dns": { - "set": true, - "source": "cmdline" - }, - "encrypted-hsm": { - "set": false, - "source": "default" - }, - "rpc-file-mode": { - "value_str": "0600", - "source": "default" - }, - "commit-fee": { - "value_int": 100, - "source": "default" - }, - "commit-feerate-offset": { - "value_int": 5, - "source": "default" - }, - "min-emergency-msat": { - "value_msat": 25000000, - "source": "default" - }, - "subdaemon": { - "values_str": [], - "sources": [] - }, - "experimental-upgrade-protocol": { - "set": false, - "source": "default" - }, - "invoices-onchain-fallback": { - "set": false, - "source": "default" - }, - "log-level": { - "value_str": "debug", - "source": "cmdline" - }, - "log-timestamps": { - "value_bool": true, - "source": "default" - }, - "log-prefix": { - "value_str": "lightningd-1 ", - "source": "cmdline" - }, - "log-file": { - "values_str": [ - "-", - "/tmp/ltests-giwf5tc7/test_plugin_start_1/lightning-1/log" - ], - "sources": [ - "cmdline", - "cmdline" - ] - }, - "dev-no-plugin-checksum": { - "set": true, - "source": "cmdline" - }, - "dev-no-reconnect": { - "set": true, - "source": "cmdline" - }, - "dev-fail-on-subdaemon-fail": { - "set": true, - "source": "cmdline" - }, - "dev-bitcoind-poll": { - "value_int": 1, - "source": "cmdline" - }, - "dev-fast-gossip": { - "set": true, - "source": "cmdline" - }, - "renepay-debug-mcf": { - "set": false, - "source": "default", - "plugin": "~/lightning/plugins/cln-renepay" - }, - "renepay-debug-payflow": { - "set": false, - "source": "default", - "plugin": "~/lightning/plugins/cln-renepay" - }, - "test-option": { - "value_int": 31337, - "source": "cmdline", - "plugin": "~/lightning/target/debug/examples/cln-plugin-startup" - }, - "bitcoin-datadir": { - "value_str": "/tmp/ltests-giwf5tc7/test_plugin_start_1/lightning-1/", - "source": "cmdline", - "plugin": "~/lightning/plugins/bcli" - }, - "bitcoin-rpcuser": { - "value_str": "rpcuser", - "source": "cmdline", - "plugin": "~/lightning/plugins/bcli" - }, - "bitcoin-rpcpassword": { - "value_str": "rpcpass", - "source": "cmdline", - "plugin": "~/lightning/plugins/bcli" - }, - "bitcoin-rpcport": { - "value_int": 51309, - "source": "cmdline", - "plugin": "~/lightning/plugins/bcli" - }, - "disable-mpp": { - "set": false, - "source": "default", - "plugin": "~/lightning/plugins/pay" - } - } -} -{ - "configs": { - "experimental-dual-fund": { - "set": false, - "source": "default" - } - } -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters or field with *config* name doesn't exist. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -SEE ALSO --------- - -lightning-getinfo(7), lightningd-config(5) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listdatastore.7.md b/doc/lightning-listdatastore.7.md deleted file mode 100644 index 7e115feeff9b..000000000000 --- a/doc/lightning-listdatastore.7.md +++ /dev/null @@ -1,95 +0,0 @@ -lightning-listdatastore -- Command for listing (plugin) data -============================================================ - -SYNOPSIS --------- - -**listdatastore** [*key*] - -DESCRIPTION ------------ - -The **listdatastore** RPC command allows plugins to fetch data which was stored in the Core Lightning database. - -- **key** (one of, optional): - - (array of strings): All immediate children of the *key* (or root children) are returned. - Using the first element of the key as the plugin name (e.g. `[ 'summary' ]`) is recommended. - An array of values to form a hierarchy (though a single value is treated as a one-element array). - - (string, optional) - - (string) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listdatastore#1", - "method": "listdatastore", - "params": { - "key": [ - "commando" - ] - } -} -{ - "id": "example:listdatastore#2", - "method": "listdatastore", - "params": { - "key": "otherkey" - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **datastore** is returned. It is an array of objects, where each object contains: - -- **key** (array of strings): - - (string, optional): Part of the key added to the datastore. -- **generation** (u64, optional): The number of times this has been updated. -- **hex** (hex, optional): The hex data from the datastore. -- **string** (string, optional): The data as a string, if it's valid utf-8. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "datastore": [] -} -{ - "datastore": [ - { - "key": [ - "otherkey" - ], - "generation": 0, - "hex": "6f7468657264617461", - "string": "otherdata" - } - ] -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -32602: invalid parameters. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-datastore(7), lightning-deldatastore(7), lightning-datastoreusage(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listforwards.7.md b/doc/lightning-listforwards.7.md deleted file mode 100644 index 262ac726461e..000000000000 --- a/doc/lightning-listforwards.7.md +++ /dev/null @@ -1,147 +0,0 @@ -lightning-listforwards -- Command showing all htlcs and their information -========================================================================= - -SYNOPSIS --------- - -**listforwards** [*status*] [*in\_channel*] [*out\_channel*] [*index* [*start*] [*limit*]] - -DESCRIPTION ------------ - -The **listforwards** RPC command displays all htlcs that have been attempted to be forwarded by the Core Lightning node. - -- **status** (string, optional) (one of "offered", "settled", "local\_failed", "failed"): If specified, then only the forwards with the given status are returned. -- **in\_channel** (short\_channel\_id, optional): Only the matching forwards on the given inbound channel are returned. -- **out\_channel** (short\_channel\_id, optional): Only the matching forwards on the given outbount channel are returned. -- **index** (string, optional) (one of "created", "updated"): If neither *in\_channel* nor *out\_channel* is specified, it controls ordering. The default is `created`. *(added v23.11)* -- **start** (u64, optional): If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7). *(added v23.11)* -- **limit** (u32, optional): If `index` is specified, `limit` can be used to specify the maximum number of entries to return. *(added v23.11)* - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listforwards#1", - "method": "listforwards", - "params": { - "status": null, - "in_channel": null, - "out_channel": null, - "index": null, - "start": null, - "limit": null - } -} -{ - "id": "example:listforwards#2", - "method": "listforwards", - "params": { - "in_channel": "0x1x2", - "out_channel": "0x2x3", - "status": "settled" - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **forwards** is returned. It is an array of objects, where each object contains: - -- **created\_index** (u64): 1-based index indicating order this forward was created in. *(added v23.11)* -- **in\_channel** (short\_channel\_id): The channel that received the HTLC. -- **in\_msat** (msat): The value of the incoming HTLC. -- **status** (string) (one of "offered", "settled", "local\_failed", "failed"): Still ongoing, completed, failed locally, or failed after forwarding. -- **received\_time** (number): The UNIX timestamp when this was received. -- **in\_htlc\_id** (u64, optional): The unique HTLC id the sender gave this (not present if incoming channel was closed before upgrade to v22.11). -- **out\_channel** (short\_channel\_id, optional): The channel that the HTLC (trying to) forward to. -- **out\_htlc\_id** (u64, optional): The unique HTLC id we gave this when sending (may be missing even if out\_channel is present, for old forwards before v22.11). -- **updated\_index** (u64, optional): 1-based index indicating order this forward was changed (only present if it has changed since creation). *(added v23.11)* -- **style** (string, optional) (one of "legacy", "tlv"): Either a legacy onion format or a modern tlv format. - -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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "forwards": [ - { - "created_index": 1, - "updated_index": 1, - "in_channel": "103x1x0", - "in_htlc_id": 0, - "out_channel": "104x1x0", - "out_htlc_id": 0, - "in_msat": 100001001, - "out_msat": 100000000, - "fee_msat": 1001, - "status": "settled", - "style": "tlv", - "received_time": 1706229285.5934534, - "resolved_time": 1706229288.830004 - }, - { - "created_index": 2, - "updated_index": 2, - "in_channel": "103x1x0", - "in_htlc_id": 1, - "out_channel": "105x1x0", - "out_htlc_id": 0, - "in_msat": 100001001, - "out_msat": 100000000, - "fee_msat": 1001, - "status": "failed", - "style": "tlv", - "received_time": 1706229290.0289993, - "resolved_time": 1706229292.9487684 - }, - { - "created_index": 3, - "updated_index": 3, - "in_channel": "103x1x0", - "in_htlc_id": 2, - "out_channel": "106x1x0", - "out_htlc_id": 0, - "in_msat": 100001000, - "out_msat": 99999999, - "fee_msat": 1001, - "status": "local_failed", - "failcode": 16392, - "failreason": "WIRE_PERMANENT_CHANNEL_FAILURE", - "style": "tlv", - "received_time": 1706229295.3175724 - } - ] -} -{ - "forwards": [] -} -``` - -AUTHOR ------- - -Rene Pickhardt <> is mainly responsible. - -SEE ALSO --------- - -lightning-autoclean-status(7), lightning-getinfo(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listfunds.7.md b/doc/lightning-listfunds.7.md deleted file mode 100644 index 6ee0d1804ab7..000000000000 --- a/doc/lightning-listfunds.7.md +++ /dev/null @@ -1,109 +0,0 @@ -lightning-listfunds -- Command showing all funds currently managed by the Core Lightning node -============================================================================================= - -SYNOPSIS --------- - -**listfunds** [*spent*] - -DESCRIPTION ------------ - -The **listfunds** RPC command displays all funds available, either in unspent outputs (UTXOs) in the internal wallet or funds locked in currently open channels. - -- **spent** (boolean, optional): If True, then the *outputs* will include spent outputs in addition to the unspent ones. The default is False. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listfunds#1", - "method": "listfunds", - "params": { - "spent": null - } -} -``` - -RETURN VALUE ------------- - -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*. - - **amount\_msat** (msat): The amount of the output. - - **scriptpubkey** (hex): The scriptPubkey of the output. - - **status** (string) (one of "unconfirmed", "confirmed", "spent", "immature") - - **reserved** (boolean): Whether this UTXO is currently reserved for an in-flight tx. - - **address** (string, optional): The bitcoin address of the output. - - **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. - - **our\_amount\_msat** (msat): Available satoshis on our node's end of the channel. - - **amount\_msat** (msat): Total channel value. - - **funding\_txid** (txid): Funding transaction id. - - **funding\_output** (u32): The 0-based index of the output in the funding transaction. - - **connected** (boolean): Whether the channel peer is connected. - - **state** (string) (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", "DUALOPEND\_OPEN\_COMMITTED", "DUALOPEND\_OPEN\_COMMIT\_READY"): The channel state, in particular `CHANNELD_NORMAL` means the channel can be used normally. - - **channel\_id** (hash): The full channel\_id (funding txid Xored with output number). *(added v23.05)* - - 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). - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "outputs": [ - { - "txid": "0f184b101569bf777af3449fa266948a9d55768f97867e48416a2c92858dd1bc", - "output": 1, - "amount_msat": 1111111000, - "scriptpubkey": "001401fad90abcd66697e2592164722de4a95ebee165", - "address": "bcrt1qq8adjz4u6enf0cjey9j8yt0y490tact93fzgsf", - "status": "confirmed", - "blockheight": 102, - "reserved": false - }, - { - "txid": "4bee7dc3a28f2434e9bb3e9aaab418dd276485a8705b0f787bf741d3f979ec3b", - "output": 1, - "amount_msat": 1111111000, - "scriptpubkey": "001401fad90abcd66697e2592164722de4a95ebee165", - "address": "bcrt1qq8adjz4u6enf0cjey9j8yt0y490tact93fzgsf", - "status": "confirmed", - "blockheight": 102, - "reserved": false - } - ], - "channels": [] -} -``` - -AUTHOR ------- - -Felix <> is mainly responsible. - -SEE ALSO --------- - -lightning-newaddr(7), lightning-fundchannel(7), lightning-withdraw(7), lightning-listtransactions(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listhtlcs.7.md b/doc/lightning-listhtlcs.7.md deleted file mode 100644 index 5ef3ccf03e4a..000000000000 --- a/doc/lightning-listhtlcs.7.md +++ /dev/null @@ -1,184 +0,0 @@ -lightning-listhtlcs -- Command for querying HTLCs -================================================= - -SYNOPSIS --------- - -**listhtlcs** [*id*] - -DESCRIPTION ------------ - -The **listhtlcs** RPC command gets all HTLCs (which, generally, we remember for as long as a channel is open, even if they've completed long ago). - -- **id** (string, optional): A short channel id (e.g. 1x2x3) or full 64-byte hex channel id, it will only list htlcs for that channel (which must be known). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listhtlcs#1", - "method": "listhtlcs", - "params": "{}" -} -{ - "id": "example:listhtlcs#2", - "method": "listhtlcs", - "params": [ - "103x2x0" - ] -} -{ - "id": "example:listhtlcs#3", - "method": "listhtlcs", - "params": [ - "436c2658eb4f4689b42ff11b8b05f31ba09860d0df7168085e0796cdf40f85e0" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **htlcs** is returned. It is an array of objects, where each object contains: - -- **short\_channel\_id** (short\_channel\_id): The channel that contains/contained the HTLC. -- **id** (u64): The unique, incrementing HTLC id the creator gave this. -- **expiry** (u32): The block number where this HTLC expires/expired. -- **amount\_msat** (msat): The value of the HTLC. -- **direction** (string) (one of "out", "in"): Out if we offered this to the peer, in if they offered it. -- **payment\_hash** (hash): Payment hash sought by HTLC. -- **state** (string) (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", "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"): The first 10 states are for `in`, the next 10 are for `out`. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "htlcs": [ - { - "short_channel_id": "103x1x0", - "id": 0, - "expiry": 117, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "d2668e77c5a2220496e813de36f1fc09ba804b16af4c6bb38299d8a6eb8a5f10", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x1x0", - "id": 1, - "expiry": 117, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "286e08ac8f575f10508d751fcfc93871b4344271967c7b9e5eacb3f3573b8307", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x1x0", - "id": 2, - "expiry": 135, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "3e4baa750ee3dfb934578f041ccb40b87432bf37ec65c9d7bce5ff28fecbd95f", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x1x0", - "id": 3, - "expiry": 135, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "4c3ce32565dc10ef2bd230c32802ce2fe8b007208c0a90757aa289f75c994d49", - "state": "SENT_REMOVE_REVOCATION" - } - ] -} -{ - "htlcs": [ - { - "short_channel_id": "103x2x0", - "id": 0, - "expiry": 117, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "12bb14b1d119e1ae0759e5ff6f1f6653e3fd8f71ea59411500d2871404a47a98", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x2x0", - "id": 1, - "expiry": 117, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "57d950209cc0b4fcc5e3027569232f96cf83ef85314c6b139a5713848d811a66", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x2x0", - "id": 2, - "expiry": 135, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "45ad4654715411a07a0ad6ec3f4bfaa918c90e3d1934b10b1c1c5846523ddd7f", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x2x0", - "id": 3, - "expiry": 135, - "direction": "out", - "amount_msat": 100001001, - "payment_hash": "cc0dcd214aa71c62bfba711a0746da821f2cdba1770b11c225920bdde12c931e", - "state": "RCVD_REMOVE_ACK_REVOCATION" - } - ] -} -{ - "htlcs": [ - { - "short_channel_id": "103x1x0", - "id": 0, - "expiry": 124, - "direction": "out", - "amount_msat": 1001, - "payment_hash": "2ab653668c8017ff2f36ac36678a8da04e11380bd9580a2926b170523b0c6e3b", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x1x0", - "id": 1, - "expiry": 124, - "direction": "out", - "amount_msat": 2001, - "payment_hash": "92f889cb2e48aa28e1e577228b907cdbcc371a2c018e9c8f60fa7036e232cf1d", - "state": "RCVD_REMOVE_ACK_REVOCATION" - }, - { - "short_channel_id": "103x1x0", - "id": 2, - "expiry": 128, - "direction": "out", - "amount_msat": 4001, - "payment_hash": "14ef01c9fb12d7dcac288f48ce87b19a7d5c3d5779aaed1e4adcb5c5d0e9fa45", - "state": "RCVD_REMOVE_ACK_REVOCATION" - } - ] -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listforwards(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listinvoicerequests.7.md b/doc/lightning-listinvoicerequests.7.md deleted file mode 100644 index 8ff6a1b9e68a..000000000000 --- a/doc/lightning-listinvoicerequests.7.md +++ /dev/null @@ -1,74 +0,0 @@ -lightning-listinvoicerequests -- Command for querying invoice\_request status -============================================================================= - -SYNOPSIS --------- - -**listinvoicerequests** [*invreq\_id*] [*active\_only*] - -DESCRIPTION ------------ - -Command *added* in v22.11. - -The **listinvoicerequests** RPC command gets the status of a specific `invoice_request`, if it exists, or the status of all `invoice_requests` if given no argument. - -- **invreq\_id** (string, optional): A specific invoice can be queried by providing the `invreq_id`, which is presented by lightning-invoicerequest(7), or can be calculated from a bolt12 invoice. -- **active\_only** (boolean, optional): If it is *True* then only active invoice requests are returned. The default is *False*. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listinvoicerequests#1", - "method": "listinvoicerequests", - "params": [ - "cf0b41d4eb248d975909deb9accf9722b1c86839de80ee8815ce907bbb700a1d" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **invoicerequests** is returned. It is an array of objects, where each object contains: - -- **invreq\_id** (hash): The SHA256 hash of all invoice\_request fields less than 160. -- **active** (boolean): Whether the invoice\_request is currently active. -- **single\_use** (boolean): Whether the invoice\_request will become inactive after we pay an invoice for it. -- **bolt12** (string): The bolt12 string starting with lnr. -- **used** (boolean): Whether the invoice\_request has already been used. -- **label** (string, optional): The label provided when creating the invoice\_request. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "invoicerequests": [ - { - "invreq_id": "cf0b41d4eb248d975909deb9accf9722b1c86839de80ee8815ce907bbb700a1d", - "active": true, - "single_use": true, - "bolt12": "lnr1qqgx9ag7nmtns87htndlgcfndlq0wzstwd5k6urvv5s8getnw3gzqp3zderpzxstt8927ynqg044h0egcd8n5h3n9g0u0v4h8ncc3yg02gzqta0pqpvzzqnxu3vc68fug904w25y3zpskc8huazwmy34av93h2fjswe3tsp4rrcyps5sf5jwnn2tr3ghn32mdta8jvax62pwzhna8sktmaezl3f4s3zy35gx6dfay7r8zn299uwr7ugpze74zft4m8q3fnk2sr0ljqpve3jq", - "used": false - } - ] -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-invoicerequests(7), lightning-disableinvoicerequest(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listinvoices.7.md b/doc/lightning-listinvoices.7.md deleted file mode 100644 index f1793b33c549..000000000000 --- a/doc/lightning-listinvoices.7.md +++ /dev/null @@ -1,107 +0,0 @@ -lightning-listinvoices -- Command for querying invoice status -============================================================= - -SYNOPSIS --------- - -**listinvoices** [*label*] [*invstring*] [*payment\_hash*] [*offer\_id*] [*index* [*start*] [*limit*]] - -DESCRIPTION ------------ - -The **listinvoices** RPC command gets the status of a specific invoice, if it exists, or the status of all invoices if given no argument. - -Only one of the query parameters can be used from *label*, *invstring*, *payment\_hash*, or *offer\_id*. - -- **label** (one of, optional): A label used a the creation of the invoice to get a specific invoice.: - - (string) - - (integer) -- **invstring** (string, optional): The string value to query a specific invoice. -- **payment\_hash** (hex, optional): A payment\_hash of the invoice to get the details of a specific invoice. -- **offer\_id** (string, optional): A local `offer_id` the invoice was issued for a specific invoice details. -- **index** (string, optional) (one of "created", "updated"): If neither *in\_channel* nor *out\_channel* is specified, it controls ordering. The default is `created`. *(added v23.08)* -- **start** (u64, optional): If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7). *(added v23.08)* -- **limit** (u32, optional): If `index` is specified, `limit` can be used to specify the maximum number of entries to return. *(added v23.08)* - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listinvoices#1", - "method": "listinvoices", - "params": { - "label": "xEoCR94SIz6UIRUEkxum", - "payment_hash": null, - "invstring": null, - "offer_id": null, - "index": null, - "start": null, - "limit": null - } -} -``` - -RETURN VALUE ------------- - -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. -- **status** (string) (one of "unpaid", "paid", "expired"): Whether it's paid, unpaid or unpayable. -- **expires\_at** (u64): UNIX timestamp of when it will become / became unpayable. -- **created\_index** (u64): 1-based index indicating order this invoice was created in. *(added v23.08)* -- **description** (string, optional): Description used in the invoice. -- **amount\_msat** (msat, optional): The amount required to pay this invoice. -- **bolt11** (string, optional): The BOLT11 string (always present unless *bolt12* is). -- **bolt12** (string, optional): The BOLT12 string (always present unless *bolt11* is). -- **local\_offer\_id** (hash, optional): The *id* of our offer which created this invoice (**experimental-offers** only). -- **invreq\_payer\_note** (string, optional): The optional *invreq\_payer\_note* from invoice\_request which created this invoice (**experimental-offers** only). -- **updated\_index** (u64, optional): 1-based index indicating order this invoice was changed (only present if it has changed since creation). *(added v23.08)* - -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. - - **payment\_preimage** (secret): Proof of payment. - - **paid\_outpoint** (object, optional): Outpoint this invoice was paid with. *(added v23.11)*: - - **txid** (txid): ID of the transaction that paid the invoice. *(added v23.11)* - - **outnum** (u32): The 0-based output number of the transaction that paid the invoice. *(added v23.11)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "invoices": [ - { - "label": "xEoCR94SIz6UIRUEkxum", - "bolt11": "lnbcrt110u1pjmr5lzsp5sfjyj3xn7ux592k36hmmt4ax98n6lgct22wvj54yck0upcmep63qpp5qu436g855lr40ftdt7csatk5pdvtdzzfmfqluwtvm0fds95jsadqdpq0pzk7s6j8y69xjt6xe25j5j4g44hsatdxqyjw5qcqp99qxpqysgquwma3zrw4cd8e8j4u9uh4gxukaacckse64kx2l9dqv8rvrysdq5r5dt38t9snqj9u5ar07h2exr4fg56wpudkhkk7gtxlyt72ku5fpqqd4fnlk", - "payment_hash": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "amount_msat": 11000000, - "status": "unpaid", - "description": [ - "XEoCR94SIz6UIRUEkxum." - ], - "expires_at": 1706757730, - "created_index": 1 - } - ] -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-waitinvoice(7), lightning-delinvoice(7), lightning-invoice(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listnodes.7.md b/doc/lightning-listnodes.7.md deleted file mode 100644 index bce9fbb0cf50..000000000000 --- a/doc/lightning-listnodes.7.md +++ /dev/null @@ -1,145 +0,0 @@ -lightning-listnodes -- Command to get the list of nodes in the known network. -============================================================================= - -SYNOPSIS --------- - -**listnodes** [*id*] - -DESCRIPTION ------------ - -The **listnodes** command returns nodes the node has learned about via gossip messages, or a single one if the node *id* was specified. - -- **id** (pubkey, optional): The public key of the node to list. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listnodes#1", - "method": "listnodes", - "params": { - "id": "02e29856dab8ddd9044c18486e4cab79ec717b490447af2d4831e290e48d57638a" - } -} -{ - "id": "example:listnodes#2", - "method": "listnodes", - "params": { - "id": null - } -} -``` - -RETURN VALUE ------------- - -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) (up to 32 characters): The fun alias this node advertized. - - **color** (hex) (always 6 characters): The favorite RGB color this node advertized. - - **features** (hex): BOLT #9 features bitmap this node advertized. - - **addresses** (array of objects): The addresses this node advertized.: - - **type** (string) (one of "dns", "ipv4", "ipv6", "torv2", "torv3"): Type of connection (until 23.08, `websocket` was also allowed). - - **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. - - **funding\_weight** (u32): The onchain weight you'll have to pay for a lease. - - **channel\_fee\_max\_base\_msat** (msat): The maximum base routing fee this node will charge during the lease. - - **channel\_fee\_max\_proportional\_thousandths** (u32): The maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel\_update). - - **compact\_lease** (hex): The lease as represented in the node\_announcement. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "nodes": [ - { - "nodeid": "02e29856dab8ddd9044c14586e4cab79ec717b490447af2d4831e290e48d58638a", - "alias": "some_alias", - "color": "68f442", - "last_timestamp": 1597213741, - "features": "02a2a1", - "addresses": [ - { - "type": "ipv4", - "address": "zzz.yy.xx.xx", - "port": 9735 - } - ] - } - ] -} -{ - "nodes": [ - { - "nodeid": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "alias": "SILENTARTIST-v23.11-415-gd120eba", - "color": "022d22", - "last_timestamp": 1708624765, - "features": "88a0000a8a5961", - "addresses": [] - }, - { - "nodeid": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "alias": "JUNIORBEAM-v23.11-415-gd120eba", - "color": "0266e4", - "last_timestamp": 1708624765, - "features": "88a0000a8a5961", - "addresses": [] - }, - { - "nodeid": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "alias": "HOPPINGFIRE-v23.11-415-gd120eba", - "color": "035d2b", - "last_timestamp": 1708624765, - "features": "88a0000a8a5961", - "addresses": [] - }, - { - "nodeid": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199", - "alias": "JUNIORFELONY-v23.11-415-gd120eba", - "color": "0382ce", - "last_timestamp": 1708624766, - "features": "88a0000a8a5961", - "addresses": [] - } - ] -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -SEE ALSO --------- - -lightning-listchannels(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listoffers.7.md b/doc/lightning-listoffers.7.md deleted file mode 100644 index cc6f2504106c..000000000000 --- a/doc/lightning-listoffers.7.md +++ /dev/null @@ -1,99 +0,0 @@ -lightning-listoffers -- Command for listing offers -================================================== - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - -**listoffers** [*offer\_id*] [*active\_only*] - -DESCRIPTION ------------ - -The **listoffers** RPC command list all offers, or with `offer_id`, only the offer with that offer\_id (if it exists). - -- **offer\_id** (hash, optional): Offer\_id to get details for (if it exists). -- **active\_only** (boolean, optional): If set and is true, only offers with `active` true are returned. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listoffers#1", - "method": "listoffers", - "params": { - "active_only": true - } -} -{ - "id": "example:listoffers#2", - "method": "listoffers", - "params": [ - "f61cca153d1948dade19349792d9bcdc9cef687fd27db0b553a67979f55aae48" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **offers** is returned. It is an array of objects, where each object contains: - -- **offer\_id** (hash): The id of this offer (merkle hash of non-signature fields). -- **active** (boolean): Whether this can still be used. -- **single\_use** (boolean): Whether this expires as soon as it's paid. -- **bolt12** (string): The bolt12 encoding of the offer. -- **used** (boolean): True if an associated invoice has been paid. -- **label** (string, optional): The (optional) user-specified label. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "offers": [ - { - "offer_id": "053a5c566fbea2681a5ff9c05a913da23e45b95d09ef5bd25d7d408f23da7084", - "active": true, - "single_use": false, - "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqvqcdgq2z9pk7enxv4jjqen0wgs8yatnw3ujz83qkc6rvp4j28rt3dtrn32zkvdy7efhnlrpr5rp5geqxs783wtlj550qs8czzku4nk3pqp6m593qxgunzuqcwkmgqkmp6ty0wyvjcqdguv3pnpukedwn6cr87m89t74h3auyaeg89xkvgzpac70z3m9rn5xzu28c", - "used": false - }, - { - "offer_id": "3247d3597fec19e362ca683416a48a0f76a44c1600725a7ee1936548feadacca", - "active": true, - "single_use": false, - "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcxqd24x3qgqgqlgzs3gdhkven9v5sxvmmjype82um50ys3ug9kxsmqdvj3c6ut2cuu2s4nrf8k2dulccgaqcdzxgp583utjlu49rcyqt8hc3s797umxn3r9367rdqc577rma7key58fywkajxnuzyapge86hj2pg80rjrma40xdqrxnsnva5l3ce7hz4ua8wf755dees4y9vnq", - "used": true - } - ] -} -{ - "offers": [ - { - "offer_id": "f61cca153d1948dade19349792d9bcdc9cef687fd27db0b553a67979f55aae48", - "active": true, - "single_use": false, - "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyqs5rn5v4ehggrxdaezqvtdwdshg93pqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq63s", - "used": false - } - ] -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-offer(7), lightning-listoffers(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listpays.7.md b/doc/lightning-listpays.7.md deleted file mode 100644 index d8ec7efd77d2..000000000000 --- a/doc/lightning-listpays.7.md +++ /dev/null @@ -1,114 +0,0 @@ -lightning-listpays -- Command for querying payment status -========================================================= - -SYNOPSIS --------- - -**listpays** [*bolt11*] [*payment\_hash*] [*status*] - -DESCRIPTION ------------ - -The **listpay** RPC command gets the status of all *pay* commands, or a single one if either *bolt11* or *payment\_hash* was specified. - -- **bolt11** (string, optional): Bolt11 string to get the payment details. -- **payment\_hash** (hash, optional): Payment hash to get the payment details. -- **status** (string, optional) (one of "pending", "complete", "failed"): To filter the payment by status. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listpays#1", - "method": "listpays", - "params": { - "bolt11": "lnbcrt123n1pjmxp7qsp5hxu7u28y0nx4v689u3hwzdzse2w9yaylhheavf9dxvwtdup7pvespp5ha66gxse68j4n6755v7299dnmq4w34gp0znxu0xzahdc43zrg40qdq5v3jhxcmjd9c8g6t0dc6sxqrp7scqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqvuqqqqsqqqqqqqqpqqqqqzsqqc9qxpqysgqk74dvqlvr92ayy5s7x0r0u9xywez6wu4h8pfta386cw6x7cdrvn8pz87kyg5c930aent423gm9ylpaw5p35k72f02hg0s9dulg4d8fqpgj7gpm", - "payment_hash": null, - "status": null - } -} -{ - "id": "example:listpays#2", - "method": "listpays", - "params": { - "bolt11": "lnbcrt123n1pjmxp7qsp5u84368dz7yhzcqm955h96wdqch7uarasun45cr0vs5d8t0cv5avqpp5r9p0dp92guaatrmhf302m0dyj4n79gk93qu2l5tagfxq3dedgfqsdq5v3jhxcmjd9c8g6t0dc6qxqrp7scqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqvuqqqqsqqqqqqqqpqqqqqzsqqc9qxpqysgq46wu0fznfx27rcnyzhcttf8yqx3lwqs482yxlead0fyt8mefrrrj5m379fa5qukgquf9tnwsuj3nnfmwkzkfg6pyhzq6w8gauuh6m5cqgur64n", - "payment_hash": null, - "status": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **pays** is returned. It is an array of objects, where each object contains: - -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **status** (string) (one of "pending", "failed", "complete"): Status of the payment. -- **created\_at** (u64): The UNIX timestamp showing when this payment was initiated. -- **destination** (pubkey, optional): The final destination of the payment if known. -- **completed\_at** (u64, optional): The UNIX timestamp showing when this payment was completed. -- **label** (string, optional): The label, if given to sendpay. -- **bolt11** (string, optional): The bolt11 string (if pay supplied one). -- **description** (string, optional): The description matching the bolt11 description hash (if pay supplied one). -- **bolt12** (string, optional): The bolt12 string (if supplied for pay: **experimental-offers** only). - -If **status** is "complete": - - **amount\_sent\_msat** (msat): The amount of millisatoshi we sent in order to pay (may include fees and not match amount\_msat). - - **preimage** (secret): Proof of payment. - - **amount\_msat** (msat, optional): The amount of millisatoshi we intended to send to the destination. - - **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. - -The returned array is ordered by increasing **created\_at** fields. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "pays": [ - { - "bolt11": "lnbcrt123n1pjmxp7qsp5hxu7u28y0nx4v689u3hwzdzse2w9yaylhheavf9dxvwtdup7pvespp5ha66gxse68j4n6755v7299dnmq4w34gp0znxu0xzahdc43zrg40qdq5v3jhxcmjd9c8g6t0dc6sxqrp7scqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqvuqqqqsqqqqqqqqpqqqqqzsqqc9qxpqysgqk74dvqlvr92ayy5s7x0r0u9xywez6wu4h8pfta386cw6x7cdrvn8pz87kyg5c930aent423gm9ylpaw5p35k72f02hg0s9dulg4d8fqpgj7gpm", - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "payment_hash": "bf75a41a19d1e559ebd4a33ca295b3d82ae8d50178a66e3cc2eddb8ac443455e", - "status": "failed", - "created_at": 1706231854, - "amount_sent_msat": 0 - } - ] -} -{ - "pays": [ - { - "bolt11": "lnbcrt123n1pjmxp7qsp5u84368dz7yhzcqm955h96wdqch7uarasun45cr0vs5d8t0cv5avqpp5r9p0dp92guaatrmhf302m0dyj4n79gk93qu2l5tagfxq3dedgfqsdq5v3jhxcmjd9c8g6t0dc6qxqrp7scqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqvuqqqqsqqqqqqqqpqqqqqzsqqc9qxpqysgq46wu0fznfx27rcnyzhcttf8yqx3lwqs482yxlead0fyt8mefrrrj5m379fa5qukgquf9tnwsuj3nnfmwkzkfg6pyhzq6w8gauuh6m5cqgur64n", - "destination": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "payment_hash": "1942f684aa473bd58f774c5eadbda49567e2a2c58838afd17d424c08b72d4241", - "status": "complete", - "created_at": 1706231849, - "completed_at": 1706231854, - "preimage": "89ce412a2089cbcb72a73ce755337cf693859ea58f21ef0d1caf286a9b0f2a7c", - "amount_msat": 12300, - "amount_sent_msat": 12301 - } - ] -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-pay(7), lightning-paystatus(7), lightning-listsendpays(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listpeerchannels.7.md b/doc/lightning-listpeerchannels.7.md deleted file mode 100644 index 6a2c0014d1eb..000000000000 --- a/doc/lightning-listpeerchannels.7.md +++ /dev/null @@ -1,401 +0,0 @@ -lightning-listpeerchannels -- Command returning data on channels of connected lightning nodes -============================================================================================= - -SYNOPSIS --------- - -**listpeerchannels** [*id*] - -DESCRIPTION ------------ - -Command *added* in v23.02. - -The **listpeerchannels** RPC command returns data on channels of the network, with the possibility to filter the channels by node id. - -If no *id* is supplied, then channel data on all lightning nodes that are connected, or not connected but have open channels with this node, are returned. - -- **id** (pubkey, optional): If supplied, limits the channels to just the peer with the given ID, if it exists. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listpeerchannels#1", - "method": "listpeerchannels", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59" - } -} -{ - "id": "example:listpeerchannels#2", - "method": "listpeerchannels", - "params": { - "id": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **channels** is returned. It is an array of objects, where each object contains: - -- **peer\_id** (pubkey): Node Public key. -- **peer\_connected** (boolean): A boolean flag that is set to true if the peer is online. -- **state** (string) (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", "CHANNELD\_AWAITING\_SPLICE", "DUALOPEND\_OPEN\_COMMITTED", "DUALOPEND\_OPEN\_COMMIT\_READY"): The channel state, in particular `CHANNELD_NORMAL` means the channel can be used normally. -- **opener** (string) (one of "local", "remote"): Who initiated the channel. -- **features** (array of strings): - - (string, optional) (one of "option\_static\_remotekey", "option\_anchor\_outputs", "option\_anchors\_zero\_fee\_htlc\_tx", "option\_scid\_alias", "option\_zeroconf"): BOLT #9 features which apply to this channel. -- **reestablished** (boolean, optional): A boolean flag that is set to true if we have successfully exchanged reestablish messages with this connection. *(added v24.02)* -- **scratch\_txid** (txid, optional): The txid we would use if we went onchain now. -- **channel\_type** (object, optional): Channel\_type as negotiated with peer. *(added v23.05)*: - - **bits** (array of u32s): Each bit set in this channel\_type.: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type.: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. -- **updates** (object, optional): Latest gossip updates sent/received. *(added v24.02)*: - - **local** (object): Our gossip for channel. *(added v24.02)*: - - **htlc\_minimum\_msat** (msat): Minimum msat amount we allow. *(added v24.02)* - - **htlc\_maximum\_msat** (msat): Maximum msat amount we allow. *(added v24.02)* - - **cltv\_expiry\_delta** (u32): Blocks delay required between incoming and outgoing HTLCs. *(added v24.02)* - - **fee\_base\_msat** (msat): Amount we charge to use the channel. *(added v24.02)* - - **fee\_proportional\_millionths** (u32): Amount we charge to use the channel in parts-per-million. *(added v24.02)* - - **remote** (object, optional): Peer's gossip for channel. *(added v24.02)*: - - **htlc\_minimum\_msat** (msat): Minimum msat amount they allow. *(added v24.02)* - - **htlc\_maximum\_msat** (msat): Maximum msat amount they allow. *(added v24.02)* - - **cltv\_expiry\_delta** (u32): Blocks delay required between incoming and outgoing HTLCs. *(added v24.02)* - - **fee\_base\_msat** (msat): Amount they charge to use the channel. *(added v24.02)* - - **fee\_proportional\_millionths** (u32): Amount they charge to use the channel in parts-per-million. *(added v24.02)* -- **ignore\_fee\_limits** (boolean, optional): Set if we allow this peer to set fees to anything they want. *(added v23.08)* -- **lost\_state** (boolean, optional): Set if we are fallen behind i.e. lost some channel state. *(added v24.02)* -- **feerate** (object, optional): Feerates for the current tx.: - - **perkw** (u32): Feerate per 1000 weight (i.e kSipa). - - **perkb** (u32): Feerate per 1000 virtual bytes. -- **owner** (string, optional): The current subdaemon controlling this connection. -- **short\_channel\_id** (short\_channel\_id, optional): The short\_channel\_id (once locked in). -- **channel\_id** (hash, optional): The full channel\_id (funding txid Xored with output number). -- **funding\_txid** (txid, optional): ID of the funding transaction. -- **funding\_outnum** (u32, optional): The 0-based output number of the funding transaction which opens the channel. -- **initial\_feerate** (string, optional): For inflight opens, the first feerate used to initiate the channel open. -- **last\_feerate** (string, optional): For inflight opens, the most recent feerate used on the channel open. -- **next\_feerate** (string, optional): For inflight opens, the next feerate we'll use for the channel open. -- **next\_fee\_step** (u32, optional): For inflight opens, the next feerate step we'll use for the channel open. -- **inflight** (array of objects, optional): Current candidate funding transactions.: - - **funding\_txid** (txid): ID of the funding transaction. - - **funding\_outnum** (u32): The 0-based output number of the funding transaction which opens the channel. - - **feerate** (string): The feerate for this funding transaction in per-1000-weight, with `kpw` appended. - - **total\_funding\_msat** (msat): Total amount in the channel. - - **splice\_amount** (integer): The amouont of sats we're splicing in or out. *(added v23.08)* - - **our\_funding\_msat** (msat): Amount we have in the channel. - - **scratch\_txid** (txid, optional): The commitment transaction txid we would use if we went onchain now. -- **close\_to** (hex, optional): ScriptPubkey which we have to close to if we mutual close. -- **private** (boolean, optional): If True, we will not announce this channel. -- **closer** (string, optional) (one of "local", "remote"): Who initiated the channel close (only present if closing). -- **funding** (object, optional): - - **local\_funds\_msat** (msat): Amount of channel we funded. - - **remote\_funds\_msat** (msat): Amount of channel they funded. - - **pushed\_msat** (msat, optional): Amount pushed from opener to peer. - - **fee\_paid\_msat** (msat, optional): Amount we paid peer at open. - - **fee\_rcvd\_msat** (msat, optional): Amount we were paid by peer at open. -- **to\_us\_msat** (msat, optional): How much of channel is owed to us. -- **min\_to\_us\_msat** (msat, optional): Least amount owed to us ever. If the peer were to successfully steal from us, this is the amount we would still retain. -- **max\_to\_us\_msat** (msat, optional): Most amount owed to us ever. If we were to successfully steal from the peer, this is the amount we could potentially get. -- **total\_msat** (msat, optional): Total amount in the channel. -- **fee\_base\_msat** (msat, optional): Amount we charge to use the channel. -- **fee\_proportional\_millionths** (u32, optional): Amount we charge to use the channel in parts-per-million. -- **dust\_limit\_msat** (msat, optional): Minimum amount for an output on the channel transactions. -- **max\_total\_htlc\_in\_msat** (msat, optional): Max amount accept in a single payment. -- **their\_reserve\_msat** (msat, optional): Minimum we insist they keep in channel. If they have less than this in the channel, they cannot send to us on that channel. The default is 1% of the total channel capacity. -- **our\_reserve\_msat** (msat, optional): Minimum they insist we keep in channel. If you have less than this in the channel, you cannot send out via this channel. -- **spendable\_msat** (msat, optional): An estimate of the total we could send through channel (can be wrong because adding HTLCs requires an increase in fees paid to onchain miners, and onchain fees change dynamically according to onchain activity). -- **receivable\_msat** (msat, optional): An estimate of the total peer could send through channel. -- **minimum\_htlc\_in\_msat** (msat, optional): The minimum amount HTLC we accept. -- **minimum\_htlc\_out\_msat** (msat, optional): The minimum amount HTLC we will send. -- **maximum\_htlc\_out\_msat** (msat, optional): The maximum amount HTLC we will send. -- **their\_to\_self\_delay** (u32, optional): The number of blocks before they can take their funds if they unilateral close. -- **our\_to\_self\_delay** (u32, optional): The number of blocks before we can take our funds if we unilateral close. -- **max\_accepted\_htlcs** (u32, optional): Maximum number of incoming HTLC we will accept at once. -- **alias** (object, optional): - - **local** (short\_channel\_id, optional): An alias assigned by this node to this channel, used for outgoing payments. - - **remote** (short\_channel\_id, optional): An alias assigned by the remote node to this channel, usable in routehints and invoices. -- **state\_changes** (array of objects, optional): Prior state changes.: - - **timestamp** (string): UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ. - - **old\_state** (string) (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", "DUALOPEND\_OPEN\_COMMITTED", "DUALOPEND\_OPEN\_COMMIT\_READY", "CHANNELD\_AWAITING\_SPLICE"): Previous state. - - **new\_state** (string) (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", "DUALOPEND\_OPEN\_COMMITTED", "DUALOPEND\_OPEN\_COMMIT\_READY", "CHANNELD\_AWAITING\_SPLICE"): New state. - - **cause** (string) (one of "unknown", "local", "user", "remote", "protocol", "onchain"): What caused the change. - - **message** (string): Human-readable explanation. -- **status** (array of strings, optional): - - (string, optional): Billboard log of significant changes. -- **in\_payments\_offered** (u64, optional): Number of incoming payment attempts. -- **in\_offered\_msat** (msat, optional): Total amount of incoming payment attempts. -- **in\_payments\_fulfilled** (u64, optional): Number of successful incoming payment attempts. -- **in\_fulfilled\_msat** (msat, optional): Total amount of successful incoming payment attempts. -- **out\_payments\_offered** (u64, optional): Number of outgoing payment attempts. -- **out\_offered\_msat** (msat, optional): Total amount of outgoing payment attempts. -- **out\_payments\_fulfilled** (u64, optional): Number of successful outgoing payment attempts. -- **out\_fulfilled\_msat** (msat, optional): Total amount of successful outgoing payment attempts. -- **last\_stable\_connection** (u64, optional): Last time we reestablished the open channel and stayed connected for 1 minute. *(added v24.02)* -- **htlcs** (array of objects, optional): Current HTLCs in this channel.: - - **direction** (string) (one of "in", "out"): Whether it came from peer, or is going to peer. *(added v23.02)* - - **id** (u64): Unique ID for this htlc on this channel in this direction. - - **amount\_msat** (msat): Amount send/received for this HTLC. - - **expiry** (u32): Block this HTLC expires at (after which an `in` direction HTLC will be returned to the peer, an `out` returned to us). If this expiry is too close, lightningd(8) will automatically unilaterally close the channel in order to enforce the timeout onchain. - - **payment\_hash** (hash): The hash of the payment\_preimage which will prove payment. - - **local\_trimmed** (boolean, optional) (always *true*): If this is too small to enforce onchain; it doesn't appear in the commitment transaction and will not be enforced in a unilateral close. Generally true if the HTLC (after subtracting onchain fees) is below the `dust_limit_msat` for the channel. - - **status** (string, optional): Set if this HTLC is currently waiting on a hook (and shows what plugin). - - If **direction** is "out": - - **state** (string) (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"): Status of the HTLC. - - If **direction** is "in": - - **state** (string) (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"): Status of the HTLC. - -If **peer\_connected** is *true*: - - **reestablished** (boolean, optional): True if we have successfully exchanged reestablish messages this connection. - -If **close\_to** is present: - - **close\_to\_addr** (string, optional): The bitcoin address we will close to (present if close\_to\_addr is a standardized address). - -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 (as used in BOLT #7 channel\_update). *(added v23.02)* - -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. - -The *state* field values (and *old\_state* / *new\_state*) are worth describing further: - - * `OPENINGD`: The channel funding protocol with the peer is ongoing and both sides are negotiating parameters. - * `DUALOPEND_OPEN_INIT`: Like `OPENINGD`, but for v2 connections which are using collaborative opens. - * `DUALOPEND_OPEN_COMMIT_READY`: Like `OPENINGD`, but for v2 connections which are using collaborative opens. You're ready to send your commitment signed to your peer. - * `DUALOPEND_OPEN_COMMITTED`: Like `OPENINGD`, but for v2 connections which are using collaborative opens. You've gotten an initial signed commitment from your peer. - * `CHANNELD_AWAITING_LOCKIN` / `DUALOPEND_AWAITING_LOCKIN`: The peer and you have agreed on channel parameters and are just waiting for the channel funding transaction to be confirmed deeply (original and collaborative open protocols, respectively). Both you and the peer must acknowledge the channel funding transaction to be confirmed deeply before entering the next state. Also, you can increase the onchain fee for channels in `DUALOPEND_AWAITING_LOCKIN` using lightning-openchannel\_bump(7). - * `CHANNELD_NORMAL`: The channel can be used for normal payments. - * `CHANNELD_SHUTTING_DOWN`: A mutual close was requested (by you or peer) and both of you are waiting for HTLCs in-flight to be either failed or succeeded. The channel can no longer be used for normal payments and forwarding. Mutual close will proceed only once all HTLCs in the channel have either been fulfilled or failed. - * `CLOSINGD_SIGEXCHANGE`: You and the peer are negotiating the mutual close onchain fee. - * `CLOSINGD_COMPLETE`: You and the peer have agreed on the mutual close onchain fee and are awaiting the mutual close getting confirmed deeply. - * `AWAITING_UNILATERAL`: You initiated a unilateral close, and are now waiting for the peer-selected unilateral close timeout to complete. - * `FUNDING_SPEND_SEEN`: You saw the funding transaction getting spent (usually the peer initiated a unilateral close) and will now determine what exactly happened (i.e. if it was a theft attempt). - * `ONCHAIN`: You saw the funding transaction getting spent and now know what happened (i.e. if it was a proper unilateral close by the peer, or a theft attempt). - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channels": [ - { - "peer_id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "peer_connected": true, - "channel_type": { - "bits": [ - 12 - ], - "names": [ - "static_remotekey/even" - ] - }, - "updates": { - "local": { - "htlc_minimum_msat": 0, - "htlc_maximum_msat": 990000000, - "cltv_expiry_delta": 6, - "fee_base_msat": 1, - "fee_proportional_millionths": 10 - } - }, - "state": "CHANNELD_AWAITING_LOCKIN", - "scratch_txid": "4e9c2866b9ae1f765b89ea7ec37428c900ea97f717f85f00e3db852cb6aea3a8", - "last_tx_fee_msat": 5430000, - "feerate": { - "perkw": 7500, - "perkb": 30000 - }, - "owner": "channeld", - "direction": 1, - "channel_id": "7b0bd48371c473ea25b9ab95613c51a936463c41858c8bbdf356f5328f3d0a6c", - "funding_txid": "6c0a3d8f32f556f3bd8b8c85413c4636a9513c6195abb925ea73c47183d40b7b", - "funding_outnum": 0, - "close_to_addr": "bcrt1pamt5tqzd49uyessr7437l2vllf20muqmzdauje8x8scjgpc0l0nqhyqcyp", - "close_to": "5120eed745804da9784cc203f563efa99ffa54fdf01b137bc964e63c3124070ffbe6", - "private": false, - "opener": "local", - "alias": { - "local": "5589251x14022525x17398" - }, - "features": [ - "option_static_remotekey" - ], - "funding": { - "local_funds_msat": 1000000000, - "remote_funds_msat": 0, - "pushed_msat": 0 - }, - "to_us_msat": 1000000000, - "min_to_us_msat": 1000000000, - "max_to_us_msat": 1000000000, - "total_msat": 1000000000, - "fee_base_msat": 1, - "fee_proportional_millionths": 10, - "dust_limit_msat": 546000, - "max_total_htlc_in_msat": 18446744073709552000, - "their_reserve_msat": 10000000, - "our_reserve_msat": 10000000, - "spendable_msat": 973980000, - "receivable_msat": 0, - "minimum_htlc_in_msat": 0, - "minimum_htlc_out_msat": 0, - "maximum_htlc_out_msat": 990000000, - "their_to_self_delay": 5, - "our_to_self_delay": 5, - "max_accepted_htlcs": 483, - "state_changes": [], - "status": [], - "in_payments_offered": 0, - "in_offered_msat": 0, - "in_payments_fulfilled": 0, - "in_fulfilled_msat": 0, - "out_payments_offered": 0, - "out_offered_msat": 0, - "out_payments_fulfilled": 0, - "out_fulfilled_msat": 0, - "htlcs": [] - } - ] -} -{ - "channels": [ - { - "peer_id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "peer_connected": true, - "reestablished": true, - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "updates": { - "local": { - "htlc_minimum_msat": 0, - "htlc_maximum_msat": 990000000, - "cltv_expiry_delta": 6, - "fee_base_msat": 1, - "fee_proportional_millionths": 10 - }, - "remote": { - "htlc_minimum_msat": 0, - "htlc_maximum_msat": 990000000, - "cltv_expiry_delta": 6, - "fee_base_msat": 1, - "fee_proportional_millionths": 10 - } - }, - "state": "CHANNELD_NORMAL", - "scratch_txid": "ece66657d6203a4ea77807f566fd5b98a78b659f0cd59ce9200aa3bd6875ee25", - "last_tx_fee_msat": 4545000, - "lost_state": false, - "feerate": { - "perkw": 3750, - "perkb": 15000 - }, - "owner": "channeld", - "short_channel_id": "103x1x0", - "direction": 1, - "channel_id": "def5ef03e0d36ed65de814c0a8d6599a502fe1afb8e956529320bb350e876b5f", - "funding_txid": "5f6b870e35bb20935256e9b8afe12f509a59d6a8c014e85dd66ed3e003eff5de", - "funding_outnum": 0, - "close_to_addr": "bcrt1pamt5tqzd49uyessr7437l2vllf20muqmzdauje8x8scjgpc0l0nqhyqcyp", - "close_to": "5120eed745804da9784cc203f563efa99ffa54fdf01b137bc964e63c3124070ffbe6", - "private": false, - "opener": "local", - "alias": { - "local": "15447035x5589520x8959", - "remote": "6036590x13481428x5501" - }, - "features": [ - "option_static_remotekey", - "option_anchors_zero_fee_htlc_tx" - ], - "funding": { - "local_funds_msat": 1000000000, - "remote_funds_msat": 0, - "pushed_msat": 0 - }, - "to_us_msat": 1000000000, - "min_to_us_msat": 1000000000, - "max_to_us_msat": 1000000000, - "total_msat": 1000000000, - "fee_base_msat": 1, - "fee_proportional_millionths": 10, - "dust_limit_msat": 546000, - "max_total_htlc_in_msat": 18446744073709552000, - "their_reserve_msat": 10000000, - "our_reserve_msat": 10000000, - "spendable_msat": 978330000, - "receivable_msat": 0, - "minimum_htlc_in_msat": 0, - "minimum_htlc_out_msat": 0, - "maximum_htlc_out_msat": 990000000, - "their_to_self_delay": 5, - "our_to_self_delay": 5, - "max_accepted_htlcs": 483, - "state_changes": [ - { - "timestamp": "2024-02-22T17:48:57.127Z", - "old_state": "CHANNELD_AWAITING_LOCKIN", - "new_state": "CHANNELD_NORMAL", - "cause": "user", - "message": "Lockin complete" - } - ], - "status": [ - "CHANNELD_NORMAL:Channel ready for use." - ], - "in_payments_offered": 0, - "in_offered_msat": 0, - "in_payments_fulfilled": 0, - "in_fulfilled_msat": 0, - "out_payments_offered": 0, - "out_offered_msat": 0, - "out_payments_fulfilled": 0, - "out_fulfilled_msat": 0, - "htlcs": [] - } - ] -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. - -AUTHOR ------- - -Michael Hawkins <>. - -SEE ALSO --------- - -lightning-connect(7), lightning-fundchannel\_start(7) - -RESOURCES ---------- - -Main web site: -Lightning RFC site (BOLT #9): - diff --git a/doc/lightning-listpeers.7.md b/doc/lightning-listpeers.7.md deleted file mode 100644 index a115abdfa0d9..000000000000 --- a/doc/lightning-listpeers.7.md +++ /dev/null @@ -1,244 +0,0 @@ -lightning-listpeers -- Command returning data on connected lightning nodes -========================================================================== - -SYNOPSIS --------- - -**listpeers** [*id*] [*level*] - -DESCRIPTION ------------ - -The **listpeers** RPC command returns data on nodes that are connected or are not connected but have open channels with this node. - -Once a connection to another lightning node has been established, using the **connect** command, data on the node can be returned using **listpeers** and the *id* that was used with the **connect** command. - -If no *id* is supplied, then data on all lightning nodes that are connected, or not connected but have open channels with this node, are returned. - -If a channel is open with a node and the connection has been lost, then the node will still appear in the output of the command and the value of the *connected* attribute of the node will be "false". - -The channel will remain open for a set blocktime, after which if the connection has not been re-established, the channel will close and the node will no longer appear in the command output. - -- **id** (pubkey, optional): If supplied, limits the result to just the peer with the given ID, if it exists. -- **level** (string, optional) (one of "io", "debug", "info", "unusual"): Supplying level will show log entries related to that peer at the given log level. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listpeers#1", - "method": "listpeers", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "level": null - } -} -{ - "id": "example:listpeers#2", - "method": "listpeers", - "params": { - "id": null, - "level": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **peers** is returned. It is an array of objects, where each object contains: - -- **id** (pubkey): The unique id of the peer. -- **connected** (boolean): Value showing the connection status. -- **num\_channels** (u32): The number of channels the peer has with this node. *(added v23.02)* -- **log** (array of objects, optional): If *level* is specified, logs for this peer.: - - **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. - - **node\_id** (pubkey): The peer this is associated with. - - **data** (hex): The IO which occurred. -- **channels** (array of objects, optional): Channels with this peer. **deprecated in v23.02, removed after v24.02**: - - **state** (string) (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", "DUALOPEND\_OPEN\_COMMITTED", "DUALOPEND\_OPEN\_COMMIT\_READY"): Current state of the channel: - * `OPENINGD`: The channel funding protocol with the peer is ongoing and both sides are negotiating parameters. - * `CHANNELD_AWAITING_LOCKIN`: The peer and you have agreed on channel parameters and are just waiting for the channel funding transaction to be confirmed deeply. Both you and the peer must acknowledge the channel funding transaction to be confirmed deeply before entering the next state. - * `CHANNELD_NORMAL`: The channel can be used for normal payments. - * `CHANNELD_SHUTTING_DOWN`: A mutual close was requested (by you or peer) and both of you are waiting for HTLCs in-flight to be either failed or succeeded. The channel can no longer be used for normal payments and forwarding. Mutual close will proceed only once all HTLCs in the channel have either been fulfilled or failed. - * `CLOSINGD_SIGEXCHANGE`: You and the peer are negotiating the mutual close onchain fee. - * `CLOSINGD_COMPLETE`: You and the peer have agreed on the mutual close onchain fee and are awaiting the mutual close getting confirmed deeply. - * `AWAITING_UNILATERAL`: You initiated a unilateral close, and are now waiting for the peer-selected unilateral close timeout to complete. - * `FUNDING_SPEND_SEEN`: You saw the funding transaction getting spent (usually the peer initiated a unilateral close) and will now determine what exactly happened (i.e. if it was a theft attempt). - * `ONCHAIN`: You saw the funding transaction getting spent and now know what happened (i.e. if it was a proper unilateral close by the peer, or a theft attempt). - * `CLOSED`: The channel closure has been confirmed deeply. The channel will eventually be removed from this array. - - **opener** (string) (one of "local", "remote"): Who initiated the channel. - - **features** (array of strings): - - (string, optional) (one of "option\_static\_remotekey", "option\_anchor\_outputs", "option\_scid\_alias", "option\_zeroconf"): BOLT #9 features which apply to this channel. - - **scratch\_txid** (txid, optional): The txid we would use if we went onchain now. - - **feerate** (object, optional): Feerates for the current tx.: - - **perkw** (u32): Feerate per 1000 weight (i.e kSipa). - - **perkb** (u32): Feerate per 1000 virtual bytes. - - **owner** (string, optional): The current subdaemon controlling this connection. - - **short\_channel\_id** (short\_channel\_id, optional): The short\_channel\_id (once locked in). - - **channel\_id** (hash, optional): The full channel\_id (funding txid Xored with output number). - - **funding\_txid** (txid, optional): ID of the funding transaction. - - **funding\_outnum** (u32, optional): The 0-based output number of the funding transaction which opens the channel. - - **initial\_feerate** (string, optional): For inflight opens, the first feerate used to initiate the channel open. - - **last\_feerate** (string, optional): For inflight opens, the most recent feerate used on the channel open. - - **next\_feerate** (string, optional): For inflight opens, the next feerate we'll use for the channel open. - - **next\_fee\_step** (u32, optional): For inflight opens, the next feerate step we'll use for the channel open. - - **inflight** (array of objects, optional): Current candidate funding transactions.: - - **funding\_txid** (txid): ID of the funding transaction. - - **funding\_outnum** (u32): The 0-based output number of the funding transaction which opens the channel. - - **feerate** (string): The feerate for this funding transaction in per-1000-weight, with `kpw` appended. - - **total\_funding\_msat** (msat): Total amount in the channel. - - **our\_funding\_msat** (msat): Amount we have in the channel. - - **splice\_amount** (integer): The amouont of sats we're splicing in or out. *(added v23.08)* - - **scratch\_txid** (txid): The commitment transaction txid we would use if we went onchain now. - - **close\_to** (hex, optional): ScriptPubkey which we have to close to if we mutual close. - - **private** (boolean, optional): If True, we will not announce this channel. - - **closer** (string, optional) (one of "local", "remote"): Who initiated the channel close (only present if closing). - - **funding** (object, optional): - - **local\_funds\_msat** (msat): Amount of channel we funded. - - **remote\_funds\_msat** (msat): Amount of channel they funded. - - **pushed\_msat** (msat, optional): Amount pushed from opener to peer. - - **fee\_paid\_msat** (msat, optional): Amount we paid peer at open. - - **fee\_rcvd\_msat** (msat, optional): Amount we were paid by peer at open. - - **to\_us\_msat** (msat, optional): How much of channel is owed to us. - - **min\_to\_us\_msat** (msat, optional): Least amount owed to us ever. If the peer were to successfully steal from us, this is the amount we would still retain. - - **max\_to\_us\_msat** (msat, optional): Most amount owed to us ever. If we were to successfully steal from the peer, this is the amount we could potentially get. - - **total\_msat** (msat, optional): Total amount in the channel. - - **fee\_base\_msat** (msat, optional): Amount we charge to use the channel. - - **fee\_proportional\_millionths** (u32, optional): Amount we charge to use the channel in parts-per-million. - - **dust\_limit\_msat** (msat, optional): Minimum amount for an output on the channel transactions. - - **max\_total\_htlc\_in\_msat** (msat, optional): Max amount accept in a single payment. - - **their\_reserve\_msat** (msat, optional): Minimum we insist they keep in channel. If they have less than this in the channel, they cannot send to us on that channel. The default is 1% of the total channel capacity. - - **our\_reserve\_msat** (msat, optional): Minimum they insist we keep in channel. If you have less than this in the channel, you cannot send out via this channel. - - **spendable\_msat** (msat, optional): An estimate of the total we could send through channel (can be wrong because adding HTLCs requires an increase in fees paid to onchain miners, and onchain fees change dynamically according to onchain activity). - - **receivable\_msat** (msat, optional): An estimate of the total peer could send through channel. - - **minimum\_htlc\_in\_msat** (msat, optional): The minimum amount HTLC we accept. - - **minimum\_htlc\_out\_msat** (msat, optional): The minimum amount HTLC we will send. - - **maximum\_htlc\_out\_msat** (msat, optional): The maximum amount HTLC we will send. - - **their\_to\_self\_delay** (u32, optional): The number of blocks before they can take their funds if they unilateral close. - - **our\_to\_self\_delay** (u32, optional): The number of blocks before we can take our funds if we unilateral close. - - **max\_accepted\_htlcs** (u32, optional): Maximum number of incoming HTLC we will accept at once. - - **alias** (object, optional): - - **local** (short\_channel\_id, optional): An alias assigned by this node to this channel, used for outgoing payments. - - **remote** (short\_channel\_id, optional): An alias assigned by the remote node to this channel, usable in routehints and invoices. - - **state\_changes** (array of objects, optional): Prior state changes.: - - **timestamp** (string): UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ. - - **old\_state** (string) (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", "DUALOPEND\_OPEN\_COMMITTED", "DUALOPEND\_OPEN\_COMMIT\_READY"): Previous state. - - **new\_state** (string) (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", "DUALOPEND\_OPEN\_COMMITTED", "DUALOPEND\_OPEN\_COMMIT\_READY"): New state. - - **cause** (string) (one of "unknown", "local", "user", "remote", "protocol", "onchain"): What caused the change. - - **message** (string): Human-readable explanation. - - **status** (array of strings, optional): - - (string, optional): Billboard log of significant changes. - - **in\_payments\_offered** (u64, optional): Number of incoming payment attempts. - - **in\_offered\_msat** (msat, optional): Total amount of incoming payment attempts. - - **in\_payments\_fulfilled** (u64, optional): Number of successful incoming payment attempts. - - **in\_fulfilled\_msat** (msat, optional): Total amount of successful incoming payment attempts. - - **out\_payments\_offered** (u64, optional): Number of outgoing payment attempts. - - **out\_offered\_msat** (msat, optional): Total amount of outgoing payment attempts. - - **out\_payments\_fulfilled** (u64, optional): Number of successful outgoing payment attempts. - - **out\_fulfilled\_msat** (msat, optional): Total amount of successful outgoing payment attempts. - - **htlcs** (array of objects, optional): Current HTLCs in this channel.: - - **direction** (string) (one of "in", "out"): Whether it came from peer, or is going to peer. - - **id** (u64): Unique ID for this htlc on this channel in this direction. - - **amount\_msat** (msat): Amount send/received for this HTLC. - - **expiry** (u32): Block this HTLC expires at (after which an `in` direction HTLC will be returned to the peer, an `out` returned to us). If this expiry is too close, lightningd(8) will automatically unilaterally close the channel in order to enforce the timeout onchain. - - **payment\_hash** (hash): The hash of the payment\_preimage which will prove payment. - - **local\_trimmed** (boolean, optional) (always *true*): If this is too small to enforce onchain; it doesn't appear in the commitment transaction and will not be enforced in a unilateral close. Generally true if the HTLC (after subtracting onchain fees) is below the `dust_limit_msat` for the channel. - - **status** (string, optional): Set if this HTLC is currently waiting on a hook (and shows what plugin). - - If **direction** is "out": - - **state** (string) (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"): Status of the HTLC. - - If **direction** is "in": - - **state** (string) (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"): Status of the HTLC. - - If **close\_to** is present: - - **close\_to\_addr** (string, optional): The bitcoin address we will close to (present if close\_to\_addr is a standardized address). - - 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 (as used in BOLT #7 channel\_update). - - 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. - -If **connected** is *true*: - - **netaddr** (array of strings): A single entry array.: - - (string, optional): Address, e.g. 1.2.3.4:1234. - - **features** (hex): Bitmap of BOLT #9 features from peer's INIT message. - - **remote\_addr** (string, optional): The public IPv4/6 address the peer sees us from, e.g. 1.2.3.4:1234. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "peers": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "connected": true, - "num_channels": 1, - "netaddr": [ - "127.0.0.1:44619" - ], - "features": "08a0000a0a69a2" - } - ] -} -{ - "peers": [ - { - "id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "connected": true, - "num_channels": 1, - "netaddr": [ - "127.0.0.1:48862" - ], - "features": "08a0000a0a69a2" - } - ] -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. - -AUTHOR ------- - -Michael Hawkins <>. - -SEE ALSO --------- - -lightning-connect(7), lightning-fundchannel\_start(7), lightning-setchannel(7) - -RESOURCES ---------- - -Main web site: -Lightning RFC site (BOLT #9): - diff --git a/doc/lightning-listsendpays.7.md b/doc/lightning-listsendpays.7.md deleted file mode 100644 index d61e14a0f888..000000000000 --- a/doc/lightning-listsendpays.7.md +++ /dev/null @@ -1,148 +0,0 @@ -lightning-listsendpays -- Low-level command for querying sendpay status -======================================================================= - -SYNOPSIS --------- - -**listsendpays** [*bolt11*] [*payment\_hash*] [*status*] [*index* [*start*] [*limit*]] - -DESCRIPTION ------------ - -The **listsendpays** RPC command gets the status of all *sendpay* commands (which is also used by the *pay* command), or with *bolt11* or *payment\_hash* limits results to that specific payment. You cannot specify both. It is possible to filter the payments also by *status*. - -Note that there may be more than one concurrent *sendpay* command per *pay*, so this command should be used with caution. - -- **bolt11** (string, optional): Bolt11 invoice. -- **payment\_hash** (hash, optional): The hash of the payment\_preimage. -- **status** (string, optional) (one of "pending", "complete", "failed"): Whether the invoice has been paid, pending, or failed. -- **index** (string, optional) (one of "created", "updated"): If neither bolt11 or payment\_hash is specified, `index` controls ordering, by `created` (default) or `updated`. *(added v23.11)* -- **start** (u64, optional): If `index` is specified, `start` may be specified to start from that value, which is generally returned from lightning-wait(7). *(added v23.11)* -- **limit** (u32, optional): If `index` is specified, `limit` can be used to specify the maximum number of entries to return. *(added v23.11)* - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listsendpays#1", - "method": "listsendpays", - "params": { - "bolt11": null, - "payment_hash": null, - "status": null, - "index": null, - "start": null, - "limit": null - } -} -{ - "id": "example:listsendpays#2", - "method": "listsendpays", - "params": { - "bolt11": "lnbcrt1230n1pja03q9sp5xu9aypccf3n6vld2waxcysy47ct2wl5x5adtm7k8u30knqes22lspp5duw2v8csh0zh4xg9ql3amem98avlkc2ecre99tgmr2340amf9kmsdqjv3jhxcmjd9c8g6t0dcxqyjw5qcqp99qxpqysgqwh78s8wqg0kepspw0epcxmxteh5wu8n6ddlwdnyj758fqxpqk8ejf597x8ju3r32xqgae3yzjjz9e5s6l2vs5zxvkayhmemmx74wvyqqyqf8c9", - "payment_hash": null, - "status": null, - "index": null, - "start": null, - "limit": null - } -} -``` - -RETURN VALUE ------------- - -Note that the returned array is ordered by increasing *id*. -On success, an object containing **payments** is returned. It is an array of objects, where each object contains: - -- **created\_index** (u64): 1-based index indicating order this payment was created in. *(added v23.11)* -- **id** (u64): Old synonym for created\_index. -- **groupid** (u64): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment\_hash. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **status** (string) (one of "pending", "failed", "complete"): Status of the payment. -- **created\_at** (u64): The UNIX timestamp showing when this payment was initiated. -- **amount\_sent\_msat** (msat): The amount sent. -- **partid** (u64, optional): Part number (for multiple parts to a single payment). -- **updated\_index** (u64, optional): 1-based index indicating order this payment was changed (only present if it has changed since creation). *(added v23.11)* -- **amount\_msat** (msat, optional): The amount delivered to destination (if known). -- **destination** (pubkey, optional): The final destination of the payment if known. -- **label** (string, optional): The label, if given to sendpay. -- **bolt11** (string, optional): The bolt11 string (if pay supplied one). -- **description** (string, optional): The description matching the bolt11 description hash (if pay supplied one). -- **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**. - - **completed\_at** (u64, optional): The UNIX timestamp showing when this payment was completed. *(added pre-v0.10.1)* - -If **status** is "failed": - - **erroronion** (hex, optional): The onion message returned. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "payments": [ - { - "created_index": 1, - "id": 1, - "payment_hash": "e3b43574acd074b0c4ba1b13b5155ff5f9c76742e643ed003e17301c5a2db149", - "groupid": 1, - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount_msat": 20000, - "amount_sent_msat": 20000, - "created_at": 1706225269, - "status": "pending", - "bolt11": "lnbcrt200n1pjm9mn5sp5gq84lgga959m6gg4g0kj29ypwjaxxnm4cu5csymq8p6nqxv800mspp5uw6r2a9v6p6tp396rvfm292l7huuwe6zuep76qp7zucpck3dk9ysdpqf9grgmt62fmk5stswefh23n2tpykvcmzxqyjw5qcqp99qxpqysgqz8s496zmwed278jvp075zlhrnj0ncg45kcfw5s2lkhtxd3wc39f8wflp5gmd827dk470xpasfpx0azsfu0k8ttwae7620h8d050w28cqan776g" - }, - { - "created_index": 2, - "id": 2, - "payment_hash": "f55d92cfe019b5a015f5e5956e9255053cda14786171d5002feb12ae5254e5a5", - "groupid": 1, - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount_msat": 30000, - "amount_sent_msat": 30000, - "created_at": 1706225269, - "status": "pending", - "bolt11": "lnbcrt300n1pjm9mn5sp5zqfkr93rp92mdyj6m8lzpcu90rfefcaqff8fxdd2sc5mace23ujspp574we9nlqrx66q904uk2kayj4q57d59rcv9ca2qp0avf2u5j5ukjsdpq29j55nfcgfcnsvzw2er57knhwcmhzwt0xqyjw5qcqp99qxpqysgq76p2jpnegtzlxmn0aqt6d3f89q4p6y5v3v2qz7t2mm6xt90nt324cq400tl82k28562aux8jxs57d603g7s0q4g3dapu9a7vln94j7spsut799" - } - ] -} -{ - "payments": [ - { - "created_index": 1, - "id": 1, - "payment_hash": "6f1ca61f10bbc57a990507e3dde7653f59fb6159c0f252ad1b1aa357f7692db7", - "groupid": 1, - "updated_index": 1, - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount_msat": 123000, - "amount_sent_msat": 123000, - "created_at": 1708639237, - "completed_at": 1708639238, - "status": "complete", - "payment_preimage": "91f8366681fdfd309c048082fcde81a79116f85a7b2dd09aef1e34f5f7c3397b", - "bolt11": "lnbcrt1230n1pja03q9sp5xu9aypccf3n6vld2waxcysy47ct2wl5x5adtm7k8u30knqes22lspp5duw2v8csh0zh4xg9ql3amem98avlkc2ecre99tgmr2340amf9kmsdqjv3jhxcmjd9c8g6t0dcxqyjw5qcqp99qxpqysgqwh78s8wqg0kepspw0epcxmxteh5wu8n6ddlwdnyj758fqxpqk8ejf597x8ju3r32xqgae3yzjjz9e5s6l2vs5zxvkayhmemmx74wvyqqyqf8c9" - } - ] -} -``` - -AUTHOR ------- - -Christian Decker <> is mainly responsible. - -SEE ALSO --------- - -lightning-listpays(7), lightning-sendpay(7), lightning-listinvoice(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listsqlschemas.7.md b/doc/lightning-listsqlschemas.7.md deleted file mode 100644 index c554b6ff8553..000000000000 --- a/doc/lightning-listsqlschemas.7.md +++ /dev/null @@ -1,223 +0,0 @@ -lightning-listsqlschemas -- Command to example lightning-sql schemas -==================================================================== - -SYNOPSIS --------- - -**listsqlschemas** [*table*] - -DESCRIPTION ------------ - -Command *added* in v23.02. - -This allows you to examine the schemas at runtime; while they are fully documented for the current release in lightning-sql(7), as fields are added or deprecated, you can use this command to determine what fields are present. - -If *table* is given, only that table is in the resulting list, otherwise all tables are listed. - -- **table** (string, optional) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listsqlschemas#1", - "method": "listsqlschemas", - "params": { - "table": "offers" - } -} -{ - "id": "example:listsqlschemas#2", - "method": "listsqlschemas", - "params": [ - "closedchannels" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **schemas** is returned. It is an array of objects, where each object contains: - -- **tablename** (string): The name of the table. -- **columns** (array of objects): The columns, in database order.: - - **name** (string): The name of the column. - - **type** (string) (one of "INTEGER", "BLOB", "TEXT", "REAL"): The SQL type of the column. -- **indices** (array of arrays, optional): Any index we created to speed lookups.: - - (array of strings): The columns for this index. - - (string, optional): The column name. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "schemas": [ - { - "tablename": "offers", - "columns": [ - { - "name": "offer_id", - "type": "BLOB" - }, - { - "name": "active", - "type": "INTEGER" - }, - { - "name": "single_use", - "type": "INTEGER" - }, - { - "name": "bolt12", - "type": "TEXT" - }, - { - "name": "bolt12_unsigned", - "type": "TEXT" - }, - { - "name": "used", - "type": "INTEGER" - }, - { - "name": "label", - "type": "TEXT" - } - ], - "indices": [ - [ - "offer_id" - ] - ] - } - ] -} -{ - "schemas": [ - { - "tablename": "closedchannels", - "columns": [ - { - "name": "rowid", - "type": "INTEGER" - }, - { - "name": "peer_id", - "type": "BLOB" - }, - { - "name": "channel_id", - "type": "BLOB" - }, - { - "name": "short_channel_id", - "type": "TEXT" - }, - { - "name": "alias_local", - "type": "TEXT" - }, - { - "name": "alias_remote", - "type": "TEXT" - }, - { - "name": "opener", - "type": "TEXT" - }, - { - "name": "closer", - "type": "TEXT" - }, - { - "name": "private", - "type": "INTEGER" - }, - { - "name": "total_local_commitments", - "type": "INTEGER" - }, - { - "name": "total_remote_commitments", - "type": "INTEGER" - }, - { - "name": "total_htlcs_sent", - "type": "INTEGER" - }, - { - "name": "funding_txid", - "type": "BLOB" - }, - { - "name": "funding_outnum", - "type": "INTEGER" - }, - { - "name": "leased", - "type": "INTEGER" - }, - { - "name": "funding_fee_paid_msat", - "type": "INTEGER" - }, - { - "name": "funding_fee_rcvd_msat", - "type": "INTEGER" - }, - { - "name": "funding_pushed_msat", - "type": "INTEGER" - }, - { - "name": "total_msat", - "type": "INTEGER" - }, - { - "name": "final_to_us_msat", - "type": "INTEGER" - }, - { - "name": "min_to_us_msat", - "type": "INTEGER" - }, - { - "name": "max_to_us_msat", - "type": "INTEGER" - }, - { - "name": "last_commitment_txid", - "type": "BLOB" - }, - { - "name": "last_commitment_fee_msat", - "type": "INTEGER" - }, - { - "name": "close_cause", - "type": "TEXT" - } - ] - } - ] -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-sql(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-listtransactions.7.md b/doc/lightning-listtransactions.7.md deleted file mode 100644 index a6859362739f..000000000000 --- a/doc/lightning-listtransactions.7.md +++ /dev/null @@ -1,103 +0,0 @@ -lightning-listtransactions -- Command to get the list of transactions that was stored in the wallet. -==================================================================================================== - -SYNOPSIS --------- - -**listtransactions** - -DESCRIPTION ------------ - -The **listtransactions** command returns transactions tracked in the wallet. This includes deposits, withdrawals and transactions related to channels. A transaction may have multiple types, e.g., a transaction may both be a close and a deposit if it closes the channel and returns funds to the wallet. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:listtransactions#1", - "method": "listtransactions", - "params": {} -} -``` - -RETURN VALUE ------------- - -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. -- **txindex** (u32): The transaction number within the block. -- **locktime** (u32): The nLocktime for this tx. -- **version** (u32): The nVersion for this tx. -- **inputs** (array of objects): Each input, in order.: - - **txid** (txid): The transaction id spent. - - **index** (u32): The output spent. - - **sequence** (u32): The nSequence value. -- **outputs** (array of objects): Each output, in order.: - - **index** (u32): The 0-based output number. - - **amount\_msat** (msat): The amount of the output. - - **scriptPubKey** (hex): The scriptPubKey. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "transactions": [ - { - "hash": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0", - "rawtx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000", - "blockheight": 0, - "txindex": 0, - "locktime": 0, - "version": 2, - "inputs": [ - { - "txid": "804254330e02a4b53b1492efdfe207875940965fcd3a89e0a325fc5126913270", - "index": 1, - "sequence": 4294967295 - }, - { - "txid": "4ee2eafa9a9b9e900aad69b7d3e4d6a5851556b0680ac1caeb3886f7b4a429d2", - "index": 0, - "sequence": 4294967295 - } - ], - "outputs": [ - { - "index": 0, - "satoshis": "88721000msat", - "scriptPubKey": "a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf87" - } - ] - } - ] -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -SEE ALSO --------- - -lightning-newaddr(7), lightning-listfunds(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-makesecret.7.md b/doc/lightning-makesecret.7.md deleted file mode 100644 index 645999514d54..000000000000 --- a/doc/lightning-makesecret.7.md +++ /dev/null @@ -1,72 +0,0 @@ -lightning-makesecret -- Command for deriving pseudorandom key from HSM -====================================================================== - -SYNOPSIS --------- - -**makesecret** [*hex*] [*string*] - -DESCRIPTION ------------ - -The **makesecret** RPC command derives a secret key from the HSM\_secret. - -- **hex** (hex, optional): One of `hex` or `string` must be specified: `hex` can be any hex data. -- **string** (string, optional): One of `hex` or `string` must be specified: `string` is a UTF-8 string interpreted literally. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:makesecret#1", - "method": "makesecret", - "params": [ - "73636220736563726574" - ] -} -{ - "id": "example:makesecret#2", - "method": "makesecret", - "params": [ - null, - "scb secret" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **secret** (secret): The pseudorandom key derived from HSM\_secret. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "secret": "a9a2e742405c28f059349132923a99337ae7f71168b7485496e3365f5bc664ed" -} -{ - "secret": "a9a2e742405c28f059349132923a99337ae7f71168b7485496e3365f5bc664ed" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. - -AUTHOR ------- - -Aditya <> is mainly responsible. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-multifundchannel.7.md b/doc/lightning-multifundchannel.7.md deleted file mode 100644 index 5d4803f2f35b..000000000000 --- a/doc/lightning-multifundchannel.7.md +++ /dev/null @@ -1,237 +0,0 @@ -lightning-multifundchannel -- Command for establishing many lightning channels -============================================================================== - -SYNOPSIS --------- - -**multifundchannel** *destinations* [*feerate*] [*minconf*] [*utxos*] [*minchannels*] [*commitment\_feerate*] - -DESCRIPTION ------------ - -The **multifundchannel** RPC command opens multiple payment channels with nodes by committing a single funding transaction to the blockchain that is shared by all channels. - -If not already connected, **multifundchannel** will automatically attempt to connect; you may provide a *@host:port* hint appended to the node ID so that Core Lightning can learn how to connect to the node; see lightning-connect(7). - -Once the transaction is confirmed, normal channel operations may begin. Readiness is indicated by **listpeers** reporting a *state* of `CHANNELD_NORMAL` for the channel. - -- **destinations** (array of objects): There must be at least one entry in *destinations*; it cannot be an empty array.: - - **id** (string): Node ID, with an optional *@host:port* appended to it in a manner understood by **connect**; see lightning-connect(7). Each entry in the *destinations* array must have a unique node *id*. If not already connected, **multifundchannel** will automatically attempt to connect to the node. - - **amount** (msat): Amount in satoshis taken from the internal wallet to fund the channel (but if we have any anchor channels, this will always leave at least `min-emergency-msat` as change). The string *all* can be used to specify all available funds (or 16,777,215 satoshi if more is available and large channels were not negotiated with the peer). Otherwise it is in satoshi precision; it can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. The value cannot be less than the dust limit, currently 546 satoshi as of this writing, nor more than 16,777,215 satoshi (unless large channels were negotiated with the peer). - - **announce** (boolean, optional): Flag that indicates whether to announce the channel with this. If set to `False`, the channel is unpublished. The default is `True`. - - **push\_msat** (msat, optional): Amount of millisatoshis to outright give to the node. This is a gift to the peer, and you do not get a proof-of-payment out of this. - - **close\_to** (string, optional): Bitcoin address to which the channel funds should be sent to on close. Only valid if both peers have negotiated `option_upfront_shutdown_script` Returns `close_to` set to closing script iff is negotiated. - - **request\_amt** (msat, optional): Amount of liquidity you'd like to lease from peer. If peer supports `option_will_fund`, indicates to them to include this much liquidity into the channel. Must also pass in *compact\_lease*. - - **compact\_lease** (string, optional): Compact representation of the peer's expected channel lease terms. If the peer's terms don't match this set, we will fail to open the channel to this destination. - - **mindepth** (u32, optional): Number of confirmations before we consider the channel active. - - **reserve** (msat, optional): Amount we want the peer to maintain on its side of the channel. It can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. The default is 1% of the funding amount. -- **feerate** (feerate, optional): Feerate used for the opening transaction, and if *commitment\_feerate* is not set, as initial feerate for commitment and HTLC transactions. See NOTES in lightning-feerates(7) for possible values. The default is *normal*. -- **minconf** (integer, optional): Minimum number of confirmations that used outputs should have. The default is 1. -- **utxos** (array of outpoints, optional): - - (outpoint, optional): Utxos to be used to fund the channel, as an array of `txid:vout`. -- **minchannels** (integer, optional): Re-attempt funding as long as at least this many peers remain (must not be zero). The **multifundchannel** command will only fail if too many peers fail the funding process. -- **commitment\_feerate** (feerate, optional): Initial feerate for commitment and HTLC transactions. See *feerate* for valid values. - -EXAMPLE USAGE -------------- - -This example opens three channels at once, with amounts 200,000 sats, 3,000,000 sats and the final channel using all remaining funds (actually, capped at 16,777,215 sats because large-channels is not enabled): - -```shell -$ lightning-cli multifundchannel '[{"id":"0201f42e167959c74d396ac57652fcea63c63940f78e8239cce5720df4d85ef857@127.0.0.1:7272", "amount":"200000sat"}, {"id":"0304a2468065535f9459567686e0f02b40f06e341d3eb2a62ec6763bcf2ccfd207@127.0.0.1:7373", "amount":"0.03btc"}, {"id":"0391f4c475050bb15871da5a72b1f3a1798de3d2e5fb4ffa262899b8d8e1f0b764@127.0.0.1:7474", "amount":"all"}]' -{ - "tx": "02000000000101fbe3c68db87b72f82c3f5447b0bc032469c78e71f229ac99c230807ff378a9d80000000000fdffffff04400d0300000000002200202e9897ed5f9b237aa27fd5d02d24157cd452b0d3f0a5bb03d38ff73f9f8f384bffffff0000000000220020439d797ada249e1e12f8d27cabb7330de3c8de0456fb54892deb7b9c72b0ff7c1dc9b50400000000225120046e3966a2d5e43c1f1e0676161905782e1e7c00811485c618f5144f328f4e2bc0c62d0000000000220020e36fd5c03c3586c3763d8b4c9d8650f396ff1c8a460137fb09b60ee82536a3b20140ea4d564e91c919b50a2d32886f1d414de773491119beb1364b92f15d6d03e1810e5ddea89c265e42f2e96bb028dfb3aa0b5b30072ddcc78daad727503c53e37fa9010000", - "txid": "90dc53922b70628fc9e7804ad0b8cd0fb41f050d94ffa2db3b16e918c96c022a", - "channel_ids": [ - { - "id": "0201f42e167959c74d396ac57652fcea63c63940f78e8239cce5720df4d85ef857", - "channel_id": "25c8253e66a860d17916cc0c21386e310eba9900030a68ec6ff6f59a8401a872", - "outnum": 0 - }, - { - "id": "0304a2468065535f9459567686e0f02b40f06e341d3eb2a62ec6763bcf2ccfd207", - "channel_id": "51749d724892a406896f6bf2e2f8c0b03399d0436691f294839897fa167e6521", - "outnum": 3 - }, - { - "id": "0391f4c475050bb15871da5a72b1f3a1798de3d2e5fb4ffa262899b8d8e1f0b764", - "channel_id": "7e1414e72c081f0754fa18c1657cedabe696aa9ffeaf0b936bfbe3a28f2829d1", - "outnum": 1 - } - ], - "failed": [] -} -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:multifundchannel#1", - "method": "multifundchannel", - "params": { - "destinations": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59@localhost:41939", - "amount": 50000 - } - ], - "feerate": "10000perkw", - "minconf": null, - "utxos": null, - "minchannels": null, - "commitment_feerate": "2000perkw" - } -} -{ - "id": "example:multifundchannel#2", - "method": "multifundchannel", - "params": { - "destinations": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59@localhost:44663", - "amount": 50000 - }, - { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d@localhost:34631", - "amount": 50000 - }, - { - "id": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199@localhost:34617", - "amount": 50000 - } - ], - "feerate": null, - "minconf": null, - "utxos": null, - "minchannels": 1 - } -} -``` - -RETURN VALUE ------------- - -This command opens multiple channels with a single large transaction, thus only one transaction is returned. - -If *minchannels* was specified and is less than the number of destinations, then it is possible that one or more of the destinations do not have a channel even if **multifundchannel** succeeded. -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): - - **id** (pubkey): The peer we opened the channel with. - - **outnum** (u32): The 0-based output index showing which output funded the channel. - - **channel\_id** (hash): The channel\_id of the resulting channel. - - **channel\_type** (object): Channel\_type as negotiated with peer. *(added v24.02)*: - - **bits** (array of u32s): Each bit set in this channel\_type. *(added v24.02)*: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type. *(added v24.02)*: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. - - **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`. -- **failed** (array of objects, optional): Any peers we failed to open with (if *minchannels* was specified less than the number of destinations).: - - **id** (pubkey): The peer we failed to open the channel with. - - **method** (string) (one of "connect", "openchannel\_init", "fundchannel\_start", "fundchannel\_complete"): What stage we failed at. - - **error** (object): - - **code** (integer): JSON error code from failing stage. - - **message** (string): Message from stage. - - **data**: Additional error data. - -On failure, none of the channels are created. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "tx": "0200000000010100a8ceb6f76c49c8c0c809ca359461540708a9a5ac56e56e6a7aaafb35f4d3850000000000fdffffff0250c30000000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd0623ff030000000022512063ffee4ea7d51e6cadf9086e286a2527922aaa25b8c53aebf32fa32a0a627f5a02473044022064763837f2cc84507eb1fc28c9e95d51174e1da4b8755da8e67fe21e37d0a8b402206295d0f19625f014819361a20572b936d81f6c5ba419e56997e882f3a7be094a012103d745445c9362665f22e0d96e9e766f273f3260dea39c8a76bfa05dd2684ddccf66000000", - "txid": "ecba36e93bcf40542d43a05ef550bb0e4be51d766aa2ec8c5640a0d431ab0d06", - "channel_ids": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "channel_id": "060dab31d4a040568ceca26a761de54b0ebb50f55ea0432d5440cf3be936baec", - "channel_type": { - "bits": [ - 12 - ], - "names": [ - "static_remotekey/even" - ] - }, - "outnum": 0 - } - ], - "failed": [] -} -{ - "tx": "020000000001023041611dac05004825ab64781b4a33bf622380bf90196fae689196b1850a1f8f0000000000fdffffff5646519c565466c9588a88400ec71a39a2c0b6988beadb32491a13d9b89f85360100000000fdffffff0250c3000000000000220020181492c29a989f099fd2cf412c74b192dd095e81f4e4f6bec45bd1fbfdd2cfd983720000000000002251203e8a03f678bb7ca048baecc39788530560ea049816d604f72925e425288446c80140caa3b93c6667e4fe0026417cc87ae9dfd16d80018e7c6dcd6dfcee4d6cab7c7e84181baeb95ba25934ad1aa6b57f83c8287bf1b727123350b35549a3abe15b060140b3c6626b9b57081cc7eb5e4f518669764d265fb84316d8fb610e19ede13c5a370c1072861b909ec923acec980adb4a3e488ee3c6f9c49164bd4596945b52f62678000000", - "txid": "1fcc6d46200443ad21e3a1a1628b862bafd0d75c0b4454f5494957097bc7930d", - "channel_ids": [ - { - "id": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199", - "channel_id": "0d93c77b09574949f554440b5cd7d0af2b868b62a1a1e321ad430420466dcc1f", - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "outnum": 0 - } - ], - "failed": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "method": "connect", - "error": { - "code": 401, - "message": "All addresses failed: 127.0.0.1:44663: Connection establishment: Connection refused. " - } - }, - { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "method": "connect", - "error": { - "code": 401, - "message": "All addresses failed: 127.0.0.1:34631: Connection establishment: Connection refused. " - } - } - ] -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 300: The maximum allowed funding amount is exceeded. -- 301: There are not enough funds in the internal wallet (including fees) to create the transaction. -- 302: The output amount is too small, and would be considered dust. -- 303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error. -- 313: The `min-emergency-msat` reserve not be preserved (and we have or are opening anchor channels). - -Failure may also occur if **lightningd** and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc.). See lightning-fundchannel\_start(7) and lightning-fundchannel\_complete(7). - -There may be rare edge cases where a communications failure later in the channel funding process will cancel the funding locally, but the peer thinks the channel is already waiting for funding lockin. In that case, the next time we connect to the peer, our node will tell the peer to forget the channel, but some nodes (in particular, Core Lightning nodes) will disconnect when our node tells them to forget the channel. If you immediately **multifundchannel** with that peer, it could trigger this connect-forget-disconnect behavior, causing the second **multifundchannel** to fail as well due to disconnection. Doing a **connect** with the peers separately, and waiting for a few seconds, should help clear this hurdle; running **multifundchannel** a third time would also clear this. - -AUTHOR ------- - -ZmnSCPxj <> is mainly responsible. - -SEE ALSO --------- - -lightning-connect(7), lightning-listfunds(), lightning-listpeers(7), lightning-fundchannel(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-multiwithdraw.7.md b/doc/lightning-multiwithdraw.7.md deleted file mode 100644 index 5b32fb2d97b5..000000000000 --- a/doc/lightning-multiwithdraw.7.md +++ /dev/null @@ -1,123 +0,0 @@ -lightning-multiwithdraw -- Command for withdrawing to multiple addresses -======================================================================== - -SYNOPSIS --------- - -**multiwithdraw** *outputs* [*feerate*] [*minconf*] [*utxos*] - -DESCRIPTION ------------ - -The **multiwithdraw** RPC command sends funds from Core Lightning's internal wallet to the addresses specified in *outputs*. - -- **outputs** (array of outputdescs): An array containing objects of the form `{address: amount}`. The `amount` may be the string *all*, indicating that all onchain funds be sent to the specified address. Otherwise, it is in satoshi precision; it can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*.: - - (outputdesc, optional) -- **feerate** (feerate, optional): Feerate used for the withdrawals. See NOTES in lightning-feerates(7) for possible values. The default is *normal*. -- **minconf** (u32, optional): Minimum number of confirmations that used outputs should have. The default is 1. -- **utxos** (array of outpoints, optional): - - (outpoint, optional): Utxos to be used to be withdrawn from, as an array of `txid:vout`. These must be drawn from the node's available UTXO set. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:multiwithdraw#1", - "method": "multiwithdraw", - "params": { - "outputs": [ - { - "bcrt1qyusnugshkn6kh5vmdjpe8hylvxlxjy3ns0hmrs": "2222000msat" - }, - { - "bcrt1q6r4vvt7uack33qf9n05umfxy8h5s2rdcmq7ra3": "3333000msat" - } - ], - "feerate": null, - "minconf": null, - "utxos": null - } -} -{ - "id": "example:multiwithdraw#2", - "method": "multiwithdraw", - "params": { - "outputs": [ - { - "BCRT1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KYGT080": 1000 - }, - { - "bcrt1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qzf4jry": 1000 - }, - { - "bcrt1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k0ylj56": 1000 - }, - { - "BCRT1SW50QT2UWHA": 1000 - }, - { - "bcrt1zw508d6qejxtdg4y5r3zarvaryv2wuatf": 1000 - }, - { - "bcrt1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvseswlauz7": 1000 - }, - { - "bcrt1pqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesyga46z": 1000 - }, - { - "bcrt1p0xlxvlhemja6c4dqv22uapctqupfhlxm9h8z3k2e72q4k9hcz7vqc8gma6": 1000 - } - ], - "feerate": null, - "minconf": null, - "utxos": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **tx** (hex): The raw transaction which was sent. -- **txid** (txid): The txid of the **tx**. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "tx": "02000000000101b75863b811587b4c15bb94d9285c31d6369b8ff609e44de399936f8acb268f600000000000fdffffff03050d000000000000160014d0eac62fdcee2d1881259be9cda4c43de9050db8ae0800000000000016001427213e2217b4f56bd19b6c8393dc9f61be691233d4b5f5050000000022512063ffee4ea7d51e6cadf9086e286a2527922aaa25b8c53aebf32fa32a0a627f5a0247304402203a001463da125de5615ff1c18f9cd4a1d2a138c91d40189d350821ac8fb3ae4f02207a507eec27e15fe43476233cd9fe8b690ebd265073a58ed18ff79a1416886f18012103d745445c9362665f22e0d96e9e766f273f3260dea39c8a76bfa05dd2684ddccf66000000", - "txid": "94e803b98257855569d35b675d65fb4fa0061a8b5f828992e2104a2882bb18bf" -} -{ - "tx": "02000000000101dc5a50dfbafc30697b930b44e763ff7a255475d17d975fa0e2003431312098cf0100000000fdffffff09e803000000000000225120000000c4a5cad46221b2a187905e5266362b99d5e91c6ce24d165dab93e86433e803000000000000046002751ee8030000000000002a5128751e76e8199196d454941c45d1b3a323f1433bd6751e76e8199196d454941c45d1b3a323f1433bd6e80300000000000022512079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817983b939700000000002251200518e92cd94e0f62c06f126dff98b9abe79b7ed845a156d5245678e26554475de803000000000000160014751e76e8199196d454941c45d1b3a323f1433bd6e8030000000000002200201863143c14c5166804bd19203356da136c985678cd4d27a1b8c6329604903262e803000000000000125210751e76e8199196d454941c45d1b3a323e803000000000000220020000000c4a5cad46221b2a187905e5266362b99d5e91c6ce24d165dab93e8643301407f0d9bc098c5439ff611507b6a7d403047ed4e0b883f293db19d4e109d350a24f790acb55547384ff2a23fcfde0eba9af7cebc321c19cfc4817ecd47d50c2cd854000000", - "txid": "062383a7c9a19a2768939087a5c89826a4ea3531080f20cc06aa1cbf431be505" -} -``` - -ERRORS ------- - -On failure, an error is reported and the withdrawal transaction is not created. - -- -1: Catchall nonspecific error. -- 301: There are not enough funds in the internal wallet (including fees) to create the transaction. -- 302: The dust limit is not met. - -AUTHOR ------- - -ZmnSCPxj <> is mainly responsible. - -SEE ALSO --------- - -lightning-listfunds(7), lightning-fundchannel(7), lightning-newaddr(7), lightning-txprepare(7), lightning-withdraw(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-newaddr.7.md b/doc/lightning-newaddr.7.md deleted file mode 100644 index e57d3be8d6f1..000000000000 --- a/doc/lightning-newaddr.7.md +++ /dev/null @@ -1,78 +0,0 @@ -lightning-newaddr -- Command for generating a new address to be used by Core Lightning -====================================================================================== - -SYNOPSIS --------- - -**newaddr** [*addresstype*] - -DESCRIPTION ------------ - -The **newaddr** RPC command generates a new address which can subsequently be used to fund channels managed by the Core Lightning node. - -The funding transaction needs to be confirmed before funds can be used. - -To send an on-chain payment from the Core Lightning node wallet, use `withdraw`. - -- **addresstype** (string, optional) (one of "bech32", "p2tr", "all"): It specifies the type of address wanted; currently *bech32* (e.g. `tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg` on bitcoin testnet or `bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej` on bitcoin mainnet), or *p2tr* taproot addresses. The special value *all* generates all known address types for the same underlying key. The default is *bech32* address. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:newaddr#1", - "method": "newaddr", - "params": { - "addresstype": null - } -} -{ - "id": "example:newaddr#2", - "method": "newaddr", - "params": { - "addresstype": "bech32" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **p2tr** (string, optional): The taproot address. *(added v23.08)* -- **bech32** (string, optional): The bech32 (native segwit) address. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "bech32": "bcrt1qq8adjz4u6enf0cjey9j8yt0y490tact93fzgsf" -} -{ - "bech32": "bcrt1qq8adjz4u6enf0cjey9j8yt0y490tact93fzgsf" -} -``` - -ERRORS ------- - -If an unrecognized address type is requested an error message will be returned. - -AUTHOR ------- - -Felix <> is mainly responsible. - -SEE ALSO --------- - -lightning-listfunds(7), lightning-fundchannel(7), lightning-withdraw(7), lightning-listtransactions(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-notifications.7.md b/doc/lightning-notifications.7.md deleted file mode 100644 index cdb3b4c4eb6a..000000000000 --- a/doc/lightning-notifications.7.md +++ /dev/null @@ -1,103 +0,0 @@ -lightning-notifications -- Command to set up notifications. -=========================================================== - -SYNOPSIS --------- - -**notifications** *enable* - -DESCRIPTION ------------ - -The **notifications** the RPC command enabled notifications for this JSON-RPC connection. By default (and for backwards-compatibility) notifications are disabled. - -Various commands, especially complex and slow ones, offer notifications which indicate their progress. - -- **enable** (boolean): Whether to enable or disable notifications. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:notifications#1", - "method": "notifications", - "params": { - "enable": true - } -} -{ - "id": "example:notifications#2", - "method": "notifications", - "params": { - "enable": false - } -} -``` - -NOTIFICATIONS -------------- - -Notifications are JSON-RPC objects without an *id* field. *lightningd* sends notifications (once enabled with this *notifications* command) with a *params* *id* field indicating which command the notification refers to. - -Implementations should ignore notifications without an *id* parameter, or unknown *method*. - -Common *method*s include: - *message*: param *message*: a descriptional string indicating something which occurred relating to the command. Param *level* indicates the level, as per lightning-getlog(7): *info* and *debug* are typical. - *progress*: param *num* and *total*, where *num* starts at 0 and is always less than *total*. Optional param *stage* with fields *num* and *total*, indicating what stage we are progressing through. - -RETURN VALUE ------------- - -On success, if *enable* was *true*, notifications will be forwarded from then on. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -{} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters. - -EXAMPLE JSON NOTIFICATIONS --------------------------- - -```json -{ - "method": "message", - "params": { - "id": 1, - "message": "This is a test message", - "level": "DEBUG" - } -} -{ - "method": "progress", - "params": { - "id": 2, - "num": 0, - "total": 30, - "stage": { - "num": 0, - "total": 2 - } - } -} -``` - -AUTHOR ------- - -Rusty Russell <> wrote the initial version of this man page. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-offer.7.md b/doc/lightning-offer.7.md deleted file mode 100644 index f9a828a4b45e..000000000000 --- a/doc/lightning-offer.7.md +++ /dev/null @@ -1,115 +0,0 @@ -lightning-offer -- Command for accepting payments -================================================= - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - -**offer** *amount* *description* [*issuer*] [*label*] [*quantity\_max*] [*absolute\_expiry*] [*recurrence*] [*recurrence\_base*] [*recurrence\_paywindow*] [*recurrence\_limit*] [*single\_use*] - -DESCRIPTION ------------ - -The **offer** RPC command creates an offer (or returns an existing one), which is a precursor to creating one or more invoices. It automatically enables the processing of an incoming invoice\_request, and issuing of invoices. - -Note that for making an offer to *pay* someone else, see lightning- invoicerequest(7). - -- **amount** (one of): 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*. It can also have an ISO 4217 postfix (e.g. USD), in which case currency conversion will need to be done for the invoice itself. A plugin is needed which provides the `currencyconvert` API for this currency, otherwise the offer creation will fail.: - - (msat\_or\_any) - - (currency) -- **description** (string): A short description of purpose of the offer, e.g. *coffee*. 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. -- **issuer** (string, optional): Who is issuing this offer (i.e. you) if appropriate. -- **label** (string, optional): An internal-use name for the offer, which can be any UTF-8 string. This is *NOT* encoded in the offer not sent to the issuer. -- **quantity\_max** (u64, optional): Invoice can specify more than one of the items up (and including) this maximum: 0 is a special value meaning `no maximuim`. The *amount* for the invoice will need to be multiplied accordingly. This is encoded in the offer. -- **absolute\_expiry** (u64, optional): 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. -- **recurrence** (string, optional): An invoice is expected at regular intervals. The argument is a positive number followed by one of `seconds`, `minutes`, `hours`, `days`, `weeks`, `months` or `years` (variants without the trailing `s` are also permitted). This is encoded in the offer. The semantics of recurrence is fairly predictable, but fully documented in BOLT 12. e.g. `4weeks`. -- **recurrence\_base** (one of, optional): Time in seconds since the first day of 1970 UTC, optionally with a `@` prefix. This indicates when the first period begins; without this, the recurrence periods start from the first invoice. The `@` prefix means that the invoice must start by paying the first period; otherwise it is permitted to start at any period. This is encoded in the offer. e.g. `@1609459200` indicates you must start paying on the 1st January 2021.: - - (string) - - (integer) -- **recurrence\_paywindow** (string, optional): Argument of form `-time+time[%]`. The first time is the number of seconds before the start of a period in which an invoice and payment is valid, the second time is the number of seconds after the start of the period. For example *-604800+86400* means you can fetch an pay the invoice 4 weeks before the given period starts, and up to 1 day afterwards. The optional *%* indicates that the amount of the invoice will be scaled by the time remaining in the period. This is encoded in the offer. The default is that payment is allowed during the current and previous periods. -- **recurrence\_limit** (u32, optional): To indicate the maximum period which exists. eg. `12` means there are 13 periods, from 0 to 12 inclusive. This is encoded in the offer. -- **single\_use** (boolean, optional): 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). The default is False. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:offer#1", - "method": "offer", - "params": { - "amount": "1msat", - "description": "test for 1msat" - } -} -{ - "id": "example:offer#2", - "method": "offer", - "params": { - "amount": "100000sat", - "description": "quantity_max test", - "recurrence": "1week" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **offer\_id** (hash): The id of this offer (merkle hash of non-signature fields). -- **active** (boolean) (always *true*): Whether this can still be used. -- **single\_use** (boolean): Whether this expires as soon as it's paid (reflects the *single\_use* parameter). -- **bolt12** (string): The bolt12 encoding of the offer. -- **used** (boolean): True if an associated invoice has been paid. -- **created** (boolean): False if the offer already existed. -- **label** (string, optional): The (optional) user-specified label. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "offer_id": "f61cca153d1948dade19349792d9bcdc9cef687fd27db0b553a67979f55aae48", - "active": true, - "single_use": false, - "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyqs5rn5v4ehggrxdaezqvtdwdshg93pqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq63s", - "used": false, - "created": true -} -{ - "offer_id": "f7a501e51e2a90d032150b9100b1977c625f05cfda22469bdc81d8a20b1e303f", - "active": true, - "single_use": false, - "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqszltcgqpgghzatpde6xjaretakkz7pqw3jhxaqkyypxdeze35wncs2l2u4gfzyrpds00e6yakfrt6ctrw5n9qanzhqr2xq6qgqsw", - "used": false, - "created": true -} -``` - -ERRORS ------- - -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. - -If the offer already existed, and is still active, that is returned; if it's not active then this call fails. - -- -1: Catchall nonspecific error. -- 1000: Offer with this offer\_id already exists (but is not active). - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listoffers(7), lightning-disableoffer(7), lightning-invoicerequest(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-openchannel_abort.7.md b/doc/lightning-openchannel_abort.7.md deleted file mode 100644 index fd846296c227..000000000000 --- a/doc/lightning-openchannel_abort.7.md +++ /dev/null @@ -1,73 +0,0 @@ -lightning-openchannel\_abort -- Command to abort a channel to a peer -==================================================================== - -SYNOPSIS --------- - -**openchannel\_abort** *channel\_id* - -DESCRIPTION ------------ - -`openchannel_init` is a low level RPC command which initiates a channel open with a specified peer. It uses the openchannel protocol which allows for interactive transaction construction. - -- **channel\_id** (hash): Channel id of the channel to be aborted. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:openchannel_abort#1", - "method": "openchannel_abort", - "params": { - "channel_id": "aec3dfd0c7643a23b679cd2e493c053f8fdf621ff2624949f9582c4118b818c6" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **channel\_id** (hash): The channel id of the aborted channel. -- **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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channel_id": "aec3dfd0c7643a23b679cd2e493c053f8fdf621ff2624949f9582c4118b818c6", - "channel_canceled": true, - "reason": "Abort requested" -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 305: Peer is not connected. -- 311: Unknown channel id. -- 312: Channel in an invalid state - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-openchannel\_init(7), lightning-openchannel\_update(7), lightning-openchannel\_signed(7), lightning-openchannel\_bump(7), lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-multifundchannel(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-openchannel_bump.7.md b/doc/lightning-openchannel_bump.7.md deleted file mode 100644 index 2f24777b81fe..000000000000 --- a/doc/lightning-openchannel_bump.7.md +++ /dev/null @@ -1,68 +0,0 @@ -lightning-openchannel\_bump -- Command to initiate a channel RBF -================================================================ - -SYNOPSIS --------- - -**openchannel\_bump** *channel\_id* *amount* *initialpsbt* [*funding\_feerate*] - -DESCRIPTION ------------ - -`openchannel_bump` is a RPC command which initiates a channel RBF (Replace-By-Fee) for the specified channel. It uses the openchannel protocol which allows for interactive transaction construction. - -Warning: bumping a leased channel will lose the lease. - -- **channel\_id** (hash): Id of the channel to RBF. -- **amount** (sat): Satoshi value that we will contribute to the channel. This value will be \_added\_ to the provided PSBT in the output which is encumbered by the 2-of-2 script for this channel. -- **initialpsbt** (string): The funded, incomplete PSBT that specifies the UTXOs and change output for our channel contribution. It can be updated, see `openchannel_update`; *initialpsbt* must have at least one input. Must have the Non-Witness UTXO (PSBT\_IN\_NON\_WITNESS\_UTXO) set for every input. An error (code 309) will be returned if this requirement is not met. -- **funding\_feerate** (feerate, optional): Feerate for the funding transaction. The default is 1/64th greater than the last feerate used for this channel. - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **channel\_id** (hash): The channel id of the channel. -- **channel\_type** (object): Channel\_type as negotiated with peer. *(added v24.02)*: - - **bits** (array of u32s): Each bit set in this channel\_type. *(added v24.02)*: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type. *(added v24.02)*: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. -- **psbt** (string): The (incomplete) PSBT of the RBF transaction. -- **commitments\_secured** (boolean) (always *false*): Whether the *psbt* is complete. -- **funding\_serial** (u64): The serial\_id of the funding output in the *psbt*. -- **requires\_confirmed\_inputs** (boolean, optional): Does peer require confirmed inputs in psbt? - -If the peer does not support `option_dual_fund`, this command will return an error. - -If the channel is not in a state that is eligible for RBF, this command will return an error. - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 300: The amount exceeded the maximum configured funding amount. -- 301: The provided PSBT cannot afford the funding amount. -- 305: Peer is not connected. -- 309: PSBT missing required fields -- 311: Unknown channel id. -- 312: Channel in an invalid state - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-openchannel\_init(7), lightning-openchannel\_update(7), lightning-openchannel\_signed(7), lightning-openchannel\_abort(7), lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-multifundchannel(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-openchannel_init.7.md b/doc/lightning-openchannel_init.7.md deleted file mode 100644 index 8403cb09a175..000000000000 --- a/doc/lightning-openchannel_init.7.md +++ /dev/null @@ -1,154 +0,0 @@ -lightning-openchannel\_init -- Command to initiate a channel to a peer -====================================================================== - -SYNOPSIS --------- - -**openchannel\_init** *id* *amount* *initialpsbt* [*commitment\_feerate*] [*funding\_feerate*] [*announce*] [*close\_to*] [*request\_amt*] [*compact\_lease*] [*channel\_type*] - -DESCRIPTION ------------ - -`openchannel_init` is a low level RPC command which initiates a channel open with a specified peer. It uses the openchannel protocol which allows for interactive transaction construction. - -- **id** (pubkey): Node id of the remote peer. -- **amount** (sat): Satoshi value that we will contribute to the channel. This value will be \_added\_ to the provided PSBT in the output which is encumbered by the 2-of-2 script for this channel. -- **initialpsbt** (string): Funded, incomplete PSBT that specifies the UTXOs and change output for our channel contribution. It can be updated, see `openchannel_update`; *initialpsbt* must have at least one input. Must have the Non-Witness UTXO (PSBT\_IN\_NON\_WITNESS\_UTXO) set for every input. An error (code 309) will be returned if this requirement is not met. -- **commitment\_feerate** (feerate, optional): Feerate for commitment transactions for non-anchor channels: see **fundchannel**. For anchor channels, it is ignored. -- **funding\_feerate** (feerate, optional): Feerate for the funding transaction. The default is 'opening' feerate. -- **announce** (boolean, optional): Whether or not to announce this channel. -- **close\_to** (string, optional): Bitcoin address to which the channel funds should be sent on close. Only valid if both peers have negotiated `option_upfront_shutdown_script`. -- **request\_amt** (msat, optional): An amount of liquidity you'd like to lease from the peer. If peer supports `option_will_fund`, indicates to them to include this much liquidity into the channel. Must also pass in *compact\_lease*. -- **compact\_lease** (hex, optional): A compact representation of the peer's expected channel lease terms. If the peer's terms don't match this set, we will fail to open the channel. -- **channel\_type** (array of u32s, optional): Each bit set in this channel\_type.: - - (u32, optional): Bit number. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:openchannel_init#1", - "method": "openchannel_init", - "params": { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "amount": 999000, - "initialpsbt": "cHNidP8BADMCAAAAAYbThUhSzYr7ph6Z434bdcW7eoirYOFMmUt2GXZ79sF/AQAAAAD9////AGYAAAAAAQDeAgAAAAABARVD4QKlmwy8SNcNypf1o9TzbIFZjj4dqVzHAL0SLDoTAAAAAAD9////AjOv9ikBAAAAFgAUXJGglH7At5HOVY4ZHp0+19kv655AQg8AAAAAABYAFAH62Qq81maX4lkhZHIt5KlevuFlAkcwRAIgVIxRXqIykOOxm/6YPaFFx2Qh1618qlXPUhDiliVQ2KUCIHQcHniUTcm1XT8SyRE8ev52jm0uiIYum15XcR/tPh+NASEC3Pby7xL4+Ig/Z8TchQ0QT1upLGet3da8qjSjgHO9LOJlAAAAAQEfQEIPAAAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQA=", - "commitment_feerate": null, - "funding_feerate": null, - "announce": true, - "close_to": null, - "request_amt": null, - "channel_type": [ - 12, - 22 - ] - } -} -{ - "id": "example:openchannel_init#2", - "method": "openchannel_init", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount": 16777216, - "initialpsbt": "cHNidP8BADMCAAAAAQVmgyf8sA3N9J6XaH5z7W+GUPDFOM/2L/PuD7iE0RaqAAAAAAD9////AGYAAAAAAQDeAgAAAAABAdWZZguGlQJ1eA+d7WAT500jdCzHJWT9J/TGQIkbS1KfAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFE8Xxp4GJggW2lJcsHg0VLolc/Z/AkcwRAIgEQLtA2JvAk7S1R9QD5o4SVNXCjMwTUIyHtu65taC/d4CIEnpq2PdrqKqitdmZj09U8cFuwV+Ba9kmZSUsctSWx8CASECUKP6EBufpaBXT910uYhCcKdw9z8iqHgyKa3uuX2QgmVlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQA=", - "commitment_feerate": null, - "funding_feerate": null, - "announce": true, - "close_to": null, - "request_amt": null, - "channel_type": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **channel\_id** (hash): The channel id of the channel. -- **psbt** (string): The (incomplete) PSBT of the funding transaction. -- **channel\_type** (object): Channel\_type as negotiated with peer. *(added v24.02)*: - - **bits** (array of u32s): Each bit set in this channel\_type. *(added v24.02)*: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type. *(added v24.02)*: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. -- **commitments\_secured** (boolean) (always *false*): Whether the *psbt* is complete. -- **funding\_serial** (u64): The serial\_id of the funding output in the *psbt*. -- **requires\_confirmed\_inputs** (boolean, optional): Does peer require confirmed inputs in psbt? - -If the peer does not support `option_dual_fund`, this command will return an error. - -If you sent a *request\_amt* and the peer supports `option_will_fund` and is interested in leasing you liquidity in this channel, returns their updated channel fee max (*channel\_fee\_proportional\_basis*, *channel\_fee\_base\_msat*), updated rate card for the lease fee (*lease\_fee\_proportional\_basis*, *lease\_fee\_base\_sat*) and their on-chain weight *weight\_charge*, which will be added to the lease fee at a rate of *funding\_feerate* * *weight\_charge* / 1000. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channel_id": "53fa2b1ca0d8f21abeaaac0495ab9925cdfaf2ca8b04dbe4aeb061823e1ff2c8", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDeAgAAAAABARVD4QKlmwy8SNcNypf1o9TzbIFZjj4dqVzHAL0SLDoTAAAAAAD9////AjOv9ikBAAAAFgAUXJGglH7At5HOVY4ZHp0+19kv655AQg8AAAAAABYAFAH62Qq81maX4lkhZHIt5KlevuFlAkcwRAIgVIxRXqIykOOxm/6YPaFFx2Qh1618qlXPUhDiliVQ2KUCIHQcHniUTcm1XT8SyRE8ev52jm0uiIYum15XcR/tPh+NASEC3Pby7xL4+Ig/Z8TchQ0QT1upLGet3da8qjSjgHO9LOJlAAAAAQEfQEIPAAAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIIbThUhSzYr7ph6Z434bdcW7eoirYOFMmUt2GXZ79sF/AQ8EAQAAAAEQBP3///8M/AlsaWdodG5pbmcBCMCDK/6LyRi8AAEDCFg+DwAAAAAAAQQiACDYM+8ZRsbTj0OCG/yzqLt2buFQn9LuMPDZqFFcgmCmfAz8CWxpZ2h0bmluZwEIchtFHfZ5FBgA", - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "commitments_secured": false, - "funding_serial": 8222241539686471000, - "requires_confirmed_inputs": false -} -{ - "channel_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDeAgAAAAABAdWZZguGlQJ1eA+d7WAT500jdCzHJWT9J/TGQIkbS1KfAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFE8Xxp4GJggW2lJcsHg0VLolc/Z/AkcwRAIgEQLtA2JvAk7S1R9QD5o4SVNXCjMwTUIyHtu65taC/d4CIEnpq2PdrqKqitdmZj09U8cFuwV+Ba9kmZSUsctSWx8CASECUKP6EBufpaBXT910uYhCcKdw9z8iqHgyKa3uuX2QgmVlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIAVmgyf8sA3N9J6XaH5z7W+GUPDFOM/2L/PuD7iE0RaqAQ8EAAAAAAEQBP3///8M/AlsaWdodG5pbmcBCLR8RjOq9lmcAAEDCAAAAAEAAAAAAQQiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQz8CWxpZ2h0bmluZwEIZZtc7LD4y9YA", - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "commitments_secured": false, - "funding_serial": 7321547790872006000, - "requires_confirmed_inputs": false -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 300: The amount exceeded the maximum configured funding amount. -- 301: The provided PSBT cannot afford the funding amount. -- 304: Still syncing with bitcoin network -- 305: Peer is not connected. -- 306: Unknown peer id. -- 309: PSBT missing required fields -- 310: v2 channel open protocol not supported by peer -- 312: Channel in an invalid state - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-openchannel\_update(7), lightning-openchannel\_signed(7), lightning-openchannel\_abort(7), lightning-openchannel\_bump(7), lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-multifundchannel(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-openchannel_signed.7.md b/doc/lightning-openchannel_signed.7.md deleted file mode 100644 index abb3b90f5510..000000000000 --- a/doc/lightning-openchannel_signed.7.md +++ /dev/null @@ -1,56 +0,0 @@ -lightning-openchannel\_signed -- Command to conclude a channel open -=================================================================== - -SYNOPSIS --------- - -**openchannel\_signed** *channel\_id* *signed\_psbt* - -DESCRIPTION ------------ - -`openchannel_signed` is a low level RPC command which concludes a channel open with the specified peer. It uses the v2 openchannel protocol, which allows for interactive transaction construction. - -This command should be called after `openchannel_update` returns *commitments\_secured* `true`. - -This command will broadcast the finalized funding transaction, if we receive valid signatures from the peer. - -- **channel\_id** (hash): Id of the channel. -- **signed\_psbt** (string): The PSBT returned from `openchannel_update` (where *commitments\_secured* was true) with partial signatures or finalized witness stacks included for every input that we contributed to the PSBT. - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **channel\_id** (hash): The channel id of the channel. -- **tx** (hex): The funding transaction. -- **txid** (txid): The txid of the **tx**. - -ERRORS ------- - -On error, the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 303: Funding transaction broadcast failed. -- 305: Peer is not connected. -- 309: PSBT missing required fields. -- 311: Unknown channel id. -- 312: Channel in an invalid state - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-openchannel\_init(7), lightning-openchannel\_update(7), lightning-openchannel\_abort(7), lightning-openchannel\_bump(7), lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-multifundchannel(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-openchannel_update.7.md b/doc/lightning-openchannel_update.7.md deleted file mode 100644 index 3f951c2df4a2..000000000000 --- a/doc/lightning-openchannel_update.7.md +++ /dev/null @@ -1,130 +0,0 @@ -lightning-openchannel\_update -- Command to update a collab channel open -======================================================================== - -SYNOPSIS --------- - -**openchannel\_update** *channel\_id* *psbt* - -DESCRIPTION ------------ - -`openchannel_update` is a low level RPC command which continues an open channel, as specified by *channel\_id*. An updated *psbt* is passed in; any changes from the PSBT last returned (either from `openchannel_init` or a previous call to `openchannel_update`) will be communicated to the peer. - -Must be called after `openchannel_init` and before `openchannel_signed`. - -Must be called until *commitments\_secured* is returned as true, at which point `openchannel_signed` should be called with a signed version of the PSBT returned by the last call to `openchannel_update`. - -- **channel\_id** (hash): Id of the channel. -- **psbt** (string): Updated PSBT to be sent to the peer. May be identical to the PSBT last returned by either `openchannel_init` or `openchannel_update`. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:openchannel_update#1", - "method": "openchannel_update", - "params": { - "channel_id": "c3a282c1136f44dc2e499c116a9d9e6ea64649c3eabdd396cb96fb30a86fad8e", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDeAgAAAAABAdWZZguGlQJ1eA+d7WAT500jdCzHJWT9J/TGQIkbS1KfAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFE8Xxp4GJggW2lJcsHg0VLolc/Z/AkcwRAIgEQLtA2JvAk7S1R9QD5o4SVNXCjMwTUIyHtu65taC/d4CIEnpq2PdrqKqitdmZj09U8cFuwV+Ba9kmZSUsctSWx8CASECUKP6EBufpaBXT910uYhCcKdw9z8iqHgyKa3uuX2QgmVlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIAVmgyf8sA3N9J6XaH5z7W+GUPDFOM/2L/PuD7iE0RaqAQ8EAAAAAAEQBP3///8M/AlsaWdodG5pbmcBCH932EuFXyxeAAEDCEBCDwAAAAAAAQQiACA/FzDCfUe+WFEBa+aPSY4TZTYt6liPHz5OHo04w2gQ3wz8CWxpZ2h0bmluZwEI42voJCAYLKQA" - } -} -{ - "id": "example:openchannel_update#2", - "method": "openchannel_update", - "params": { - "channel_id": "c3a282c1136f44dc2e499c116a9d9e6ea64649c3eabdd396cb96fb30a86fad8e", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDeAgAAAAABAdWZZguGlQJ1eA+d7WAT500jdCzHJWT9J/TGQIkbS1KfAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFE8Xxp4GJggW2lJcsHg0VLolc/Z/AkcwRAIgEQLtA2JvAk7S1R9QD5o4SVNXCjMwTUIyHtu65taC/d4CIEnpq2PdrqKqitdmZj09U8cFuwV+Ba9kmZSUsctSWx8CASECUKP6EBufpaBXT910uYhCcKdw9z8iqHgyKa3uuX2QgmVlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIAVmgyf8sA3N9J6XaH5z7W+GUPDFOM/2L/PuD7iE0RaqAQ8EAAAAAAEQBP3///8M/AlsaWdodG5pbmcBCH932EuFXyxeAAEDCEBCDwAAAAAAAQQiACA/FzDCfUe+WFEBa+aPSY4TZTYt6liPHz5OHo04w2gQ3wz8CWxpZ2h0bmluZwEI42voJCAYLKQA" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **channel\_id** (hash): The channel id of the channel. -- **channel\_type** (object): Channel\_type as negotiated with peer. *(added v24.02)*: - - **bits** (array of u32s): Each bit set in this channel\_type. *(added v24.02)*: - - (u32, optional): Bit number. - - **names** (array of strings): Feature name for each bit set in this channel\_type. *(added v24.02)*: - - (string, optional) (one of "static\_remotekey/even", "anchor\_outputs/even", "anchors\_zero\_fee\_htlc\_tx/even", "scid\_alias/even", "zeroconf/even"): Name of feature bit. -- **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). -- **funding\_outnum** (u32): The index of the funding output in the psbt. -- **close\_to** (hex, optional): Scriptpubkey which we have to close to if we mutual close. -- **requires\_confirmed\_inputs** (boolean, optional): Does peer require confirmed inputs in psbt? - -If **commitments\_secured** is *true*: - - **channel\_id** (hash): The derived channel id. - - **funding\_outnum** (u32): The index of the funding output for this channel in the funding transaction. - - **close\_to** (hex, optional): If a `close_to` address was provided to `openchannel_init` and the peer supports `option_upfront_shutdownscript`. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channel_id": "c3a282c1136f44dc2e499c116a9d9e6ea64649c3eabdd396cb96fb30a86fad8e", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDeAgAAAAABAdWZZguGlQJ1eA+d7WAT500jdCzHJWT9J/TGQIkbS1KfAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFE8Xxp4GJggW2lJcsHg0VLolc/Z/AkcwRAIgEQLtA2JvAk7S1R9QD5o4SVNXCjMwTUIyHtu65taC/d4CIEnpq2PdrqKqitdmZj09U8cFuwV+Ba9kmZSUsctSWx8CASECUKP6EBufpaBXT910uYhCcKdw9z8iqHgyKa3uuX2QgmVlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIAVmgyf8sA3N9J6XaH5z7W+GUPDFOM/2L/PuD7iE0RaqAQ8EAAAAAAEQBP3///8M/AlsaWdodG5pbmcBCH932EuFXyxeAAEDCEBCDwAAAAAAAQQiACA/FzDCfUe+WFEBa+aPSY4TZTYt6liPHz5OHo04w2gQ3wz8CWxpZ2h0bmluZwEI42voJCAYLKQA", - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "commitments_secured": true, - "funding_outnum": 0 -} -{ - "channel_id": "c3a282c1136f44dc2e499c116a9d9e6ea64649c3eabdd396cb96fb30a86fad8e", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDeAgAAAAABAdWZZguGlQJ1eA+d7WAT500jdCzHJWT9J/TGQIkbS1KfAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFE8Xxp4GJggW2lJcsHg0VLolc/Z/AkcwRAIgEQLtA2JvAk7S1R9QD5o4SVNXCjMwTUIyHtu65taC/d4CIEnpq2PdrqKqitdmZj09U8cFuwV+Ba9kmZSUsctSWx8CASECUKP6EBufpaBXT910uYhCcKdw9z8iqHgyKa3uuX2QgmVlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIAVmgyf8sA3N9J6XaH5z7W+GUPDFOM/2L/PuD7iE0RaqAQ8EAAAAAAEQBP3///8M/AlsaWdodG5pbmcBCH932EuFXyxeAAEDCEBCDwAAAAAAAQQiACA/FzDCfUe+WFEBa+aPSY4TZTYt6liPHz5OHo04w2gQ3wz8CWxpZ2h0bmluZwEI42voJCAYLKQA", - "channel_type": { - "bits": [ - 12, - 22 - ], - "names": [ - "static_remotekey/even", - "anchors_zero_fee_htlc_tx/even" - ] - }, - "commitments_secured": true, - "funding_outnum": 0, - "close_to": "5120eed745804da9784cc203f563efa99ffa54fdf01b137bc964e63c3124070ffbe6" -} -``` - -ERRORS ------- - -On error, the returned object will contain `code` and `message` properties, -with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 305: Peer is not connected. -- 309: PSBT missing required fields -- 311: Unknown channel id. -- 312: Channel in an invalid state - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-openchannel\_init(7), lightning-openchannel\_signed(7), lightning-openchannel\_bump(7), lightning-openchannel\_abort(7), lightning-fundchannel\_start(7), lightning-fundchannel\_complete(7), lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-multifundchannel(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-parsefeerate.7.md b/doc/lightning-parsefeerate.7.md deleted file mode 100644 index edd871516abb..000000000000 --- a/doc/lightning-parsefeerate.7.md +++ /dev/null @@ -1,90 +0,0 @@ -lightning-parsefeerate -- Command for parsing a feerate string to a feerate -=========================================================================== - -SYNOPSIS --------- - -**parsefeerate** *feerate\_str* - -DESCRIPTION ------------ - -The **parsefeerate** command returns the current feerate for any valid *feerate\_str*. This is useful for finding the current feerate that a **fundpsbt** or **utxopsbt** command might use. - -- **feerate\_str** (string): The feerate string to parse. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:parsefeerate#1", - "method": "parsefeerate", - "params": [ - "unilateral_close" - ] -} -{ - "id": "example:parsefeerate#2", - "method": "parsefeerate", - "params": [ - "9999perkw" - ] -} -{ - "id": "example:parsefeerate#3", - "method": "parsefeerate", - "params": [ - 10000 - ] -} -{ - "id": "example:parsefeerate#4", - "method": "parsefeerate", - "params": [ - "urgent" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **perkw** (u32, optional): Value of *feerate\_str* in kilosipa. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "perkw": 11000 -} -{ - "perkw": 9999 -} -{ - "perkw": 2500 -} -{ - "perkw": 11000 -} -``` - -ERRORS ------- - -The **parsefeerate** command will error if the *feerate\_str* format is not recognized. - -- -32602: If the given parameters are wrong. - -TRIVIA ------- - -In CLN we like to call the weight unit "sipa" in honor of Pieter Wuille, who uses the name "sipa" on IRC and elsewhere. Internally we call the *perkw* style as "feerate per kilosipa". - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-pay.7.md b/doc/lightning-pay.7.md deleted file mode 100644 index 4d49e10fb8cc..000000000000 --- a/doc/lightning-pay.7.md +++ /dev/null @@ -1,146 +0,0 @@ -lightning-pay -- Command for sending a payment to a BOLT11 invoice -================================================================== - -SYNOPSIS --------- - -**pay** *bolt11* [*amount\_msat*] [*label*] [*riskfactor*] [*maxfeepercent*] [*retry\_for*] [*maxdelay*] [*exemptfee*] [*localinvreqid*] [*exclude*] [*maxfee*] [*description*] - -DESCRIPTION ------------ - -The **pay** RPC command attempts to find a route to the given destination, and send the funds it asks for. . - -The response will occur when the payment fails or succeeds. Once a payment has succeeded, calls to **pay** with the same *bolt11* will succeed immediately. - -When using *lightning-cli*, you may skip optional parameters by using *null*. Alternatively, use **-k** option to provide parameters by name. - -- **bolt11** (string): Bolt11 invoice, if **experimental-offers** is enabled, it can actually be a bolt12 invoice, such as one received from lightningd-fetchinvoice(7). If it does not contain an amount, *amount\_msat* is required, otherwise if it is specified it must be *null*. -- **amount\_msat** (msat, optional): *amount\_msat* is in millisatoshi precision; it can be a whole number, or a whole number with suffix *msat* or *sat*, or a three decimal point number with suffix *sat*, or an 1 to 11 decimal point number suffixed by *btc*. -- **label** (string, optional): It is used to attach a label to payments, and is returned in lightning- listpays(7) and lightning-listsendpays(7). -- **riskfactor** (number, optional): The *riskfactor* is described in detail in lightning-getroute(7). The default is 10. -- **maxfeepercent** (number, optional): Percentage of the amount that is to be paid. The default is 0.5. -- **retry\_for** (u16, optional): Until *retry\_for* seconds passes, the command will keep finding routes and retrying the payment. The default is 60 seconds. -- **maxdelay** (u16, optional): A payment may be delayed for up to `maxdelay` blocks by another node; clients should be prepared for this worst case. -- **exemptfee** (msat, optional): This option can be used for tiny payments which would be dominated by the fee leveraged by forwarding nodes. Setting `exemptfee` allows the `maxfeepercent` check to be skipped on fees that are smaller than `exemptfee`. The default is 5000 millisatoshi. -- **localinvreqid** (hex, optional): `localinvreqid` is used by offers to link a payment attempt to a local `invoice_request` offer created by lightningd-invoicerequest(7). This ensures that we only make a single payment for an offer, and that the offer is marked `used` once paid. -- **exclude** (array, optional): *exclude* is a JSON array of short-channel-id/direction (e.g. [ '564334x877x1/0', '564195x1292x0/1' ]) or pubkey which should be excluded from consideration for routing. The default is not to exclude any channels or nodes.: - - (short\_channel\_id\_dir) - - (pubkey) -- **maxfee** (msat, optional): *maxfee* overrides both *maxfeepercent* and *exemptfee* defaults (and if you specify *maxfee* you cannot specify either of those), and creates an absolute limit on what fee we will pay. This allows you to implement your own heuristics rather than the primitive ones used here. -- **description** (string, optional): It is only required for bolt11 invoices which do not contain a description themselves, but contain a description hash: in this case *description* is required. *description* is then checked against the hash inside the invoice before it will be paid. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:pay#1", - "method": "pay", - "params": { - "bolt11": "lni1qqgxr7gha7gusyg83lsr8qcqg4axgq3qqc3xu3s3rg94nj40zfsy866mhu5vxne6tcej5878k2mneuvgjy8ssqtypg3hgetnwsszycn0d36rzv3zypjx2umrwf5hqarfdahzcg8sn7jmpuyl423pvggzvmj9nrga83q474e2sjygxzmq7ln5fmvjxh4skxafx2pmx9wqx5v9qgqxyfhyvyg6pdvu4tcjvpp7kkal9rp57wj7xv4pl3ajku70rzy3pavzzqjz06c8s2vvmrpjlkcse0txx0gmc6jalqqxmeyjm75qcnfnqxwyt2sfsqnxu3vc68fug904w25y3zpskc8huazwmy34av93h2fjswe3tsp4rqpe8qlx9xssexfc0aguke3q6u0jgw2qmn008mzu04mkmqmjmhes3gcpqdqdnzl270s48vsp635rd4jm04snvgkcp65qlkgp8qztu2mdp7c5uqpj2rll3pzu56st537rct3v62gfqeamzthjuwkr0pkvsdnnffpn4sq9sz0lryaufktx0nfxlffum3yesqev5gwqqqqqqqqqqqqqqqzsqqqqqqqqqqqqr5jt9hav2gqqqqqq5szxtvwkyz5zq2000hlwvadejz366lqjt9sd2j4rf5tfd9rgmmyegt4dqd34cf6v4gqkfvppqfnwgkvdr57yzh6h92zg3qctvrm7w38djg67kzcm4yeg8vc4cq633uzqn3n74ccym4wcvq20vsx7lmk450kprpvlrh4cukk8xy9ptjcef4rnhytnkyn4vnxxtd57yeaksze2s30y26cs6u3rjd9322eg9puk24q", - "amount_msat": null, - "label": null, - "riskfactor": null, - "maxfeepercent": null, - "retry_for": null, - "maxdelay": null, - "exemptfee": null, - "localinvreqid": null, - "exclude": null, - "maxfee": null, - "description": null - } -} -``` - -RANDOMIZATION -------------- - -To protect user privacy, the payment algorithm performs some randomization. - -1: Route Randomization - -Route randomization means the payment algorithm does not always use the lowest-fee or shortest route. This prevents some highly-connected node from learning all of the user payments by reducing their fees below the network average. - -2: Shadow Route - -Shadow route means the payment algorithm will virtually extend the route by adding delays and fees along it, making it appear to intermediate nodes that the route is longer than it actually is. This prevents intermediate nodes from reliably guessing their distance from the payee. - -Route randomization will never exceed *maxfeepercent* of the payment. Route randomization and shadow routing will not take routes that would exceed *maxdelay*. - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **payment\_preimage** (secret): The proof of payment: SHA256 of this **payment\_hash**. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **created\_at** (number): The UNIX timestamp showing when this payment was initiated. -- **parts** (u32): How many attempts this took. -- **amount\_msat** (msat): Amount the recipient received. -- **amount\_sent\_msat** (msat): Total amount we sent (including fees). -- **status** (string) (one of "complete", "pending", "failed"): Status of payment. -- **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. - -You can monitor the progress and retries of a payment using the lightning-paystatus(7) command. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "destination": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "payment_hash": "29ef7dfee675b990a3ad7c125960d54aa34d16969468dec9942ead03635c274c", - "created_at": 1706153504.76628, - "parts": 1, - "amount_msat": 100, - "amount_sent_msat": 100, - "payment_preimage": "6634c1b549c6615d234832f377e06d5a5ab088c40cebdc5cfb8c1262030abcad", - "status": "complete" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 201: Already paid with this *hash* using different amount or destination. -- 203: Permanent failure at destination. The *data* field of the error will be routing failure object (except for self-payment, which currently returns the error directly from lightning-sendpay(7)). -- 205: Unable to find a route. -- 206: Route too expensive. Either the fee or the needed total locktime for the route exceeds your *maxfeepercent* or *maxdelay* settings, respectively. The *data* field of the error will indicate the actual *fee* as well as the *feepercent* percentage that the fee has of the destination payment amount. It will also indicate the actual *delay* along the route. -- 207: Invoice expired. Payment took too long before expiration, or already expired at the time you initiated payment. The *data* field of the error indicates *now* (the current time) and *expiry* (the invoice expiration) as UNIX epoch time in seconds. -- 210: Payment timed out without a payment in progress. - -Error codes 202 and 204 will only get reported at **sendpay**; in **pay** we will keep retrying if we would have gotten those errors. - -A routing failure object has the fields below: - -*erring\_index*: The index of the node along the route that reported the error. 0 for the local node, 1 for the first hop, and so on. -*erring\_node*: The hex string of the pubkey id of the node that reported the error. -*erring\_channel*: The short channel ID of the channel that has the error, or *0:0:0* if the destination node raised the error. -*failcode*: The failure code, as per BOLT #4. -*channel\_update*: The hex string of the *channel\_update* message received from the remote node. Only present if error is from the remote node and the *failcode* has the UPDATE bit set, as per BOLT #4. - -The *data* field of errors will include statistics *getroute\_tries* and *sendpay\_tries*. It will also contain a *failures* field with detailed data about routing errors. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listpays(7), lightning-decodepay(7), lightning-listinvoice(7), lightning-delinvoice(7), lightning-getroute(7), lightning-invoice(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-ping.7.md b/doc/lightning-ping.7.md deleted file mode 100644 index b4fc84ce5ee1..000000000000 --- a/doc/lightning-ping.7.md +++ /dev/null @@ -1,81 +0,0 @@ -lightning-ping -- Command to check if a node is up. -=================================================== - -SYNOPSIS --------- - -**ping** *id* [*len*] [*pongbytes*] - -DESCRIPTION ------------ - -The **ping** command checks if the node with *id* is ready to talk. It currently only works for peers we have a channel with. - -- **id** (pubkey): The pubkey of the node to ping. -- **len** (u16, optional): The length of the ping. The default is 128. -- **pongbytes** (u16, optional): The length of the reply. A value of 65532 to 65535 means `don't reply`. The default is 128. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:ping#1", - "method": "ping", - "params": { - "len": 128, - "pongbytes": 128 - } -} -{ - "id": "example:ping#2", - "method": "ping", - "params": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "len": 1000, - "pongbytes": 65535 - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **totlen** (u16): The answer length of the reply message (including header: 0 means no reply expected). - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "totlen": 132 -} -{ - "totlen": 0 -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters or we're already waiting for a ping response from peer. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -SEE ALSO --------- - -lightning-connect(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-plugin.7.md b/doc/lightning-plugin.7.md deleted file mode 100644 index 373399a659cf..000000000000 --- a/doc/lightning-plugin.7.md +++ /dev/null @@ -1,175 +0,0 @@ -lightning-plugin -- Manage plugins with RPC -=========================================== - -SYNOPSIS --------- - -**plugin** *subcommand* [*plugin|directory*] [*options*] ... - -DESCRIPTION ------------ - -The **plugin** RPC command can be used to control dynamic plugins, i.e. plugins that declared themself 'dynamic' (in getmanifest). - -- **subcommand** (string) (one of "start", "stop", "rescan", "startdir", "list"): Determines what action is taken: - - *subcommand* **start** takes a *path* to an executable as argument and starts it as plugin. *path* may be an absolute path or a path relative to the plugins directory (default *~/.lightning/plugins*). If the plugin is already running and the executable (checksum) has changed, the plugin is killed and restarted except if its an important (or builtin) plugin. If the plugin doesn't complete the 'getmanifest' and 'init' handshakes within 60 seconds, the command will timeout and kill the plugin. Additional *options* may be passed to the plugin, but requires all parameters to be passed as keyword=value pairs using the `-k|--keyword` option which is recommended. For example the following command starts the plugin helloworld.py (present in the plugin directory) with the option greeting set to 'A crazy': - ``shell. - lightning-cli -k plugin subcommand=start plugin=helloworld.py greeting='A crazy'. - ``. - - *subcommand* **stop** takes a plugin executable *path* or *name* as argument and stops the plugin. If the plugin subscribed to 'shutdown', it may take up to 30 seconds before this command returns. If the plugin is important and dynamic, this will shutdown `lightningd`. - - *subcommand* **startdir** starts all executables it can find in *directory* (excl. subdirectories) as plugins. Checksum and timeout behavior as in **start** applies. - - *subcommand* **rescan** starts all plugins in the default plugins directory (default *~/.lightning/plugins*) that are not already running. Checksum and timeout behavior as in **start** applies. - - *subcommand* **list** lists all running plugins (incl. non-dynamic). -- **plugin** (string, optional): *path* or *name* of a plugin executable to start or stop. -- **directory** (string, optional): *path* of a directory containing plugins. -- **options** (array of strings, optional): - - (string, optional): *keyword=value* options passed to plugin, can be repeated. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:plugin#1", - "method": "plugin", - "params": [ - "list" - ] -} -{ - "id": "example:plugin#2", - "method": "plugin", - "params": { - "subcommand": "stop", - "plugin": "fail_htlcs.py" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **command** (string) (one of "start", "stop", "rescan", "startdir", "list"): The subcommand this is responding to. - -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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "command": "list", - "plugins": [ - { - "name": "~/lightning/plugins/autoclean", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/plugins/chanbackup", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/plugins/bcli", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/plugins/commando", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/plugins/funder", - "active": true, - "dynamic": true - }, - { - "name": "~/lightning/plugins/topology", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/plugins/keysend", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/plugins/offers", - "active": true, - "dynamic": true - }, - { - "name": "~/lightning/plugins/pay", - "active": true, - "dynamic": true - }, - { - "name": "~/lightning/plugins/txprepare", - "active": true, - "dynamic": true - }, - { - "name": "~/lightning/plugins/cln-renepay", - "active": true, - "dynamic": true - }, - { - "name": "~/lightning/plugins/spenderp", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/plugins/sql", - "active": true, - "dynamic": true - }, - { - "name": "~/lightning/plugins/bookkeeper", - "active": true, - "dynamic": false - }, - { - "name": "~/lightning/target/debug/examples/cln-plugin-startup", - "active": true, - "dynamic": false - } - ] -} -{ - "command": "stop", - "result": "Successfully stopped fail_htlcs.py." -} -``` - -ERRORS ------- - -On error, the reason why the action could not be taken upon the plugin is returned. - -AUTHOR ------- - -Antoine Poinsot <> is mainly responsible. - -SEE ALSO --------- - -lightning-cli(1), lightning-listconfigs(1), [writing plugins][writing plugins] - -RESOURCES ---------- - -Main web site: - -[writing plugins]: PLUGINS.md diff --git a/doc/lightning-preapproveinvoice.7.md b/doc/lightning-preapproveinvoice.7.md deleted file mode 100644 index 00da015fb04b..000000000000 --- a/doc/lightning-preapproveinvoice.7.md +++ /dev/null @@ -1,44 +0,0 @@ -lightning-preapproveinvoice -- Ask the HSM to preapprove an invoice (low-level) -=============================================================================== - -SYNOPSIS --------- - -**preapproveinvoice** *bolt11* - -DESCRIPTION ------------ - -Command *added* in v23.02. - -The **preapproveinvoice** RPC command submits the *bolt11* invoice to the HSM to check that it is approved for payment. - -Generally the **preapproveinvoice** request does not need to be made explicitly, it is automatically generated as part of a **pay** request. - -By default, the HSM will approve all **preapproveinvoice** requests. - -If a remote signer is being used it might decline an **preapproveinvoice** request because it would exceed velocity controls, is not covered by allowlist controls, was declined manually, or other reasons. - -If a remote signer declines a **preapproveinvoice** request a subsequent attempt to pay the invoice anyway will fail; the signer will refuse to sign the commitment. - -- **bolt11** (string): Bolt11 invoice to submit to the HSM to check. *(added v23.02)* - -RETURN VALUE ------------- - -On success, an empty object is returned. - -AUTHOR ------- - -Ken Sedgwick <> is mainly responsible. - -SEE ALSO --------- - -lightning-pay(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-preapprovekeysend.7.md b/doc/lightning-preapprovekeysend.7.md deleted file mode 100644 index 94032239d2f2..000000000000 --- a/doc/lightning-preapprovekeysend.7.md +++ /dev/null @@ -1,46 +0,0 @@ -lightning-preapprovekeysend -- Ask the HSM to preapprove a keysend payment (low-level) -====================================================================================== - -SYNOPSIS --------- - -**preapprovekeysend** *destination* *payment\_hash* *amount\_msat* - -DESCRIPTION ------------ - -Command *added* in v23.02. - -The **preapprovekeysend** RPC command submits the *destination*, *payment\_hash*, and *amount\_msat* parameters to the HSM to check that they are approved as a keysend payment. - -Generally the **preapprovekeysend** request does not need to be made explicitly, it is automatically generated as part of a **keysend** request. - -By default, the HSM will approve all **preapprovekeysend** requests. - -If a remote signer is being used it might decline an **preapprovekeysend** request because it would exceed velocity controls, is not covered by allowlist controls, was declined manually, or other reasons. - -If a remote signer declines a **preapprovekeysend** request a subsequent attempt to pay the keysend anyway will fail; the signer will refuse to sign the commitment. - -- **destination** (pubkey): It is a 33 byte, hex-encoded, node ID of the node that the payment should go to. *(added v23.02)* -- **payment\_hash** (hex) (always 64 characters): It is the unique identifier of a payment. *(added v23.02)* -- **amount\_msat** (msat): The amount to send in millisatoshi precision; it can be a whole number, or a whole number with suffix `msat` or `sat`, or a three decimal point number with suffix `sat`, or an 1 to 11 decimal point number suffixed by `btc`. *(added v23.02)* - -RETURN VALUE ------------- - -On success, an empty object is returned. - -AUTHOR ------- - -Ken Sedgwick <> is mainly responsible. - -SEE ALSO --------- - -lightning-keysend(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-recover.7.md b/doc/lightning-recover.7.md deleted file mode 100644 index 900a6323fcf2..000000000000 --- a/doc/lightning-recover.7.md +++ /dev/null @@ -1,70 +0,0 @@ -lightning-recover -- Reinitialize Your Node for Recovery -======================================================== - -SYNOPSIS --------- - -**recover** *hsmsecret* - -DESCRIPTION ------------ - -The **recover** RPC command wipes your node and restarts it with the `--recover` option. This is only permitted if the node is unused: no channels, no bitcoin addresses issued (you can use `check` to see if recovery is possible). - -*hsmsecret* is either a codex32 secret starting with "cl1" as returned by `hsmtool getcodexsecret`, or a raw 64 character hex string. - -NOTE: this command only currently works with the `sqlite3` database backend. - -- **hsmsecret** (string): Either a codex32 secret starting with `cl1` as returned by `hsmtool getcodexsecret`, or a raw 64 character hex string. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:recover#1", - "method": "recover", - "params": { - "hsmsecret": "cl10leetsd35kw6r5de5kueedxgqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdeuq7xuh94k9g" - } -} -{ - "id": "example:recover#2", - "method": "recover", - "params": { - "hsmsecret": "6c696768746e696e672d31000000000000000000000000000000000000000000" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **result** (string) (always "Recovery restart in progress") *(added v24.05)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{} -{ - "result": "Recovery restart in progress" -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-hsmtool(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-recoverchannel.7.md b/doc/lightning-recoverchannel.7.md deleted file mode 100644 index 80c514ed4de1..000000000000 --- a/doc/lightning-recoverchannel.7.md +++ /dev/null @@ -1,66 +0,0 @@ -lightning-recoverchannel -- Command for recovering channels bundeled in an array in the form of *Static Backup* -=============================================================================================================== - -SYNOPSIS --------- - -**recoverchannel** *scb* - -DESCRIPTION ------------ - -The **recoverchannel** RPC command tries to force the peer (with whom you already had a channel) to close the channel and sweeps on-chain fund. This method is not spontaneous and depends on the peer, so use it in case of severe data loss. - -The *scb* parameter is an array containing minimum required info to reconnect and sweep funds. You can get the scb for already stored channels by using the RPC command 'staticbackup'. - -- **scb** (array of hexs): SCB of the channels in an array.: - - (hex, optional) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:recoverchannel#1", - "method": "recoverchannel", - "params": [ - [ - "0000000000000001c3a7b9d74a174497122bc52d74d6d69836acadc77e0429c6d8b68b48d5c9139a022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d5904017f0000019f0bc3a7b9d74a174497122bc52d74d6d69836acadc77e0429c6d8b68b48d5c9139a0000000000000000000186a000021000" - ] - ] -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **stubs** (array of strings): - - (string, optional): Channel IDs of channels successfully inserted. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "stubs": [ - "c3a7b9d74a174497122bc52d74d6d69836acadc77e0429c6d8b68b48d5c9139a" - ] -} -``` - -AUTHOR ------- - -Aditya <> is mainly responsible. - -SEE ALSO --------- - -lightning-getsharedsecret(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-renepay.7.md b/doc/lightning-renepay.7.md deleted file mode 100644 index 04e02de0310c..000000000000 --- a/doc/lightning-renepay.7.md +++ /dev/null @@ -1,138 +0,0 @@ -lightning-renepay -- Command for sending a payment to a BOLT11 invoice -====================================================================== - -SYNOPSIS --------- - -**renepay** *invstring* [*amount\_msat*] [*maxfee*] [*maxdelay*] [*retry\_for*] [*description*] [*label*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -**renepay** is a new payment plugin based on Pickhardt-Richter optimization method for Multi-Path-Payments. This implementation has not been thoroughly tested and it should be used with caution. - -The response will occur when the payment fails or succeeds. Once a payment has succeeded, calls to **renepay** with the same *invstring* will not lead to a new payment attempt, but instead it will succeed immediately. - -When using *lightning-cli*, you may skip optional parameters by using *null*. Alternatively, use **-k** option to provide parameters by name. - -- **invstring** (string): Bolt11 invoice which the RPC command attempts to pay. Currently, **renepay** supports bolt11 invoices only. -- **amount\_msat** (msat, optional): If the *invstring* does not contain an amount, *amount\_msat* is required, otherwise if it is specified it must be *null*. in millisatoshi precision; it can be a whole number, or a whole number with suffix *msat* or *sat*, or a three decimal point number with suffix *sat*, or an 1 to 11 decimal point number suffixed by *btc*. -- **maxfee** (msat, optional): *maxfee* is a hard bound, in the sense that the command will never attempt a payment when the fees exceed that value. -- **maxdelay** (u32, optional): Overrides the value of `max-locktime-blocks` for this payment. It serves to limit the locktime of funds in the payment HTLC measured in blocks. -- **retry\_for** (u32, optional): Measured in seconds specifies how much time it is allowed for the command to keep retrying the payment. The default is 60 seconds. -- **description** (string, optional): Only required for bolt11 invoices which do not contain a description themselves, but contain a description hash: in this case *description* is required. *description* is then checked against the hash inside the invoice before it will be paid. -- **label** (string, optional): Used to attach a label to payments, and is returned in lightning-listpays(7) and lightning-listsendpays(7). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:renepay#1", - "method": "renepay", - "params": { - "invstring": "lnbcrt1230n1pjmxj9jsp5suc4cag0lv3wemllkvms56e6ll0w867cczqfttuu8cpfl089f9kspp56wvxtdh8fxg5r5y3kg3klxceakqaydskwzatga25v95da8nzkmwqdqjv3jhxcmjd9c8g6t0dcxqyjw5qcqp99qxpqysgqkmyhymt0j7hy38vzqxx465s4ys0fg78flnjqfx4clvdq9mrmgglpcnjrrnhtk7maa87pfvjez88hke8w97zvuecwswaf9gzyqlsthegpza67eu" - } -} -{ - "id": "example:renepay#2", - "method": "renepay", - "params": { - "invstring": "lnbcrt1pja0f9asp50kzadmeyy78eymjvhnlk5dznl3g5k5x8agh52ewjtg0jclas4ylspp5crsutd9hg05lxyhzphdcuyng6z3knrsdae83mxwawa842gz3vj3sdqjv3jhxcmjd9c8g6t0dcxqyjw5qcqp99qxpqysgqr5yzhxmup4muyaz6x8u2dy4qyu9t5qzuf5k9xayvj5kg7tve60gjk4jrv2l76exnj2xkuzhtwky23pkkxedzy6p9yrsgyqdwj7dv5gsp4zcw6v", - "amount_msat": 548925 - } -} -``` - -OPTIMALITY ----------- - -**renepay** is based on the work by Pickhardt-Richter's *Optimally Reliable & Cheap Payment Flows on the Lightning Network*. Which means the payment command will prefer routes that have a higher probability of success while keeping fees low. - -The algorithm records some partial knowledge of the state of the Network deduced from the responses obtained after evey payment attempt. This knowledge is kept through different payment requests, but decays with time to account for the dynamics of the Network (after 1 hour all previous knowledge will be erased). Knowledge from previous payment attempts increases the reliability for subsequent ones. - -Higher probabilities of success and lower fees cannot generally by optimized at once. Hence **renepay** combines the two in different amounts seeking solutions that satisfy *maxfee* bound and a target for 90% probability of success. *maxfee* is a hard bound, in the sense that the command will never attempt a payment when the fees exceed that value. While the probability target is not compulsory (but desirable), i.e. if the best route does not satisfy the 90% probability target it will be tried anyways. - -When *maxfee* and the 90% probability bounds are satified, the algorithm will optimize the fees to its lowest value. - -RANDOMIZATION -------------- - -To protect user privacy, the payment algorithm performs *shadow route* randomization. Which means the payment algorithm will virtually extend the route by adding delays and fees along it, making it appear to intermediate nodes that the route is longer than it actually is. This prevents intermediate nodes from reliably guessing their distance from the payee. - -Route randomization will never exceed *maxfee* of the payment. Route randomization and shadow routing will not take routes that would exceed *maxdelay*. - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **payment\_preimage** (secret): The proof of payment: SHA256 of this **payment\_hash**. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **created\_at** (number): The UNIX timestamp showing when this payment was initiated. -- **parts** (u32): How many attempts this took. -- **amount\_msat** (msat): Amount the recipient received. -- **amount\_sent\_msat** (msat): Total amount we sent (including fees). -- **status** (string) (one of "complete", "pending", "failed"): Status of payment. -- **destination** (pubkey, optional): The final destination of the payment. - -You can monitor the progress and retries of a payment using the lightning-renepaystatus(7) command. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "payment_preimage": "0a3fd704b34f47d6e306dbac78141753be83848d3a19725c972abfc367dcc591", - "payment_hash": "d39865b6e7499141d091b2236f9b19ed81d2361670bab475546168de9e62b6dc", - "created_at": 1706248370.6267352, - "parts": 1, - "amount_msat": 123000, - "amount_sent_msat": 123000, - "status": "complete", - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59" -} -{ - "payment_preimage": "a635e92d024beebfc58519e6544888aa560ba3bcaba7e74924e4b8432eaa56f5", - "payment_hash": "c0e1c5b4b743e9f312e20ddb8e1268d0a3698e0dee4f1d99dd774f55205164a3", - "created_at": 1708631229.7841823, - "parts": 1, - "amount_msat": 548925, - "amount_sent_msat": 548925, - "status": "complete", - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 200: Other payment attempts are in progress. -- 203: Permanent failure at destination. -- 205: Unable to find a route. -- 206: Payment routes are too expensive. -- 207: Invoice expired. Payment took too long before expiration, or already expired at the time you initiated payment. -- 210: Payment timed out without a payment in progress. -- 212: Invoice is invalid. - -AUTHOR ------- - -Eduardo Quintana-Miranda <> is mainly responsible. - -SEE ALSO --------- - -lightning-renepaystatus(7), lightning-listpays(7), lightning-invoice(7) - -RESOURCES ---------- - -Main web site: - -Pickhardt R. and Richter S., *Optimally Reliable & Cheap Payment Flows on the Lightning Network* diff --git a/doc/lightning-renepaystatus.7.md b/doc/lightning-renepaystatus.7.md deleted file mode 100644 index a02a4a27f8b7..000000000000 --- a/doc/lightning-renepaystatus.7.md +++ /dev/null @@ -1,51 +0,0 @@ -lightning-renepaystatus -- Command for quering the status of previous renepay attempts -====================================================================================== - -SYNOPSIS --------- - -**renepaystatus** [*invstring*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -The **renepaystatus** RPC command queries the payment plugin **renepay** for the status of previous payment attempts. - -This command always succeeds. - -- **invstring** (string, optional): If specified, the command will return a list of payment attempts whose invoice matches *invstring*, otherwise all payments with be listed. - -RETURN VALUE ------------- - -On success, an object containing **paystatus** is returned. It is an array of objects, where each object contains: - -- **bolt11** (string): Invoice string BOLT11. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **created\_at** (number): The UNIX timestamp showing when this payment was initiated. -- **groupid** (u32): The id for this payment attempt. -- **amount\_msat** (msat): Amount the recipient received. -- **status** (string) (one of "complete", "pending", "failed"): Status of payment. -- **notes** (array of strings): A list of messages for debugging purposes.: - - (string, optional): A message generated by renepay. -- **payment\_preimage** (secret, optional): The proof of payment: SHA256 of this **payment\_hash** (for completed payments only). -- **parts** (u32, optional): How many attempts this took. -- **amount\_sent\_msat** (msat, optional): Total amount we sent including fees (for completed payments only). -- **destination** (pubkey, optional): The final destination of the payment. - -AUTHOR ------- - -Eduardo Quintana-Miranda <> is mainly responsible. - -SEE ALSO --------- - -lightning-renepay(7), lightning-listpays(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-reserveinputs.7.md b/doc/lightning-reserveinputs.7.md deleted file mode 100644 index 25fb87c2ddf4..000000000000 --- a/doc/lightning-reserveinputs.7.md +++ /dev/null @@ -1,180 +0,0 @@ -lightning-reserveinputs -- Construct a transaction and reserve the UTXOs it spends -================================================================================== - -SYNOPSIS --------- - -**reserveinputs** *psbt* [*exclusive*] [*reserve*] - -DESCRIPTION ------------ - -The **reserveinputs** RPC command places (or increases) reservations on any inputs specified in *psbt* which are known to lightningd. It will fail with an error if any of the inputs are known to be spent, and ignore inputs which are unknown. - -Normally the command will fail (with no reservations made) if an input is already reserved. - -- **psbt** (string): The PSBT to reserve inputs from. -- **exclusive** (boolean, optional): If set to *False*, existing reservations are simply extended, rather than causing failure. -- **reserve** (u32, optional): The number of blocks to reserve. By default, reservations are for the next 72 blocks (approximately 6 hours). - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:reserveinputs#1", - "method": "reserveinputs", - "params": { - "psbt": "cHNidP8BAFwCAAAAAkwJVUqB0xXTO7JZ3PnPdGnxoYfQxhU+xqXGFYXsyX0RAAAAAAD9////TAlVSoHTFdM7slnc+c90afGhh9DGFT7GpcYVhezJfREBAAAAAP3///8AAAAAAAAAAA==", - "exclusive": true, - "reserve": null - } -} -{ - "id": "example:reserveinputs#2", - "method": "reserveinputs", - "params": { - "psbt": "cHNidP8BAP32AQIAAAAMgnW099dbh1uD153ih5eU5WhluynLxekXjAOjkEdNBg8BAAAAAP3///9FWKQt8C+1y4741+beFSqWAaj9DuvzHNpxvpxS+GB8lwEAAAAA/f///6E5TAGqktI29Oso6b9kZZoAFFGGvpJQUM8VO+3LMTlmAAAAAAD9////nSDT7hrkuoQtAV1yNnbpkJsB5ifKoM2zP+CcLPfis1gBAAAAAP3///+P1rW90UXfD0gIk58h3sXxxy3ZfJJLP0H1I4Jpzy/87QEAAAAA/f///w0UKZ/s9DnPpV+FJ8h2BEI7tl+qVxSGRFRv9FYw4girAQAAAAD9////EPNsUFrEOZyfjbqbh8rfHQ4C9RQECw12n3c1yhFqkzoAAAAAAP3///8QW9LEsSmuvSnvVzy+FDktM7ewQmZnIJI/TJMahLmSzwEAAAAA/f///+4edbWRHDdRJcMeHHElgSmb+nENPsz/g/0AmAEU6hXeAAAAAAD9////T15YLGmk7HBsrL+awdcxi3db3esp8AcCTS9XGrEnfoAAAAAAAP3///8q7xInvEk7J0Ir9cpKXqU2lArUskkYLrimIE0+Yb6a2QEAAAAA/f///8hBLKyMa2zRJqwNOk7DmsDIfG7IvJtQiJ+QnkkHl6atAAAAAAD9////AAAAAAAAAAAAAAAAAAAAAAAA", - "exclusive": false, - "reserve": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **reservations** is returned. It is an array of objects, where each object contains: - -- **txid** (txid): The input transaction id. -- **vout** (u32): The input index output number which was reserved. -- **was\_reserved** (boolean): Whether the input was already reserved. -- **reserved** (boolean) (always *true*): Whether the input is now reserved. -- **reserved\_to\_block** (u32): What blockheight the reservation will expire. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "reservations": [ - { - "txid": "117dc9ec8515c6a5c63e15c6d087a1f16974cff9dc59b23bd315d3814a55094c", - "vout": 1, - "was_reserved": false, - "reserved": true, - "reserved_to_block": 175 - } - ] -} -{ - "reservations": [ - { - "txid": "0f064d4790a3038c17e9c5cb29bb6568e5949787e29dd7835b875bd7f7b47582", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "977c60f8529cbe71da1cf3eb0efda801962a15dee6d7f88ecbb52ff02da45845", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "663931cbed3b15cf505092be865114009a6564bfe928ebf436d292aa014c39a1", - "vout": 0, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "58b3e2f72c9ce03fb3cda0ca27e6019b90e97636725d012d84bae41aeed3209d", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "edfc2fcf698223f5413f4b927cd92dc7f1c5de219f9308480fdf45d1bdb5d68f", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "ab08e23056f46f5444861457aa5fb63b420476c827855fa5cf39f4ec9f29140d", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "3a936a11ca35779f760d0b0414f5020e1ddfca879bba8d9f9c39c45a506cf310", - "vout": 0, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "cf92b9841a934c3f9220676642b0b7332d3914be3c57ef29bdae29b1c4d25b10", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "de15ea14019800fd83ffcc3e0d71fa9b298125711c1ec32551371c91b5751eee", - "vout": 0, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "807e27b11a572f4d0207f029ebdd5b778b31d7c19abfac6c70eca4692c585e4f", - "vout": 0, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "d99abe613e4d20a6b82e1849b2d40a9436a55e4acaf52b42273b49bc2712ef2a", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "ada69707499e909f88509bbcc86e7cc8c09ac34e3a0dac26d16c6b8cac2c41c8", - "vout": 0, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - } - ] -} -``` - -ERRORS ------- - -On failure, an error is reported and no UTXOs are reserved. - -- -32602: Invalid parameter, such as specifying a spent/reserved input in *psbt*. - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-unreserveinputs(7), lightning-signpsbt(7), lightning-sendpsbt(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-sendcustommsg.7.md b/doc/lightning-sendcustommsg.7.md deleted file mode 100644 index 303cab980679..000000000000 --- a/doc/lightning-sendcustommsg.7.md +++ /dev/null @@ -1,67 +0,0 @@ -lightning-sendcustommsg -- Low-level interface to send protocol messages to peers -================================================================================= - -SYNOPSIS --------- - -**sendcustommsg** *node\_id* *msg* - -DESCRIPTION ------------ - -Command *added* in v0.10.1. - -The `sendcustommsg` RPC method allows the user to inject a custom message into the communication with the peer with the given `node_id`. This is intended as a low-level interface to implement custom protocol extensions on top, not for direct use by end-users. - -On the receiving end a plugin may implement the `custommsg` plugin hook and get notified about incoming messages, and allow additional unknown even types in their getmanifest response. - -- **node\_id** (pubkey): The node specified by `node_id` must be a peer, i.e., it must have a direct connection with the node receiving the RPC call, and the connection must be established. For a method to send arbitrary messages over multiple hops, including hops that do not understand the custom message, see the `createonion` and `sendonion` RPC methods. Messages can only be injected if the connection is handled by `openingd` or `channeld`. Messages cannot be injected when the peer is handled by `onchaind` or `closingd` since these do not have a connection, or are synchronous daemons that do not handle spontaneous messages. -- **msg** (hex): Must be a hex encoded well-formed message, including the 2-byte type prefix, but excluding the length prefix which will be added by the RPC method. The message types may not be one of the internally handled types, since that may cause issues with the internal state tracking of Core Lightning. We do (as of *v23.11*) allow sending of even types, but note that peers (as per the spec) will disconnect on receiving unknown even types. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:sendcustommsg#5", - "method": "sendcustommsg", - "params": { - "node_id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "msg": "77770012" - } -} -``` - -RETURN VALUE ------------- - -The method will validate the arguments and queue the message for delivery through the daemon that is currently handling the connection. Queuing provides best effort guarantees and the message may not be delivered if the connection is terminated while the message is queued. The RPC method will return as soon as the message is queued. - -If any of the above limitations is not respected the method returns an explicit error message stating the issue. -On success, an object is returned, containing: - -- **status** (string): Information about where message was queued. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "status": "Message sent to connectd for delivery" -} -``` - -AUTHOR ------- - -Christian Decker <> is mainly responsible. - -SEE ALSO --------- - -lightning-createonion(7), lightning-sendonion(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-sendinvoice.7.md b/doc/lightning-sendinvoice.7.md deleted file mode 100644 index bd79ddb8c077..000000000000 --- a/doc/lightning-sendinvoice.7.md +++ /dev/null @@ -1,106 +0,0 @@ -lightning-sendinvoice -- Command for send an invoice for an offer -================================================================= - -SYNOPSIS --------- - -**(WARNING: experimental-offers only)** - -**sendinvoice** *invreq* *label* [*amount\_msat*] [*timeout*] [*quantity*] - -DESCRIPTION ------------ - -The **sendinvoice** RPC command creates and sends an invoice to the issuer of an *invoice\_request* for it to pay: lightning-invoicerequest(7). - -If **fetchinvoice-noconnect** is not specified in the configuation, it will connect to the destination in the (currently common!) case where it cannot find a route which supports `option_onion_messages`. - -- **invreq** (string): The bolt12 invoice\_request string beginning with `lnr1`. -- **label** (one of): The unique label to use for this invoice.: - - (string) - - (integer) -- **amount\_msat** (msat, optional): Required if the *offer* does not specify an amount at all, or specifies it in a different currency. Otherwise you may set it (e.g. to provide a tip). The default is the amount contained in the offer (multiplied by *quantity* if any). -- **timeout** (u32, optional): Seconds to wait for the offering node to pay the invoice or return an error. This will also be the timeout on the invoice that is sent. The default is 90 seconds. -- **quantity** (u64, optional): Quantity is is required if the offer specifies quantity\_max, otherwise it is not allowed. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:sendinvoice#1", - "method": "sendinvoice", - "params": { - "invreq": "lnr1qqg804wzdsyn8g4mf2yc22k8xvjpjzstwd5k6urvv5s8getnw3gzqp3zderpzxstt8927ynqg044h0egcd8n5h3n9g0u0v4h8ncc3yg02gqsykppqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4nuzqw5w7y7xqm2rushk5a5n3mcuvqel954raykd5nqa830nq9hpd4s4fcnxw266vp9d5c8f3m3w40hmm6gm8akxx3rsnr7d4usunv0x3q8q", - "label": "payme for real!" - } -} -``` - -RETURN VALUE ------------- - -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. -- **status** (string) (one of "unpaid", "paid", "expired"): Whether it's paid, unpaid or unpayable. -- **expires\_at** (u64): UNIX timestamp of when it will become / became unpayable. -- **created\_index** (u64): 1-based index indicating order this invoice was created in. *(added v23.08)* -- **amount\_msat** (msat, optional): The amount required to pay this invoice. -- **bolt12** (string, optional): The BOLT12 string. -- **updated\_index** (u64, optional): 1-based index indicating order this invoice was changed (only present if it has changed since creation). *(added v23.08)* - -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. - - **payment\_preimage** (secret): Proof of payment. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "label": "payme for real!", - "bolt12": "lni1qqg804wzdsyn8g4mf2yc22k8xvjpjzstwd5k6urvv5s8getnw3gzqp3zderpzxstt8927ynqg044h0egcd8n5h3n9g0u0v4h8ncc3yg02gqsykppqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4ngycqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky96qmcmtl30xtt7jdakfyhzm8f0gny6f4d2ukx5gurem04z8lfd2wza5qs9pz6wp9vu7cm6n4wmmrz77y4w6z5xv4q93yudkdtkl5zmzdzuawzqqex7gd5v0x0r83pqj82udd542fl4krh50s0dkx47d0hd5wh77g52xxl75ccpkt35mc8n282wslju9ufyys2y8qqqqqqqqqqqqqqqpgqqqqqqqqqqqqp6f9jm7k9yqqqqqq2gpr96l99lfspt25zqnyfgu7hznmt2tzkjdt92d2wc3dsq7keph7w8gudjs46spfzqrlu4gqs9vppqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky9muzqpze8kk43g0wh4h8qlac5lswwesrvsaxcza2f5j90c2h3ts8yzmn9g4mxqe89fngrqny8nf52xxuxep6548etda8lp876jr0nnxgdkdq", - "payment_hash": "4c89473d714f6b52c56935655354ec45b007ad90dfce3a38d942ba8052200ffc", - "amount_msat": 2, - "status": "paid", - "pay_index": 1, - "amount_received_msat": 2, - "paid_at": 1708640865, - "payment_preimage": "305951ab02cb2ea5eb884dbfd8fb110b4e088ecb8338b3e84e8f9c70919c19bf", - "description": "simple test", - "expires_at": 1708640953, - "created_index": 2, - "updated_index": 1 -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. -- 1002: Offer has expired. -- 1003: Cannot find a route to the node making the offer. -- 1004: The node making the offer returned an error message. -- 1005: We timed out waiting for the invoice to be paid - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-fetchinvoice(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-sendonion.7.md b/doc/lightning-sendonion.7.md deleted file mode 100644 index c5bc5b5ae93d..000000000000 --- a/doc/lightning-sendonion.7.md +++ /dev/null @@ -1,134 +0,0 @@ -lightning-sendonion -- Send a payment with a custom onion packet -================================================================ - -SYNOPSIS --------- - -**sendonion** *onion* *first\_hop* *payment\_hash* [*label*] [*shared\_secrets*] [*partid*] [*bolt11*] [*amount\_msat*] [*destination*] [*localinvreqid*] [*groupid*] [*description*] - -DESCRIPTION ------------ - -The **sendonion** RPC command can be used to initiate a payment attempt with a custom onion packet. The onion packet is used to deliver instructions for hops along the route on how to behave. Normally these instructions are indications on where to forward a payment and what parameters to use, or contain details of the payment for the final hop. However, it is possible to add arbitrary information for hops in the custom onion, allowing for custom extensions that are not directly supported by Core Lightning. - -If the first element of *route* does not have "channel" set, a suitable channel (if any) will be chosen, otherwise that specific short-channel-id is used. The following is an example of a 3 hop onion: - -```json -[ - "298606954e9de3e9d938d18a74fed794c440e8eda82e52dc08600953c8acf9c4", - "2dc094de72adb03b90894192edf9f67919cb2691b37b1f7d4a2f4f31c108b087", - "a7b82b240dbd77a4ac8ea07709b1395d8c510c73c17b4b392bb1f0605d989c85" -] -``` - -- **onion** (hex): Hex-encoded 1366 bytes long blob that was returned by either of the tools that can generate onions. It contains the payloads destined for each hop and some metadata. Please refer to [BOLT 04][bolt04] for further details. If is specific to the route that is being used and the *payment\_hash* used to construct, and therefore cannot be reused for other payments or to attempt a separate route. The custom onion can generally be created using the `devtools/onion` CLI tool, or the **createonion** RPC command. -- **first\_hop** (object): Instructs Core Lightning which peer to send the onion to. It is a JSON dictionary that corresponds to the first element of the route array returned by *getroute*.: - - **id** (pubkey): Node id for the peer. Use any available channel available to this peer. - - **amount\_msat** (msat): The amount to add an HTLC for millisatoshis. - - **delay** (u16): The number of blocks delay of blocks on top of the current blockheight. -- **payment\_hash** (hash): Specifies the 32 byte hex-encoded hash to use as a challenge to the HTLC that we are sending. It is specific to the onion and has to match the one the onion was created with. -- **label** (string, optional): Can be used to provide a human readable reference to retrieve the payment at a later time. -- **shared\_secrets** (array of secrets, optional): A JSON list of 32 byte hex-encoded secrets that were used when creating the onion. Core Lightning can send a payment with a custom onion without the knowledge of these secrets, however it will not be able to parse an eventual error message since that is encrypted with the shared secrets used in the onion. If *shared\_secrets* is provided Core Lightning will decrypt the error, act accordingly, e.g., add a `channel_update` included in the error to its network view, and set the details in *listsendpays* correctly. If it is not provided Core Lightning will store the encrypted onion, and expose it in *listsendpays* allowing the caller to decrypt it externally. If it is not provided the Core Lightning node does not know how long the route is, which channels or nodes are involved, and what an eventual error could have been. It can therefore be used for oblivious payments.: - - (secret, optional) -- **partid** (u16, optional): If provided and non-zero, allows for multiple parallel partial payments with the same *payment\_hash*. -- **bolt11** (string, optional): If provided, it will be returned in *waitsendpay* and *listsendpays* results. -- **amount\_msat** (msat, optional): Used to annotate the payment, and is returned by *waitsendpay* and *listsendpays*. -- **destination** (pubkey, optional): If provided, it will be returned in **listpays** result. -- **localinvreqid** (hash, optional): `localinvreqid` is used by offers to link a payment attempt to a local `invoice_request` offer created by lightningd-invoicerequest(7). -- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment\_hash. -- **description** (string, optional): If provided, it will be returned in *waitsendpay* and *listsendpays* results. *(added v0.11.0)* - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:sendonion#1", - "method": "sendonion", - "params": { - "onion": "00034928294556b10308f9aeac7a240223d4d5f72097db1ef36a36b10cab937f2f205ed7218b47d4600eaf7fd390940bf9a6cdac99aafdb4783c468150eeeab9b57e56a06778d023ffb3bb84c7d8c2ad8868b61c28b566634af52c288ed6569583db66f5bd0edfb801c252f078020e1df6359af5969296b4698a71d17c5ca6e5ee4b64b7cce3ad0a1aa31e6be4d5fe3a31fa7a25259c640716020a9a248ca3ebb68eb823f8884b5df3710969f4c2ffb153779a923bab946ed43c1f6658d7f8e7e25303bb78ef4862fb550b8b1c79d522b035eedfda9ab70a61322522acf7233bb8ea2423958448fc8ac3d000835fda04bf661f1bf2ad2d091f506840bb2f10f82c0812149d99267a47824defe90877ed70db526b2200e18dccb92b17516de3778c055645728eadf4c74375aa0aae80a7773a536a908ca1e25c0fdca90e50ce0be05eeb973ec5e83ce3ab6b35818e021780428af81320a694483c1c15f64e685ba1fd3b1e1b926e6b4ec9eeeac8aca60c60e0f0f583e35e7f081dc6f4c64157e100c79c4c25101bed77cd9f93416f9a67d9f1916a782c498c38365af4a5fabb1b745fa840a054a06564c3f4b376aeb72cdd059d3794c82bbbf12a1f62234016a6912b384e7e4cebbd39ee4395aeff43c461e226d1e0151cce508a181a9c61275bf4b89e4556cf24df13b993dec96541555f8b9a699be9488568a11ac7f25849da62765472511ad74a6660c10e37f5fa13d4e4665ef7825ae1f2da4a86d5581912262de89b4b11a722fd127b31aa0d7fab8c679b07bf95e65cb80b2dacb5b90794399fb8f23823f68058431aa1c399b5baceccaf8521d004f45dba6ec1fddc54473343e9e67cd50cc3f2f3d8a5dab8a7ab9ae553dc3cd34e74b858da75975265f7c673a25e8d01a5130ab40eaba712b80c608cd0431b4b45ea0d81af595e21f24976608429127bf586f7507666500bc7245cf9266fa0bd0e58404c496e190c873cd143ace9048e9d5021c23967a24e09f2e54166e54b4ee8888dc1af535624e7ee8b426c1628175017a9e8a73eb1d0d49028a4f4d77897f3c08f1cd7bdee2b00f9bb9eadc49a69bf4f6c0cb2c95a16f03d7958f1b8f83cb40ae87ddf75f26050e2c2ed9f8f8523b3d389a50b217bda651dc21f095fe7d2d3851a0a6cf01051f3f3c6f1ad59ed46d44928d15a0e6e1bd4df4c99bdb82a05b0e781b69a73bc30fe579c8ac9fe8aeb6beb1c0f44def2775b7341af37e6ef58ceb34958b29d3e36112b78644612228761b8badc802f0b2b8fcaeb1db8f3a8db4afa2d7b4540a7c331db6f5141fa3909a513df875ff8a63f5b542d662781ca96a69e3b2925d6a63555b2c5825ffb2ad848d71122f54110e0d203000f3e9cc23b793c3540dfb8d881caedd25055a8f495e9e7a0391dbf9cbd9344f7df659ee8d3ce5ec16217ab83e1394ba991eb8ffd9a869f8ebb2e2428845e779979c57b5f8875f502728229a55ce87b3eba85c75264d30eaf7b373f6b09ba3086d9e98348d87b049468c2c30a6501cb2a3862f1703bbf29895e8b4262353eae720ed8ae678750011e2eb51f4800d3f4725fa873d7deec1c46f77a5f61c73dc938239e77f432bcc245c7b935413c51c0bc92bdaae144452aa95910909e46e500557961203f4e1483b9c09c124464907825e1ff74c87c58d6e2e91970baac9b89a554beca6df9acee16d77dd929d0caa7797e06f2c384c03fdedc89c697b9c34787a50cf399a8d7f195e79b347efc8267c474a477ce210f11049d432b280eaf3fccd451f6218d35c64cbd1006bcc54eeea8b856855c9aa92bc3adc6900a7c7a0eee09834c5a1f2da3d8ea9a478aea90c954952ad2a72d3856350ac3132d17e1e8116fa774066a22c857a827699c98285111a405e74685a3ae579ae78c545774f45491e4935bf4", - "first_hop": { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "channel": "103x3x0", - "direction": 1, - "amount_msat": 1002, - "delay": 21, - "style": "tlv" - }, - "payment_hash": "f584c14bb23506acdd94cf3cea377f3cc5805f3cba5430bc3756ef83ede1a0dc", - "label": null, - "shared_secrets": null, - "partid": null, - "bolt11": null, - "amount_msat": null, - "destination": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **created\_index** (u64): 1-based index indicating order this payment was created in. *(added v23.11)* -- **id** (u64): Old synonym for created\_index. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **status** (string) (one of "pending", "complete"): Status of the payment (could be complete if already sent previously). -- **created\_at** (u64): The UNIX timestamp showing when this payment was initiated. -- **amount\_sent\_msat** (msat): The amount sent. -- **amount\_msat** (msat, optional): The amount delivered to destination (if known). -- **destination** (pubkey, optional): The final destination of the payment if known. -- **label** (string, optional): The label, if given to sendpay. -- **bolt11** (string, optional): The bolt11 string (if supplied). -- **bolt12** (string, optional): The bolt12 string (if supplied: **experimental-offers** only). -- **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**. - - **updated\_index** (u64, optional): 1-based index indicating order this payment was changed. *(added v23.11)* - -If **status** is "pending": - - **message** (string, optional): Monitor status with listpays or waitsendpay. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "message": "Monitor status with listpays or waitsendpay", - "created_index": 1, - "id": 1, - "payment_hash": "f584c14bb23506acdd94cf3cea377f3cc5805f3cba5430bc3756ef83ede1a0dc", - "groupid": 1, - "amount_sent_msat": 1002, - "created_at": 1706315098, - "status": "pending" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- 202: an parseable onion - -the error details are decrypted and presented here, if *shared\_secrets* was provided and an error was returned by one of the intermediate nodes - -AUTHOR ------- - -Christian Decker <> is mainly responsible. - -SEE ALSO --------- - -lightning-createonion(7), lightning-sendpay(7), lightning-listsendpays(7) - -RESOURCES ---------- - -Main web site: - -[bolt04]: https://github.com/lightning/bolts/blob/master/04-onion-routing.md diff --git a/doc/lightning-sendonionmessage.7.md b/doc/lightning-sendonionmessage.7.md deleted file mode 100644 index af5fb7fc61af..000000000000 --- a/doc/lightning-sendonionmessage.7.md +++ /dev/null @@ -1,43 +0,0 @@ -lightning-sendonionmessage -- low-level command to send an onion message -======================================================================== - -SYNOPSIS --------- - -**(WARNING: experimental-onion-messages only)** - -**sendonionmessage** *first\_id* *blinding* *hops* - -DESCRIPTION ------------ - -The **sendonionmessage** RPC command can be used to send a message via the lightning network. These are currently used by *offers* to request and receive invoices. - -- **first\_id** (pubkey): The (presumably well-known) public key of the start of the path. -- **blinding** (pubkey): Blinding factor for this path. -- **hops** (array of objects): - : - - **node** (pubkey): Public key of the node. - - **tlv** (u8): Contains a hexadecimal TLV to include. - -RETURN VALUE ------------- - -On success, an empty object is returned. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-fetchinvoice(7), lightning-offer(7) - -RESOURCES ---------- - -Main web site: - -[bolt04]: https://github.com/lightning/bolts/blob/master/04-onion-routing.md diff --git a/doc/lightning-sendpay.7.md b/doc/lightning-sendpay.7.md deleted file mode 100644 index eb6306c00597..000000000000 --- a/doc/lightning-sendpay.7.md +++ /dev/null @@ -1,195 +0,0 @@ -lightning-sendpay -- Low-level command for sending a payment via a route -======================================================================== - -SYNOPSIS --------- - -**sendpay** *route* *payment\_hash* [*label*] [*amount\_msat*] [*bolt11*] [*payment\_secret*] [*partid*] [*localinvreqid*] [*groupid*] [*payment\_metadata*] [*description*] - -DESCRIPTION ------------ - -The **sendpay** RPC command attempts to send funds associated with the given *payment\_hash*, along a route to the final destination in the route. - -Generally, a client would call lightning-getroute(7) to resolve a route, then use **sendpay** to send it. If it fails, it would call lightning-getroute(7) again to retry. If the route is empty, a payment-to-self is attempted. - -The response will occur when the payment is on its way to the destination. The **sendpay** RPC command does not wait for definite success or definite failure of the payment (except for already-succeeded payments, or to-self payments). Instead, use the **waitsendpay** RPC command to poll or wait for definite success or definite failure. - -Once a payment has succeeded, calls to **sendpay** with the same *payment\_hash* but a different *amount\_msat* or destination will fail; this prevents accidental multiple payments. Calls to **sendpay** with the same *payment\_hash*, *amount\_msat*, and destination as a previous successful payment (even if a different route or *partid*) will return immediately with success. - -- **route** (array of objects): - - **id** (pubkey): The node at the end of this hop. - - **channel** (short\_channel\_id): The channel joining these nodes. - - **delay** (u32): The total CLTV expected by the node at the end of this hop. - - **amount\_msat** (msat): The amount expected by the node at the end of this hop. -- **payment\_hash** (hash): The hash of the payment\_preimage. -- **label** (string, optional): The label provided when creating the invoice\_request. -- **amount\_msat** (msat, optional): Amount must be provided if *partid* is non-zero, or the payment is to-self, otherwise it must be equal to the final amount to the destination. 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 default is in millisatoshi precision. -- **bolt11** (string, optional): Bolt11 invoice to pay. If provided, will be returned in *waitsendpay* and *listsendpays* results. -- **payment\_secret** (secret, optional): Value that the final recipient requires to accept the payment, as defined by the `payment_data` field in BOLT 4 and the `s` field in the BOLT 11 invoice format. It is required if *partid* is non-zero. -- **partid** (u64, optional): Must not be provided for self-payments. If provided and non-zero, allows for multiple parallel partial payments with the same *payment\_hash*. The *amount\_msat* amount (which must be provided) for each **sendpay** with matching *payment\_hash* must be equal, and **sendpay** will fail if there are differing values given. -- **localinvreqid** (hex, optional): Indicates that this payment is being made for a local invoice\_request. This ensures that we only send a payment for a single-use invoice\_request once. -- **groupid** (u64, optional): Allows you to attach a number which appears in **listsendpays** so payments can be identified as part of a logical group. The *pay* plugin uses this to identify one attempt at a MPP payment, for example. -- **payment\_metadata** (hex, optional): Placed in the final onion hop TLV. *(added v0.11.0)* -- **description** (string, optional): Description used in the invoice. *(added v0.11.0)* - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:sendpay#1", - "method": "sendpay", - "params": { - "route": [ - { - "amount_msat": 11000000, - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "delay": 5, - "channel": "103x1x0" - } - ], - "payment_hash": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "label": null, - "amount_msat": null, - "bolt11": "lnbcrt110u1pjmr5lzsp5sfjyj3xn7ux592k36hmmt4ax98n6lgct22wvj54yck0upcmep63qpp5qu436g855lr40ftdt7csatk5pdvtdzzfmfqluwtvm0fds95jsadqdpq0pzk7s6j8y69xjt6xe25j5j4g44hsatdxqyjw5qcqp99qxpqysgquwma3zrw4cd8e8j4u9uh4gxukaacckse64kx2l9dqv8rvrysdq5r5dt38t9snqj9u5ar07h2exr4fg56wpudkhkk7gtxlyt72ku5fpqqd4fnlk", - "payment_secret": "82644944d3f70d42aad1d5f7b5d7a629e7afa30b529cc952a4c59fc0e3790ea2", - "partid": null, - "groupid": null, - "payment_metadata": null - } -} -{ - "id": "example:sendpay#2", - "method": "sendpay", - "params": { - "route": [ - { - "id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "channel": "103x1x0", - "direction": 1, - "amount_msat": 4211, - "style": "tlv", - "delay": 24 - }, - { - "id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d", - "channel": "105x1x0", - "direction": 0, - "amount_msat": 3710, - "style": "tlv", - "delay": 16 - }, - { - "id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "channel": "107x1x0", - "direction": 1, - "amount_msat": 3210, - "style": "tlv", - "delay": 8 - } - ], - "payment_hash": "bc747053329402620a26bdc187cd134cdb699130d85be499ecd24160aff04c5c", - "label": null, - "amount_msat": null, - "bolt11": null, - "payment_secret": "c36a2fe9aced78c06960e2f21b369ed03f0492c97e53ba3b662163bcdaf1d7fa", - "partid": null, - "groupid": null, - "payment_metadata": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **created\_index** (u64): 1-based index indicating order this payment was created in. *(added v23.11)* -- **id** (u64): Old synonym for created\_index. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **status** (string) (one of "pending", "complete"): Status of the payment (could be complete if already sent previously). -- **created\_at** (u64): The UNIX timestamp showing when this payment was initiated. -- **amount\_sent\_msat** (msat): The amount sent. -- **updated\_index** (u64, optional): 1-based index indicating order this payment was changed (only present if it has changed since creation). *(added v23.11)* -- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment\_hash. -- **amount\_msat** (msat, optional): The amount delivered to destination (if known). -- **destination** (pubkey, optional): The final destination of the payment if known. -- **completed\_at** (u64, optional): The UNIX timestamp showing when this payment was completed. -- **label** (string, optional): The *label*, if given to sendpay. -- **partid** (u64, optional): The *partid*, if given to sendpay. -- **bolt11** (string, optional): The bolt11 string (if supplied). -- **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**. - -If **status** is "pending": - - **message** (string): Monitor status with listpays or waitsendpay. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "message": "Monitor status with listpays or waitsendpay", - "created_index": 1, - "id": 1, - "payment_hash": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "groupid": 1, - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount_msat": 11000000, - "amount_sent_msat": 11000000, - "created_at": 1706152930, - "status": "pending", - "bolt11": "lnbcrt110u1pjmr5lzsp5sfjyj3xn7ux592k36hmmt4ax98n6lgct22wvj54yck0upcmep63qpp5qu436g855lr40ftdt7csatk5pdvtdzzfmfqluwtvm0fds95jsadqdpq0pzk7s6j8y69xjt6xe25j5j4g44hsatdxqyjw5qcqp99qxpqysgquwma3zrw4cd8e8j4u9uh4gxukaacckse64kx2l9dqv8rvrysdq5r5dt38t9snqj9u5ar07h2exr4fg56wpudkhkk7gtxlyt72ku5fpqqd4fnlk" -} -{ - "message": "Monitor status with listpays or waitsendpay", - "created_index": 2, - "id": 2, - "payment_hash": "bc747053329402620a26bdc187cd134cdb699130d85be499ecd24160aff04c5c", - "groupid": 1, - "destination": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "amount_msat": 3210, - "amount_sent_msat": 4211, - "created_at": 1708624260, - "status": "pending" -} -``` - -ERRORS ------- - -On error, if the error occurred from a node other than the final destination, the route table will be updated so that lightning-getroute(7) should return an alternate route (if any). An error from the final destination implies the payment should not be retried. - -- -1: Catchall nonspecific error. -- 201: Already paid with this *hash* using different amount or destination. -- 202: Unparseable onion reply. The *data* field of the error will have an *onionreply* field, a hex string representation of the raw onion reply. -- 203: Permanent failure at destination. The *data* field of the error will be routing failure object. -- 204: Failure along route; retry a different route. The *data* field of the error will be routing failure object. -- 212: *localinvreqid* refers to an invalid, or used, local invoice\_request. - -A routing failure object has the fields below: - -*erring\_index*: The index of the node along the route that reported the error. 0 for the local node, 1 for the first hop, and so on. -*erring\_node*: The hex string of the pubkey id of the node that reported the error. -*erring\_channel*: The short channel ID of the channel that has the error, or *0:0:0* if the destination node raised the error. In addition *erring\_direction* will indicate which direction of the channel caused the failure. -*failcode*: The failure code, as per BOLT #4. -*channel\_update*: The hex string of the *channel\_update* message received from the remote node. Only present if error is from the remote node and the *failcode* has the UPDATE bit set, as per BOLT #4. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listinvoice(7), lightning-delinvoice(7), lightning-getroute(7), lightning-invoice(7), lightning-pay(7), lightning-waitsendpay(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-sendpsbt.7.md b/doc/lightning-sendpsbt.7.md deleted file mode 100644 index 60fb5726ad00..000000000000 --- a/doc/lightning-sendpsbt.7.md +++ /dev/null @@ -1,81 +0,0 @@ -lightning-sendpsbt -- Command to finalize, extract and send a partially signed bitcoin transaction (PSBT). -========================================================================================================== - -SYNOPSIS --------- - -**sendpsbt** *psbt* [*reserve*] - -DESCRIPTION ------------ - -The **sendpsbt** is a low-level RPC command which sends a fully-signed PSBT. - -- **psbt** (string): The fully signed psbt to be sent. -- **reserve** (u32, optional): Number of blocks to increase reservation of any of our inputs by. The default is 72. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:sendpsbt#1", - "method": "sendpsbt", - "params": { - "psbt": "some_psbt" - } -} -{ - "id": "example:sendpsbt#2", - "method": "sendpsbt", - "params": { - "psbt": "cHNidP8BAM0CAAAABEV+dnFRINmyeHxi4Id0OrcuzI5au5/BlPtTfu7E2m3EAAAAAAD9////cv8oioDx+0NCEnjBSYtnwF0H4VR13j+bkyb5gOOQLUUBAAAAAP3///8ehOrKm7JEq6zflkp9+zmSwE1iPe1yh3KTXvk+om/legEAAAAA/f///2s31wNrI1UavMgjC1GyrOHNbxOm68KYa13WX/mGfmjcAQAAAAD9////AcEAPQAAAAAAFgAUyQltQ/QI6lJgICYsza18hRa5KoEAAAAAAAEAcQIAAAABTzfqjIqV1wPpqc/3/Cb+tMX5EDrLmnhb5BMNx3aB/hYAAAAAAP3///8CQEIPAAAAAAAWABR9CNmX36nN45+GhjqvD4LjLMMMg/+juSkBAAAAFgAUJB0adsMdjkacZWrLwyteqfOaTrRlAAAAAQEfQEIPAAAAAAAWABR9CNmX36nN45+GhjqvD4LjLMMMgyICA1p5u7tAbUvCjfBfpqhzKM+wKn4TdDvs3NHfz+BxwuAQRzBEAiBwFb9rA0nUVlIPGd2aaiRbJ+KH4MLM3Bu+f0JuXB/hwAIgT2rrIUG9gXBZoH9fcPjCnbbM1SR4GiLYGLeALB8yENoBIgYDWnm7u0BtS8KN8F+mqHMoz7AqfhN0O+zc0d/P4HHC4BAIfQjZlwAAAAAAAQBxAgAAAAGANpEFI+CgfALTim/MWsAa62g+EmFWrFrzBDBCmCB3MgAAAAAA/f///wKZKdgpAQAAABYAFB+xhfU1pgl9WIvDKzAHZp8UeNkzQEIPAAAAAAAWABQHHEnK0vQg88gF+fa5ilcmnLFBUGUAAAABAR9AQg8AAAAAABYAFAccScrS9CDzyAX59rmKVyacsUFQIgICXTcoCCnxhsuZXNzL8jirRWQBOTlzUTljJKNldd803f9HMEQCIDtx/kEoc4PHDDm4eX5SEOmuRGu7ShpEG7xKBbuD/NjiAiBYkIKod39dcBarCT7Dbchkuwx70tJhOxQSJi2EMioGrwEiBgJdNygIKfGGy5lc3MvyOKtFZAE5OXNROWMko2V13zTd/wgHHEnKAAAAAAABAHECAAAAAVHU7RCZylzRMdlMBJ2ba4XKxv0l7LdWVnPYS6mhkf60AAAAAAD9////Av5VbSkBAAAAFgAU0BhRKzRbIC6H+s6j86d6cMpTNNhAQg8AAAAAABYAFD1D0ia8wnAZreUtej3FKnrBvii4ZQAAAAEBH0BCDwAAAAAAFgAUPUPSJrzCcBmt5S16PcUqesG+KLgiAgKKWZFo08l968cbxm5icOzwVPMA2Igwm6BUcaSCF13ZMEcwRAIgNAeIVGvUj9MWM18am0dx3JtEf79iQMX7Rqz1tttes3ICIAtNCglUlvpSidAxc/xoiy9cA13bgimJx25G+eZXfYJeASIGAopZkWjTyX3rxxvGbmJw7PBU8wDYiDCboFRxpIIXXdkwCD1D0iYAAAAAAAEAcQIAAAABRX52cVEg2bJ4fGLgh3Q6ty7Mjlq7n8GU+1N+7sTabcQBAAAAAP3///8CMmGqKQEAAAAWABSxLq0p9YAKl+hX7pFc0K/X+PIWmUBCDwAAAAAAFgAUZhwjt5DdNJE3OvCx2L7Qh31c3iJlAAAAAQEfQEIPAAAAAAAWABRmHCO3kN00kTc68LHYvtCHfVzeIiICA/qclQheQrHlADzR9BgXjDDJbkrneVTKD8SMWIJv9OsORzBEAiBKABqNV7cF5DKhtd+m+ZEmWF21vBt2uBKnzeDuUFqvDwIgJc6+/6GQqIfz869kJpUFTAMYTeL2qWR6d28EQEOJgkMBIgYD+pyVCF5CseUAPNH0GBeMMMluSud5VMoPxIxYgm/06w4IZhwjtwAAAAAAAA==", - "reserve": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **tx** (hex): The raw transaction which was sent. -- **txid** (txid): The txid of the **tx**. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "txid": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0", - "tx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000" -} -{ - "tx": "02000000000104457e76715120d9b2787c62e087743ab72ecc8e5abb9fc194fb537eeec4da6dc40000000000fdffffff72ff288a80f1fb43421278c1498b67c05d07e15475de3f9b9326f980e3902d450100000000fdffffff1e84eaca9bb244abacdf964a7dfb3992c04d623ded728772935ef93ea26fe57a0100000000fdffffff6b37d7036b23551abcc8230b51b2ace1cd6f13a6ebc2986b5dd65ff9867e68dc0100000000fdffffff01c1003d0000000000160014c9096d43f408ea526020262ccdad7c8516b92a810247304402207015bf6b0349d456520f19dd9a6a245b27e287e0c2ccdc1bbe7f426e5c1fe1c002204f6aeb2141bd817059a07f5f70f8c29db6ccd524781a22d818b7802c1f3210da0121035a79bbbb406d4bc28df05fa6a87328cfb02a7e13743becdcd1dfcfe071c2e0100247304402203b71fe41287383c70c39b8797e5210e9ae446bbb4a1a441bbc4a05bb83fcd8e20220589082a8777f5d7016ab093ec36dc864bb0c7bd2d2613b1412262d84322a06af0121025d37280829f186cb995cdccbf238ab45640139397351396324a36575df34ddff024730440220340788546bd48fd316335f1a9b4771dc9b447fbf6240c5fb46acf5b6db5eb37202200b4d0a095496fa5289d03173fc688b2f5c035ddb822989c76e46f9e6577d825e0121028a599168d3c97debc71bc66e6270ecf054f300d888309ba05471a482175dd9300247304402204a001a8d57b705e432a1b5dfa6f99126585db5bc1b76b812a7cde0ee505aaf0f022025cebeffa190a887f3f3af642695054c03184de2f6a9647a776f044043898243012103fa9c95085e42b1e5003cd1f418178c30c96e4ae77954ca0fc48c58826ff4eb0e00000000", - "txid": "43bb1c1bce6763ffe4d5df6b49f152f907f36f7849e55bb56075e2b256d17502" -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters or some error happened during the command process. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -SEE ALSO --------- - -lightning-fundpsbt(7), lightning-signpsbt(7), lightning-listtransactions(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-setchannel.7.md b/doc/lightning-setchannel.7.md deleted file mode 100644 index 78acb95c4bab..000000000000 --- a/doc/lightning-setchannel.7.md +++ /dev/null @@ -1,128 +0,0 @@ -lightning-setchannel -- Command for configuring fees / htlc range advertized for a channel -========================================================================================== - -SYNOPSIS --------- - -**setchannel** *id* [*feebase*] [*feeppm*] [*htlcmin*] [*htlcmax*] [*enforcedelay*] [*ignorefeelimits*] - -DESCRIPTION ------------ - -The **setchannel** RPC command sets channel specific routing fees, and `htlc_minimum_msat` or `htlc_maximum_msat` as defined in BOLT #7. The channel has to be in normal or awaiting state. This can be checked by **listpeers** reporting a *state* of CHANNELD\_NORMAL or CHANNELD\_AWAITING\_LOCKIN for the channel. - -These changes (for a public channel) will be broadcast to the rest of the network (though many nodes limit the rate of such changes they will accept: we allow 2 a day, with a few extra occasionally). - -- **id** (string): Should contain a scid (short channel ID), channel id or peerid (pubkey) of the channel to be modified. If *id* is set to `all`, the updates are applied to all channels in states CHANNELD\_NORMAL CHANNELD\_AWAITING\_LOCKIN or DUALOPEND\_AWAITING\_LOCKIN. If *id* is a peerid, all channels with the +peer in those states are changed. -- **feebase** (msat, optional): Value in millisatoshi that is added as base fee to any routed payment: if omitted, it is unchanged. 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*. -- **feeppm** (u32, optional): Value that is added proportionally per-millionths to any routed payment volume in satoshi. For example, if ppm is 1,000 and 1,000,000 satoshi is being routed through the channel, an proportional fee of 1,000 satoshi is added, resulting in a 0.1% fee. -- **htlcmin** (msat, optional): Value that limits how small an HTLC we will forward: if omitted, it is unchanged. 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*. Note that the peer also enforces a minimum for the channel: setting it below that will simply set it to that value with a warning. Also note that *htlcmin* only applies to forwarded HTLCs: we can still send smaller payments ourselves. The default is no lower limit. -- **htlcmax** (msat, optional): Value that limits how large an HTLC we will forward: if omitted, it is unchanged. 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*. Note that *htlcmax* only applies to forwarded HTLCs: we can still send larger payments ourselves. The default is no effective limit. -- **enforcedelay** (u32, optional): Number of seconds to delay before enforcing the new fees/htlc max. This gives the network a chance to catch up with the new rates and avoids rejecting HTLCs before they do. This only has an effect if rates are increased (we always allow users to overpay fees) or *htlcmax* is decreased, and only applied to a single rate increase per channel (we don't remember an arbitrary number of prior feerates) and if the node is restarted the updated configuration is enforced immediately. The default is 600, which is ten minutes. -- **ignorefeelimits** (boolean, optional): If set to True means to allow the peer to set the commitment transaction fees (or closing transaction fees) to any value they want. This is dangerous: they could set an exorbitant fee (so HTLCs are unenforcable), or a tiny fee (so that commitment transactions cannot be relayed), but avoids channel breakage in case of feerate disagreements. (Note: the global `ignore_fee_limits` setting overrides this). *(added v23.08)* - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:setchannel#1", - "method": "setchannel", - "params": { - "id": "103x1x0", - "feebase": null, - "feeppm": null, - "htlcmin": null, - "htlcmax": null, - "enforcedelay": null, - "ignorefeelimits": true - } -} -{ - "id": "example:setchannel#2", - "method": "setchannel", - "params": { - "id": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199", - "feebase": 4000, - "feeppm": 300, - "htlcmin": null, - "htlcmax": null, - "enforcedelay": 0, - "ignorefeelimits": null - } -} -``` - -RETURN VALUE ------------- - -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** (hash): The channel\_id of the channel. -- **fee\_base\_msat** (msat): The resulting feebase (this is the BOLT #7 name). -- **fee\_proportional\_millionths** (u32): The resulting feeppm (this is the BOLT #7 name). -- **ignore\_fee\_limits** (boolean): If we are now allowing peer to set feerate on commitment transaction without restriction. *(added v23.08)* -- **minimum\_htlc\_out\_msat** (msat): The resulting htlcmin we will advertize (the BOLT #7 name is htlc\_minimum\_msat). -- **maximum\_htlc\_out\_msat** (msat): The resulting htlcmax we will advertize (the BOLT #7 name is htlc\_maximum\_msat). -- **short\_channel\_id** (short\_channel\_id, optional): The short\_channel\_id (if locked in). -- the following warnings are possible: - - **warning\_htlcmin\_too\_low**: The requested htlcmin was too low for this peer, so we set it to the minimum they will allow. - - **warning\_htlcmax\_too\_high**: The requested htlcmax was greater than the channel capacity, so we set it to the channel capacity. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "channels": [ - { - "peer_id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518", - "channel_id": "90210d39d12a65d239ece267c5f48e0a82e7cb95724e658f6d99f370064faad1", - "short_channel_id": "103x1x0", - "fee_base_msat": 1, - "fee_proportional_millionths": 10, - "minimum_htlc_out_msat": 0, - "maximum_htlc_out_msat": 990000000, - "ignore_fee_limits": true - } - ] -} -{ - "channels": [ - { - "peer_id": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199", - "channel_id": "9c54c71bbbe59591cc3162e14fc4ff58c146f085c07d0f206ea679a8231d03ab", - "short_channel_id": "103x3x0", - "fee_base_msat": 4000, - "fee_proportional_millionths": 300, - "minimum_htlc_out_msat": 0, - "maximum_htlc_out_msat": 990000000, - "ignore_fee_limits": false - } - ] -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Channel is in incorrect state, i.e. Catchall nonspecific error. -- -32602: JSONRPC2\_INVALID\_PARAMS, i.e. Given id is not a channel ID or short channel ID. - -AUTHOR ------- - -Michael Schmoock <> is the author of this feature. - -SEE ALSO --------- - -lightningd-config(5), lightning-fundchannel(7), lightning-listchannels(7), lightning-listpeers(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-setconfig.7.md b/doc/lightning-setconfig.7.md deleted file mode 100644 index bfda1701e0c0..000000000000 --- a/doc/lightning-setconfig.7.md +++ /dev/null @@ -1,123 +0,0 @@ -lightning-setconfig -- Dynamically change some config options -============================================================= - -SYNOPSIS --------- - -**setconfig** *config* [*val*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -The **setconfig** RPC command allows you set the (dynamic) configuration option named by `config`: options which take a value (as separate from simple flag options) also need a `val` parameter. - -This new value will *also* be written at the end of the config file, for persistence across restarts (and any old value commented out). - -You can see what options are dynamically adjustable using lightning- listconfigs(7). Note that you can also adjust existing options for stopped plugins; they will have an effect when the plugin is restarted. - -- **config** (string): Name of the config variable which should be set to the value of the variable. -- **val** (one of, optional): Value of the config variable to be set or updated.: - - (string) - - (integer) - - (boolean) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:setconfig#1", - "method": "setconfig", - "params": [ - "autoclean-paidinvoices-age", - 1 - ] -} -{ - "id": "example:setconfig#2", - "method": "setconfig", - "params": [ - "test-dynamic-config", - "changed" - ] -} -{ - "id": "example:setconfig#3", - "method": "setconfig", - "params": { - "config": "min-capacity-sat", - "val": 500000 - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **config** is returned. It is an object containing: - -- **config** (string): Name of the config variable which was set. -- **source** (string): Source of configuration setting (`file`:`linenum`). -- **dynamic** (boolean) (always *true*): Whether this option is settable via setconfig. -- **plugin** (string, optional): The plugin this configuration setting is for. -- **set** (boolean, optional): For simple flag options. -- **value\_str** (string, optional): For string options. -- **value\_msat** (msat, optional): For msat options. -- **value\_int** (integer, optional): For integer options. -- **value\_bool** (boolean, optional): For boolean options. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "config": { - "config": "autoclean-paidinvoices-age", - "value_int": 1, - "source": "/tmp/ltests-7u_8_rtu/test_autoclean_1/lightning-3/regtest/config:6", - "plugin": "~/lightning/plugins/autoclean", - "dynamic": true - } -} -{ - "config": { - "config": "test-dynamic-config", - "value_str": "changed", - "source": "/tmp/ltests-7u_8_rtu/test_dynamic_option_python_plugin_1/lightning-1/regtest/config:2", - "plugin": "~/lightning/tests/plugins/dynamic_option.py", - "dynamic": true - } -} -{ - "config": { - "config": "min-capacity-sat", - "value_int": 500000, - "source": "/tmp/ltests-nvfdbou2/test_setconfig_1/lightning-2/regtest/config:2", - "dynamic": true - } -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -32602: JSONRPC2\_INVALID\_PARAMS, i.e. the parameter is not dynamic, or the val was invalid. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible for this feature. - -SEE ALSO --------- - -lightningd-config(5), lightning-listconfigs(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-setpsbtversion.7.md b/doc/lightning-setpsbtversion.7.md deleted file mode 100644 index 653aa4987206..000000000000 --- a/doc/lightning-setpsbtversion.7.md +++ /dev/null @@ -1,78 +0,0 @@ -lightning-setpsbtversion -- Command for setting PSBT version -============================================================ - -SYNOPSIS --------- - -**setpsbtversion** *psbt* *version* - -DESCRIPTION ------------ - -The **setpsbtversion** RPC command converts the provided PSBT to the given version, and returns the base64 result of the conversion. Returns an error if version is invalid. - -- **psbt** (string): The PSBT to change versions. -- **version** (u32): The version to set. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:setpsbtversion#1", - "method": "setpsbtversion", - "params": { - "psbt": "cHNidP8BAAoCAAAAAAAAAAAAAA==", - "version": "2" - } -} -{ - "id": "example:setpsbtversion#2", - "method": "setpsbtversion", - "params": [ - "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIQEIPAAAAAAABBCJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4uAA==", - 0 - ] -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **psbt** (string): A converted PSBT of the requested version. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "psbt": "cHNidP8BAgQCAAAAAQQBAAEFAQABBgEDAfsEAgAAAAA=" -} -{ - "psbt": "cHNidP8BADUCAAAAAAFAQg8AAAAAACJRIJd6ICNAQALFOMhoUHuSVSuzcaUdkDKlk4K+A+DR9+4ubwAAAAAA" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -32602: Parameter missed or malformed. - -AUTHOR ------- - -Gregory Sanders <> is mainly responsible. - -SEE ALSO --------- - -lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-signpsbt(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-showrunes.7.md b/doc/lightning-showrunes.7.md deleted file mode 100644 index bc1bf3208c1b..000000000000 --- a/doc/lightning-showrunes.7.md +++ /dev/null @@ -1,131 +0,0 @@ -lightning-showrunes -- Command to list previously generated runes -================================================================= - -SYNOPSIS --------- - -**showrunes** [*rune*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -The **showrunes** RPC command either lists runes that we stored as we generate them (see lightning-createrune(7)) or decodes the rune given on the command line. - -- **rune** (string, optional): If specified, only details of that rune will be returned. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:showrunes#1", - "method": "showrunes", - "params": "{}" -} -{ - "id": "example:showrunes#2", - "method": "showrunes", - "params": { - "rune": "Bl0V_vkVkGr4h356JbCMCcoDyyKE8djkoQ2156iPB509MCZwZXI9MTAwMDAwMDAwMG5zZWM=" - } -} -``` - -RETURN VALUE ------------- - -On success, an object containing **runes** is returned. It is an array of objects, where each object contains: - -- **rune** (string): Base64 encoded rune. -- **unique\_id** (string): Unique id assigned when the rune was generated; this is always a u64 for commando runes. -- **restrictions** (array of objects): The restrictions on what commands this rune can authorize.: - - **alternatives** (array of objects): - - **fieldname** (string): The field this restriction applies to; see commando-rune(7). - - **value** (string): The value accepted for this field. - - **condition** (string): The way to compare fieldname and value. - - **english** (string): English readable description of this alternative. - - **english** (string): English readable summary of alternatives above. -- **restrictions\_as\_english** (string): English readable description of the restrictions array above. -- **stored** (boolean, optional) (always *false*): This is false if the rune does not appear in our datastore (only possible when `rune` is specified). -- **blacklisted** (boolean, optional) (always *true*): The rune has been blacklisted; see commando-blacklist(7). -- **last\_used** (number, optional): The last time this rune was successfully used. *(added 23.11)* -- **our\_rune** (boolean, optional) (always *false*): This is not a rune for this node (only possible when `rune` is specified). - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "runes": [ - { - "rune": "OSqc7ixY6F-gjcigBfxtzKUI54uzgFSA6YfBQoWGDV89MA==", - "unique_id": "0", - "restrictions": [], - "restrictions_as_english": "" - }, - { - "rune": "geZmO6U7yqpHn-moaX93FVMVWrDRfSNY4AXx9ypLcqg9MQ==", - "unique_id": "1", - "restrictions": [], - "restrictions_as_english": "" - }, - { - "rune": "Bl0V_vkVkGr4h356JbCMCcoDyyKE8djkoQ2156iPB509MCZwZXI9MTAwMDAwMDAwMG5zZWM=", - "unique_id": "2", - "restrictions": [ - { - "alternatives": [ - { - "fieldname": "per", - "value": "1000000000nsec", - "condition": "=", - "english": "per equal to 1000000000nsec" - } - ], - "english": "per equal to 1000000000nsec" - } - ], - "restrictions_as_english": "per equal to 1000000000nsec" - } - ] -} -{ - "runes": [ - { - "rune": "Bl0V_vkVkGr4h356JbCMCcoDyyKE8djkoQ2156iPB509MCZwZXI9MTAwMDAwMDAwMG5zZWM=", - "unique_id": "2", - "restrictions": [ - { - "alternatives": [ - { - "fieldname": "per", - "value": "1000000000nsec", - "condition": "=", - "english": "per equal to 1000000000nsec" - } - ], - "english": "per equal to 1000000000nsec" - } - ], - "restrictions_as_english": "per equal to 1000000000nsec" - } - ] -} -``` - -AUTHOR ------- - -Shahana Farooqui <> is mainly responsible. - -SEE ALSO --------- - -lightning-commando-showrunes(7), lightning-blacklistrune(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-signinvoice.7.md b/doc/lightning-signinvoice.7.md deleted file mode 100644 index 54e57547fb91..000000000000 --- a/doc/lightning-signinvoice.7.md +++ /dev/null @@ -1,67 +0,0 @@ -lightning-signinvoice -- Low-level invoice signing -================================================== - -SYNOPSIS --------- - -**signinvoice** *invstring* - -DESCRIPTION ------------ - -Command *added* in v23.02. - -The **signinvoice** RPC command signs an invoice. Unlike **createinvoice** it does not save the invoice into the database and thus does not require the preimage. - -- **invstring** (string): Bolt11 form, but the final signature is ignored. Minimal sanity checks are done. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:signinvoice#1", - "method": "signinvoice", - "params": [ - "lnbcrt10n1pjmxt3lsp5jumuz2sv3ca68kzd92hp3wdtpx8ghnxur65fs6maw6dyxsleqd0spp5nadvvh7uzk2qzh8d9d7tsxr08l9uaz2vjeuuahqtufjv52d0eassdq8d9h8vvgxqyjw5qcqp99qxpqysgq4rrn702eum6c9ld9khlz39vdyd8zcwrav5ygqvu6w54aep6yarkyfrnk990yf5prpasgzmj52stektf6mzwdl5hc6qlsglt2a0pwp0spwww44w" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **bolt11** (string): The bolt11 string. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "bolt11": "lnbcrt10n1pjmxt3lsp5jumuz2sv3ca68kzd92hp3wdtpx8ghnxur65fs6maw6dyxsleqd0spp5nadvvh7uzk2qzh8d9d7tsxr08l9uaz2vjeuuahqtufjv52d0eassdq8d9h8vvgxqyjw5qcqp99qxpqysgq3nhrd72qe7wmc2hvwhaqnx05y6dzxh2tal02kw055er7uutkkrcreccm37ce6wv7ee8q70ktlr9fy3fd635hc2k98a4svd9c8v4cpjsppm2eee" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: Catchall nonspecific error. - -AUTHOR ------- - -Carl Dong <> is mainly responsible. - -SEE ALSO --------- - -lightning-createinvoice(7), lightning-invoice(7), lightning-listinvoices(7), lightning-delinvoice(7), lightning-getroute(7), lightning-sendpay(7), lightning-offer(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-signmessage.7.md b/doc/lightning-signmessage.7.md deleted file mode 100644 index af5835083035..000000000000 --- a/doc/lightning-signmessage.7.md +++ /dev/null @@ -1,76 +0,0 @@ -lightning-signmessage -- Command to create a signature from this node -===================================================================== - -SYNOPSIS --------- - -**signmessage** *message* - -DESCRIPTION ------------ - -The **signmessage** RPC command creates a digital signature of *message* using this node's secret key. A receiver who knows your node's *id* and the *message* can be sure that the resulting signature could only be created by something with access to this node's secret key. - -- **message** (string): Less than 65536 characters long message to be signed by the node. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:signmessage#1", - "method": "signmessage", - "params": { - "message": "this is a test!" - } -} -{ - "id": "example:signmessage#2", - "method": "signmessage", - "params": { - "message": "message for you" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **signature** (hex) (always 128 characters): The signature. -- **recid** (hex) (always 2 characters): The recovery id (0, 1, 2 or 3). -- **zbase** (string): *signature* and *recid* encoded in a style compatible with **lnd**'s [SignMessageRequest](https://api.lightning.community/#grpc-request- signmessagerequest). - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "signature": "a2ec227012795f9d6b80a3f5ea98374c6d2886917517c05336799923fcf37caf08344c0431275e1a8189da01b444ae978007fe70f0cc9009f38cabe074ade87d", - "recid": "00", - "zbase": "d6tqaeuonjhi98mmont9m4wag7gg4krg1f4txonug3h31e9h6p6k6nbwjondnj46dkyausobstnk7fhyy998bhgc1yr98dfmhb4k54d7" -} -{ - "signature": "85843b010bc517b32eaafe70232e2c44bb5a354c74d2202390af1b272e4c6ac23ac3f97ea663d8b49116ad6c2d080515b43bcdf1ea4f38cdb18af0edf8209cd8", - "recid": "00", - "zbase": "d6naeqabbxntxc3qim98ye3qftnmsstijt4prebd1nztsj3qjticrqsd9f9kca6as1etpmmcfwrykfpw8xg9d41x8dg5dnzo7zhnb8ga" -} -``` - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-checkmessage(7) - -RESOURCES ---------- - -Main web site: - -[SignMessageRequest](https://api.lightning.community/#grpc-request-signmessagerequest) diff --git a/doc/lightning-signpsbt.7.md b/doc/lightning-signpsbt.7.md deleted file mode 100644 index e55b4da29973..000000000000 --- a/doc/lightning-signpsbt.7.md +++ /dev/null @@ -1,86 +0,0 @@ -lightning-signpsbt -- Command to sign a wallet's inputs on a provided bitcoin transaction (PSBT). -================================================================================================= - -SYNOPSIS --------- - -**signpsbt** *psbt* [*signonly*] - -DESCRIPTION ------------ - -**signpsbt** is a low-level RPC command which signs a PSBT as defined by BIP-174. - -By default, all known inputs are signed, and others ignored: with *signonly*, only those inputs are signed, and an error is returned if one of them cannot be signed. - -Note that the command will fail if there are no inputs to sign, or if the inputs to be signed were not previously reserved. - -- **psbt** (string): The psbt to be signed. -- **signonly** (array of u32s, optional): Input numbers to sign.: - - (u32, optional) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:signpsbt#1", - "method": "signpsbt", - "params": { - "psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQIBBQECAQYBAwH7BAIAAAAAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQEOIFZ3chw1pCSiPW3MfJCQNuUFrmhlDgnVlzO0t+cwA6TcAQ8EAAAAAAEQBAAAAAAM/AlsaWdodG5pbmcBCCvyYqqdIt0mAAEA9gIAAAAAAQGLpTM0gWEqICjgcZNyoPhzdB5fNZBrEFbsNpsKHrTd9wEAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIBZa5i8jVPdfV4pbIzSebMb5RN+l5lJkQKAw9+ivAWfnAiBNhehz79143DbFOoTjmPYVErlY0FLlVqojX9wat0aKXgEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPGAAAAAEBKwEvDwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oBDiBWd3IcNaQkoj1tzHyQkDblBa5oZQ4J1ZcztLfnMAOk3AEPBAEAAAABEAT9////DPwJbGlnaHRuaW5nAQg5j4QWOQoUFAABAwhOfA0AAAAAAAEEIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4M/AlsaWdodG5pbmcBCMbeD+3qn9/kAAEDCODIEAAAAAAAAQQiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQz8CWxpZ2h0bmluZwEI4upB+mjl6AIA", - "signonly": null - } -} -{ - "id": "example:signpsbt#2", - "method": "signpsbt", - "params": { - "psbt": "cHNidP8BAP1xAQIAAAAIFTef27H2GAJBzP4UZMeDePsDVkglO47/q4jqK18ibCYAAAAAAP3///+axwap6WKnEHvLjIJZX0ZeJ87cs7PKkXBfwvbGVmjpTQEAAAAA/f///wQ1cVzb9NR7nXadyRuhQBv+2iqhZkhvUA+sPo5z/SsSAQAAAAD9////lXQ788meUtSxhBX13mx2XhyM3Ddo30QtmNW0YuE2TDABAAAAAP3///8Kr4BwElAScx3bA5ZdavrHwh4Zh+rFNvkE/+7gu1WbngEAAAAA/f///3Uei7j3k/b5tnjFGvNZhe2iWz8O6FQjTEpM5XIoduNsAQAAAAD9////fm5Om4MojcnfZiTmrwb4b5Byw9emrjITi/nkEqTK9MsBAAAAAP3///8lwdpZqt3ILPRwhINY4PGvkg2CSw7agcMPSuFoHDDkIQAAAAAA/f///wGCAXoAAAAAABYAFMkJbUP0COpSYCAmLM2tfIUWuSqBAAAAAAABAHECAAAAAZVxzFxyEg7tiQTgRHwGleR8Srxw6taAGOoEpJK/Xj5sAAAAAAD9////AkBCDwAAAAAAFgAUKvGgVL/ThjWE/P1oORVXh/ObucYzr/YpAQAAABYAFKmkod5S53U4m5tKFApyeC35UbnbZwAAAAEBH0BCDwAAAAAAFgAUKvGgVL/ThjWE/P1oORVXh/ObucYAAQBxAgAAAAEVN5/bsfYYAkHM/hRkx4N4+wNWSCU7jv+riOorXyJsJgEAAAAA/f///wJmbOcpAQAAABYAFCCSJBD9wY/VwxnBcnFiu1tA6CGTQEIPAAAAAAAWABSjI8KCqaGX/BGOwJza8hyiuxuIcmcAAAABAR9AQg8AAAAAABYAFKMjwoKpoZf8EY7AnNryHKK7G4hyAAEAcQIAAAAB98EwKZMOHiyRYWyToae6Kce3gCwqUvnVXXHlB/ps9ocBAAAAAP3///8CmNuLKQEAAAAWABQ4roxw+phYHelaRr71DYB3FEy/30BCDwAAAAAAFgAUwSDtQiY7PVvBc7ww56Y72YIQdjllAAAAAQEfQEIPAAAAAAAWABTBIO1CJjs9W8FzvDDnpjvZghB2OQABAHECAAAAAZH/SvCXvDW7b8qb55CDC4M+jgZ61H/e8rZnAGaXp+Z+AAAAAAD9////Apkp2CkBAAAAFgAUc/Y+sIq3oYyEe40GkKJsXawkzwFAQg8AAAAAABYAFLdt1h5Bte8FKvIc2jJgiIwHC7mvZwAAAAEBH0BCDwAAAAAAFgAUt23WHkG17wUq8hzaMmCIjAcLua8AAQBxAgAAAAETC3wMCv9qK3lvVkVJu9b/v2VgMepZtnfngMp2xMXRnwAAAAAA/f///wJk0E4pAQAAABYAFEIsc4cBl+BTN33Kn80+YYfkMt+cQEIPAAAAAAAWABT2/7RIxKohhGbacpBz0BZNYcnfsGUAAAABAR9AQg8AAAAAABYAFPb/tEjEqiGEZtpykHPQFk1hyd+wAAEAcQIAAAABA8J/OnC+cuH79Z6wZmzwdAjhBDaPHavh3yvhr4odDXQBAAAAAP3///8CykowKQEAAAAWABTVHuO8cKOOX/JlmMU66on6Uc54mkBCDwAAAAAAFgAUunZMZryWMqCTiMuVWNF/cleg6dVnAAAAAQEfQEIPAAAAAAAWABS6dkxmvJYyoJOIy5VY0X9yV6Dp1QABAHECAAAAAfRxBaZZ3FfDGwxhZQLYCurN+7kJj0x6nzChg434dnjRAAAAAAD9////AszmyCkBAAAAFgAULSqRp54barF/7R9XOmsLDCVWdAFAQg8AAAAAABYAFNa5adNt/9rZhpGT9mPuSA39xzSIZQAAAAEBH0BCDwAAAAAAFgAU1rlp023/2tmGkZP2Y+5IDf3HNIgAAQBxAgAAAAEgk1JYyP4oIoPoYYcTPPDvZynVfXWINJnBEFBsLv0MtAAAAAAA/f///wJAQg8AAAAAABYAFGYcI7eQ3TSRNzrwsdi+0Id9XN4iMmGqKQEAAAAWABT5XKNwVIFsUKh26sqHFSlOLq5TFGUAAAABAR9AQg8AAAAAABYAFGYcI7eQ3TSRNzrwsdi+0Id9XN4iAAA=", - "signonly": [ - 7 - ] - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **signed\_psbt** (string): The fully signed PSBT. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "signed_psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQIBBQECAQYBAwH7BAIAAAAAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQEOIFZ3chw1pCSiPW3MfJCQNuUFrmhlDgnVlzO0t+cwA6TcAQ8EAAAAAAEQBAAAAAAM/AlsaWdodG5pbmcBCCvyYqqdIt0mAAEA9gIAAAAAAQGLpTM0gWEqICjgcZNyoPhzdB5fNZBrEFbsNpsKHrTd9wEAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIBZa5i8jVPdfV4pbIzSebMb5RN+l5lJkQKAw9+ivAWfnAiBNhehz79143DbFOoTjmPYVErlY0FLlVqojX9wat0aKXgEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPGAAAAAEBKwEvDwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oBDiBWd3IcNaQkoj1tzHyQkDblBa5oZQ4J1ZcztLfnMAOk3AEPBAEAAAABEAT9////ARNACI9TcWG+6uC9ElBFN3qhND7amsor/dtBhJ5ujEQAT/80548avrt7d7IJiOAaCNzzYLSXITdL2xjx6mhbBi9hTiEWkUUygSpECk12bHHNORk2lKNArhHgEuW6Gtnvum52ylMJAMLMqxcAAAAADPwJbGlnaHRuaW5nAQg5j4QWOQoUFAABAwhOfA0AAAAAAAEEIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4hB7nAxoROEqUxyWjlXFUHjsFtm/dr6SkP2H0cynK0g5oXCQDWuWnTBAAAAAz8CWxpZ2h0bmluZwEIxt4P7eqf3+QAAQMI4MgQAAAAAAABBCIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNDPwJbGlnaHRuaW5nAQji6kH6aOXoAgA=" -} -{ - "signed_psbt": "cHNidP8BAP1xAQIAAAAIFTef27H2GAJBzP4UZMeDePsDVkglO47/q4jqK18ibCYAAAAAAP3///+axwap6WKnEHvLjIJZX0ZeJ87cs7PKkXBfwvbGVmjpTQEAAAAA/f///wQ1cVzb9NR7nXadyRuhQBv+2iqhZkhvUA+sPo5z/SsSAQAAAAD9////lXQ788meUtSxhBX13mx2XhyM3Ddo30QtmNW0YuE2TDABAAAAAP3///8Kr4BwElAScx3bA5ZdavrHwh4Zh+rFNvkE/+7gu1WbngEAAAAA/f///3Uei7j3k/b5tnjFGvNZhe2iWz8O6FQjTEpM5XIoduNsAQAAAAD9////fm5Om4MojcnfZiTmrwb4b5Byw9emrjITi/nkEqTK9MsBAAAAAP3///8lwdpZqt3ILPRwhINY4PGvkg2CSw7agcMPSuFoHDDkIQAAAAAA/f///wGCAXoAAAAAABYAFMkJbUP0COpSYCAmLM2tfIUWuSqBAAAAAAABAHECAAAAAZVxzFxyEg7tiQTgRHwGleR8Srxw6taAGOoEpJK/Xj5sAAAAAAD9////AkBCDwAAAAAAFgAUKvGgVL/ThjWE/P1oORVXh/ObucYzr/YpAQAAABYAFKmkod5S53U4m5tKFApyeC35UbnbZwAAAAEBH0BCDwAAAAAAFgAUKvGgVL/ThjWE/P1oORVXh/ObucYAAQBxAgAAAAEVN5/bsfYYAkHM/hRkx4N4+wNWSCU7jv+riOorXyJsJgEAAAAA/f///wJmbOcpAQAAABYAFCCSJBD9wY/VwxnBcnFiu1tA6CGTQEIPAAAAAAAWABSjI8KCqaGX/BGOwJza8hyiuxuIcmcAAAABAR9AQg8AAAAAABYAFKMjwoKpoZf8EY7AnNryHKK7G4hyAAEAcQIAAAAB98EwKZMOHiyRYWyToae6Kce3gCwqUvnVXXHlB/ps9ocBAAAAAP3///8CmNuLKQEAAAAWABQ4roxw+phYHelaRr71DYB3FEy/30BCDwAAAAAAFgAUwSDtQiY7PVvBc7ww56Y72YIQdjllAAAAAQEfQEIPAAAAAAAWABTBIO1CJjs9W8FzvDDnpjvZghB2OQABAHECAAAAAZH/SvCXvDW7b8qb55CDC4M+jgZ61H/e8rZnAGaXp+Z+AAAAAAD9////Apkp2CkBAAAAFgAUc/Y+sIq3oYyEe40GkKJsXawkzwFAQg8AAAAAABYAFLdt1h5Bte8FKvIc2jJgiIwHC7mvZwAAAAEBH0BCDwAAAAAAFgAUt23WHkG17wUq8hzaMmCIjAcLua8AAQBxAgAAAAETC3wMCv9qK3lvVkVJu9b/v2VgMepZtnfngMp2xMXRnwAAAAAA/f///wJk0E4pAQAAABYAFEIsc4cBl+BTN33Kn80+YYfkMt+cQEIPAAAAAAAWABT2/7RIxKohhGbacpBz0BZNYcnfsGUAAAABAR9AQg8AAAAAABYAFPb/tEjEqiGEZtpykHPQFk1hyd+wAAEAcQIAAAABA8J/OnC+cuH79Z6wZmzwdAjhBDaPHavh3yvhr4odDXQBAAAAAP3///8CykowKQEAAAAWABTVHuO8cKOOX/JlmMU66on6Uc54mkBCDwAAAAAAFgAUunZMZryWMqCTiMuVWNF/cleg6dVnAAAAAQEfQEIPAAAAAAAWABS6dkxmvJYyoJOIy5VY0X9yV6Dp1QABAHECAAAAAfRxBaZZ3FfDGwxhZQLYCurN+7kJj0x6nzChg434dnjRAAAAAAD9////AszmyCkBAAAAFgAULSqRp54barF/7R9XOmsLDCVWdAFAQg8AAAAAABYAFNa5adNt/9rZhpGT9mPuSA39xzSIZQAAAAEBH0BCDwAAAAAAFgAU1rlp023/2tmGkZP2Y+5IDf3HNIgAAQBxAgAAAAEgk1JYyP4oIoPoYYcTPPDvZynVfXWINJnBEFBsLv0MtAAAAAAA/f///wJAQg8AAAAAABYAFGYcI7eQ3TSRNzrwsdi+0Id9XN4iMmGqKQEAAAAWABT5XKNwVIFsUKh26sqHFSlOLq5TFGUAAAABAR9AQg8AAAAAABYAFGYcI7eQ3TSRNzrwsdi+0Id9XN4iIgID+pyVCF5CseUAPNH0GBeMMMluSud5VMoPxIxYgm/06w5HMEQCIG90DSr+fGNoWhCrgLbJG3Wt8PJNMWYqaa5MLWRwA0oTAiA9rsLEqqVhjV6wENfzzpudaE949uLlVqWgDjE/FSgKNAEiBgP6nJUIXkKx5QA80fQYF4wwyW5K53lUyg/EjFiCb/TrDghmHCO3AAAAAAAA" -} -``` - -ERRORS ------- - -On failure, one of the following error codes may be returned: - -- -32602: Error in given parameters, or there aren't wallet's inputs to sign, or we couldn't sign all of *signonly*, or inputs are not reserved. - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -SEE ALSO --------- - -lightning-fundpsbt(7), lightning-sendpsbt(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-splice_init.7.md b/doc/lightning-splice_init.7.md deleted file mode 100644 index 5dc42f00b1c9..000000000000 --- a/doc/lightning-splice_init.7.md +++ /dev/null @@ -1,133 +0,0 @@ -lightning-splice\_init -- Command to initiate a channel to a peer -================================================================= - -SYNOPSIS --------- - -**(WARNING: experimental-splicing only)** - -**splice\_init** *channel\_id* *relative\_amount* [*initialpsbt*] [*feerate\_per\_kw*] [*force\_feerate*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -`splice_init` is a low level RPC command which initiates a channel splice for a given channel specified by `channel_id`. - -- **channel\_id** (hash): The channel id of the channel to be spliced. -- **relative\_amount** (integer): A positive or negative amount of satoshis to add or subtract from the channel. Note you may need to add a double dash (--) after splice\_init if using a negative *relative\_amount* so it is not interpretted as a command modifier. For example: ```shell lightning-cli splice_init -- $CHANNEL_ID -100000 ```. -- **initialpsbt** (string, optional): The (optional) base 64 encoded PSBT to begin with. If not specified, one will be generated automatically. -- **feerate\_per\_kw** (u32, optional): The miner fee we promise our peer to pay for our side of the splice transaction. It is calculated by `feerate_per_kw` * our\_bytes\_in\_splice\_tx / 1000. -- **force\_feerate** (boolean, optional): By default splices will fail if the fee provided looks too high. This is to protect against accidentally setting your fee higher than intended. Set `force_feerate` to true to skip this saftey check. - -EXAMPLE USAGE -------------- - -Here is an example set of splice commands that will splice in 100,000 sats to the first channel that comes out of `listpeerchannels`. The example assumes you already have at least one confirmed channel. - -```shell -RESULT=$(lightning-cli listpeerchannels) -CHANNEL_ID=$(echo $RESULT| jq -r ".channels[0].channel_id") -echo $RESULT - -RESULT=$(lightning-cli fundpsbt -k satoshi=100000sat feerate=urgent startweight=800 excess_as_change=true) -INITIALPSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT=$(lightning-cli splice_init $CHANNEL_ID 100000 $INITIALPSBT) -PSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT=$(lightning-cli splice_update $CHANNEL_ID $PSBT) -PSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT=$(lightning-cli signpsbt -k psbt="$PSBT") -PSBT=$(echo $RESULT | jq -r ".signed_psbt") -echo $RESULT - -lightning-cli splice_signed $CHANNEL_ID $PSBT -``` - -Here is an example set of splice commands that will splice out 100,000 sats from first channel that comes out of `listpeerchannels`. The example assumes you already have at least one confirmed channel. - -```shell -RESULT=$(lightning-cli listpeerchannels) -CHANNEL_ID=$(echo $RESULT| jq -r ".channels[0].channel_id") -echo $RESULT - -RESULT=$(lightning-cli addpsbtoutput 100000) -INITIALPSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT=$(lightning-cli splice_init -- $CHANNEL_ID -100500 $INITIALPSBT) -PSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT=$(lightning-cli splice_update $CHANNEL_ID $PSBT) -PSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -lightning-cli splice_signed $CHANNEL_ID $PSBT -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:splice_init#1", - "method": "splice_init", - "params": { - "channel_id": "5677721c35a424a23d6dcc7c909036e505ae68650e09d59733b4b7e73003a4dc", - "relative_amount": 100000, - "initialpsbt": "cHNidP8BAF4CAAAAAVZ3chw1pCSiPW3MfJCQNuUFrmhlDgnVlzO0t+cwA6TcAQAAAAD9////AU58DQAAAAAAIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL5sAAAAAAEA9gIAAAAAAQGLpTM0gWEqICjgcZNyoPhzdB5fNZBrEFbsNpsKHrTd9wEAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIBZa5i8jVPdfV4pbIzSebMb5RN+l5lJkQKAw9+ivAWfnAiBNhehz79143DbFOoTjmPYVErlY0FLlVqojX9wat0aKXgEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPGAAAAAEBKwEvDwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oAAA==", - "feerate_per_kw": null - } -} -{ - "id": "example:splice_init#2", - "method": "splice_init", - "params": { - "channel_id": "a40bb442dab0231b51d8f842d95aad548aa35e1d13c4cfcf2997344f805453a1", - "relative_amount": -105000, - "initialpsbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQABBQEBAQYBAwH7BAIAAAAAAQMIoIYBAAAAAAABBCJRIHg2NV/cioLcTLAKdyxVVBUdBjhKTdZejT9orAhWa4S+AA==", - "feerate_per_kw": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **psbt** (string): The (incomplete) PSBT of the splice transaction. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQIBBQECAQYBAwH7BAIAAAAAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQEFR1IhAjJCZt6EA7OrFXoJ8feE1YevYYMcmYwVG8whu3TCsjFLIQLjvTgAmGbJ2o7EqpnMTqnGwN1G3xXGHvDOHycSkXFOV1KuAQ4gVndyHDWkJKI9bcx8kJA25QWuaGUOCdWXM7S35zADpNwBDwQAAAAAARAEAAAAAAz8CWxpZ2h0bmluZwEIK/Jiqp0i3SYAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgEOIFZ3chw1pCSiPW3MfJCQNuUFrmhlDgnVlzO0t+cwA6TcAQ8EAQAAAAEQBP3///8M/AlsaWdodG5pbmcBCDmPhBY5ChQUAAEDCE58DQAAAAAAAQQiUSB4NjVf3IqC3EywCncsVVQVHQY4Sk3WXo0/aKwIVmuEvgz8CWxpZ2h0bmluZwEIxt4P7eqf3+QAAQMIAAAAAAAAAAABBCIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNDPwJbGlnaHRuaW5nAQji6kH6aOXoAgA=" -} -{ - "psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQD2AgAAAAABARzi7RBt64yrfqRL2p+KiUw8cYtiKICRFHmp/4eCSemSAQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgTCjR9L+TfzP7pLJVVto5egTRbRNj/RaBhyrA3UW0aEcCIAJO5FZjXvdpRcGR949C4DnfHs3soklTjn/1upkia+TgASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M9mAAAAAQErQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQEFR1IhAjJCZt6EA7OrFXoJ8feE1YevYYMcmYwVG8whu3TCsjFLIQLjvTgAmGbJ2o7EqpnMTqnGwN1G3xXGHvDOHycSkXFOV1KuAQ4gpAu0QtqwIxtR2PhC2VqtVIqjXh0TxM/PKZc0T4BUU6EBDwQAAAAAARAEAAAAAAz8CWxpZ2h0bmluZwEIn2Ac8fyFEJwAAQMIAAAAAAAAAAABBCIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNDPwJbGlnaHRuaW5nAQgu7JK9IpBWOAABAwighgEAAAAAAAEEIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4M/AlsaWdodG5pbmcBCOZ1GpRwbKfuAA==" -} -``` - -AUTHOR ------- - -Dusty <<@dusty\_daemon>> is mainly responsible. - -SEE ALSO --------- - -lightning-splice\_signed(7), lightning-splice\_update(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-splice_signed.7.md b/doc/lightning-splice_signed.7.md deleted file mode 100644 index 7283d6508834..000000000000 --- a/doc/lightning-splice_signed.7.md +++ /dev/null @@ -1,112 +0,0 @@ -lightning-splice\_signed -- Command to initiate a channel to a peer -=================================================================== - -SYNOPSIS --------- - -**(WARNING: experimental-splicing only)** - -**splice\_signed** *channel\_id* *psbt* [*sign\_first*] - -DESCRIPTION ------------ - -Command *added* in v23.08. - -`splice_signed` is a low level RPC command which finishes the active channel splice associated with `channel_id`. - -The *psbt* must have all signatures attached to all inputs that you have added to it or it will fail. - -- **channel\_id** (hash): The channel id of the channel to be spliced. -- **psbt** (string): The final version of the psbt to complete the splice with. -- **sign\_first** (boolean, optional): A flag that makes our node offer the final splice signature first (defaults to false). When false, the node will calculate who should sign first based off who is adding inputting the least sats to the splice as per spec. - -EXAMPLE USAGE -------------- - -In this example we funded the psbt from our lightning node, so we can use the lightning node to sign for its funds. - -```shell -RESULT=$(lightning-cli signpsbt $PSBT) -PSBT=$(echo $RESULT | jq -r ".signed_psbt") -echo $RESULT - -lightning-cli splice_signed $CHANNEL_ID $PSBT -``` - -Here is a full example set of splice commands that will splice in 100,000 sats to the first channel that comes out of `listpeerchannels`. The example assumes you already have at least one confirmed channel. - -```shell -RESULT=$(lightning-cli listpeerchannels) -CHANNEL_ID=$(echo $RESULT| jq -r ".channels[0].channel_id") -echo $RESULT - -RESULT=$(lightning-cli fundpsbt -k satoshi=100000sat feerate=urgent startweight=800 excess_as_change=true) -INITIALPSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT=$(lightning-cli splice_init $CHANNEL_ID 100000 $INITIALPSBT) -PSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT={"commitments_secured":false} -while [[ $(echo $RESULT | jq -r ".commitments_secured") == "false" ]] -do - RESULT=$(lightning-cli splice_update $CHANNEL_ID $PSBT) - PSBT=$(echo $RESULT | jq -r ".psbt") - echo $RESULT -done - -RESULT=$(lightning-cli signpsbt -k psbt="$PSBT") -PSBT=$(echo $RESULT | jq -r ".signed_psbt") -echo $RESULT - -lightning-cli splice_signed $CHANNEL_ID $PSBT -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:splice_signed#1", - "method": "splice_signed", - "params": { - "channel_id": "5677721c35a424a23d6dcc7c909036e505ae68650e09d59733b4b7e73003a4dc", - "psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQIBBQECAQYBAwH7BAIAAAAAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQEOIFZ3chw1pCSiPW3MfJCQNuUFrmhlDgnVlzO0t+cwA6TcAQ8EAAAAAAEQBAAAAAAM/AlsaWdodG5pbmcBCCvyYqqdIt0mAAEA9gIAAAAAAQGLpTM0gWEqICjgcZNyoPhzdB5fNZBrEFbsNpsKHrTd9wEAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIBZa5i8jVPdfV4pbIzSebMb5RN+l5lJkQKAw9+ivAWfnAiBNhehz79143DbFOoTjmPYVErlY0FLlVqojX9wat0aKXgEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPGAAAAAEBKwEvDwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oBDiBWd3IcNaQkoj1tzHyQkDblBa5oZQ4J1ZcztLfnMAOk3AEPBAEAAAABEAT9////ARNACI9TcWG+6uC9ElBFN3qhND7amsor/dtBhJ5ujEQAT/80548avrt7d7IJiOAaCNzzYLSXITdL2xjx6mhbBi9hTiEWkUUygSpECk12bHHNORk2lKNArhHgEuW6Gtnvum52ylMJAMLMqxcAAAAADPwJbGlnaHRuaW5nAQg5j4QWOQoUFAABAwhOfA0AAAAAAAEEIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4hB7nAxoROEqUxyWjlXFUHjsFtm/dr6SkP2H0cynK0g5oXCQDWuWnTBAAAAAz8CWxpZ2h0bmluZwEIxt4P7eqf3+QAAQMI4MgQAAAAAAABBCIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNDPwJbGlnaHRuaW5nAQji6kH6aOXoAgA=" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **tx** (hex): The hex representation of the final transaction that is published. -- **txid** (txid): The txid is of the final transaction. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "tx": "020000000001025677721c35a424a23d6dcc7c909036e505ae68650e09d59733b4b7e73003a4dc0000000000000000005677721c35a424a23d6dcc7c909036e505ae68650e09d59733b4b7e73003a4dc0100000000fdffffff024e7c0d00000000002251207836355fdc8a82dc4cb00a772c5554151d06384a4dd65e8d3f68ac08566b84bee0c81000000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd0400473044022053269f3951a1fc942174ac0dde8462405a86c89b31b444890664ee9735872cff02204cd822c4456c15e90ad342b23e9bb252d383d4e17a8a04818c4919e4fd61efd80147304402205ac0787c79e74ebfa0eaf18964625c53eb672cc4bed2c65303bd9cc192dad6f902206c6c0cded47201dae0020f50a8998555e654d3420c64e801fc668238e3c1cdfa0147522102324266de8403b3ab157a09f1f784d587af61831c998c151bcc21bb74c2b2314b2102e3bd38009866c9da8ec4aa99cc4ea9c6c0dd46df15c61ef0ce1f271291714e5752ae0140088f537161beeae0bd125045377aa1343eda9aca2bfddb41849e6e8c44004fff34e78f1abebb7b77b20988e01a08dcf360b49721374bdb18f1ea685b062f614e6c000000", - "txid": "f00d5e230b401274c88d3e6205e2c6117028cb9878b7d2bc52b1441f0b589427" -} -``` - -AUTHOR ------- - -Dusty <<@dusty\_daemon>> is mainly responsible. - -SEE ALSO --------- - -lightning-splice\_init(7), lightning-splice\_update(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-splice_update.7.md b/doc/lightning-splice_update.7.md deleted file mode 100644 index aabc8fdc17c3..000000000000 --- a/doc/lightning-splice_update.7.md +++ /dev/null @@ -1,121 +0,0 @@ -lightning-splice\_update -- Command to initiate a channel to a peer -=================================================================== - -SYNOPSIS --------- - -**(WARNING: experimental-splicing only)** - -**splice\_update** *channel\_id* *psbt* - -DESCRIPTION ------------ - -Command *added* in v23.08. - -`splice_update` is a low level RPC command which updates the active channel splice associated with `channel_id`. - -`splice_update` must be called repeatidly until the result `commitments_secured` is `true`. Each time `splice_update` is called, it will return a new PSBT that may have changes. In the simplest case, you take the returned `psbt` and pass it back into `splice_update` for the incoming `psbt` field. - -For more complex use cases, you may modify the `psbt` both before calling `splice_update` and inbetween subsequent calls until `commitments_secured` is `true`. After which point you can no long make modifications to the PSBT (beyond signing, which comes later with `splice_signed`). - -Each `splice_update` result may include changes to the PSBT specified by your channel peer. You can review these changes between calls to `splice_update` to perform additional validation or strategy adjustment. - -Typically, `splice_update` will return `commitments_secured` true after one call but you should assume it will need multiple calls. - -- **channel\_id** (hash): The channel id of the channel to be spliced. -- **psbt** (string): The base 64 encoded PSBT returned from `splice_init` with any changes added by the user. - -EXAMPLE USAGE -------------- - -Here is an example way to call `splice_update` - -```shell -RESULT={"commitments_secured":false} -while [[ $(echo $RESULT | jq -r ".commitments_secured") == "false" ]] -do - RESULT=$(lightning-cli splice_update $CHANNEL_ID $PSBT) - PSBT=$(echo $RESULT | jq -r ".psbt") - echo $RESULT -done -``` - -Before each call to `splice_update` you have the opportunity to make additional changes. - -Here is a full example set of splice commands that will splice in 100,000 sats to the first channel that comes out of `listpeerchannels`. The example assumes you already have at least one confirmed channel. - -```shell -RESULT=$(lightning-cli listpeerchannels) -CHANNEL_ID=$(echo $RESULT| jq -r ".channels[0].channel_id") -echo $RESULT - -RESULT=$(lightning-cli fundpsbt -k satoshi=100000sat feerate=urgent startweight=800 excess_as_change=true) -INITIALPSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT=$(lightning-cli splice_init $CHANNEL_ID 100000 $INITIALPSBT) -PSBT=$(echo $RESULT | jq -r ".psbt") -echo $RESULT - -RESULT={"commitments_secured":false} -while [[ $(echo $RESULT | jq -r ".commitments_secured") == "false" ]] -do - RESULT=$(lightning-cli splice_update $CHANNEL_ID $PSBT) - PSBT=$(echo $RESULT | jq -r ".psbt") - echo $RESULT -done - -RESULT=$(lightning-cli signpsbt -k psbt="$PSBT") -PSBT=$(echo $RESULT | jq -r ".signed_psbt") -echo $RESULT - -lightning-cli splice_signed $CHANNEL_ID $PSBT -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:splice_update#1", - "method": "splice_update", - "params": { - "channel_id": "5677721c35a424a23d6dcc7c909036e505ae68650e09d59733b4b7e73003a4dc", - "psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQIBBQECAQYBAwH7BAIAAAAAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQEFR1IhAjJCZt6EA7OrFXoJ8feE1YevYYMcmYwVG8whu3TCsjFLIQLjvTgAmGbJ2o7EqpnMTqnGwN1G3xXGHvDOHycSkXFOV1KuAQ4gVndyHDWkJKI9bcx8kJA25QWuaGUOCdWXM7S35zADpNwBDwQAAAAAARAEAAAAAAz8CWxpZ2h0bmluZwEIK/Jiqp0i3SYAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgEOIFZ3chw1pCSiPW3MfJCQNuUFrmhlDgnVlzO0t+cwA6TcAQ8EAQAAAAEQBP3///8M/AlsaWdodG5pbmcBCDmPhBY5ChQUAAEDCE58DQAAAAAAAQQiUSB4NjVf3IqC3EywCncsVVQVHQY4Sk3WXo0/aKwIVmuEvgz8CWxpZ2h0bmluZwEIxt4P7eqf3+QAAQMIAAAAAAAAAAABBCIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNDPwJbGlnaHRuaW5nAQji6kH6aOXoAgA=" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **psbt** (string): The (incomplete) PSBT of the splice transaction. -- **commitments\_secured** (boolean): Whether or not the commitments were secured. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "psbt": "cHNidP8BAgQCAAAAAQMEbAAAAAEEAQIBBQECAQYBAwH7BAIAAAAAAQD2AgAAAAABAYulMzSBYSogKOBxk3Kg+HN0Hl81kGsQVuw2mwoetN33AQAAAAD9////AkBCDwAAAAAAIgAgW4zTuRTPZ83Y+mJzyTA1PdNkdnNPvZYhAsLfU7kIgM0BLw8AAAAAACJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aAkcwRAIgFlrmLyNU919XilsjNJ5sxvlE36XmUmRAoDD36K8BZ+cCIE2F6HPv3XjcNsU6hOOY9hUSuVjQUuVWqiNf3Bq3RopeASED10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8YAAAAAQErQEIPAAAAAAAiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQEOIFZ3chw1pCSiPW3MfJCQNuUFrmhlDgnVlzO0t+cwA6TcAQ8EAAAAAAEQBAAAAAAM/AlsaWdodG5pbmcBCCvyYqqdIt0mAAEA9gIAAAAAAQGLpTM0gWEqICjgcZNyoPhzdB5fNZBrEFbsNpsKHrTd9wEAAAAA/f///wJAQg8AAAAAACIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNAS8PAAAAAAAiUSBj/+5Op9UebK35CG4oaiUnkiqqJbjFOuvzL6MqCmJ/WgJHMEQCIBZa5i8jVPdfV4pbIzSebMb5RN+l5lJkQKAw9+ivAWfnAiBNhehz79143DbFOoTjmPYVErlY0FLlVqojX9wat0aKXgEhA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPGAAAAAEBKwEvDwAAAAAAIlEgY//uTqfVHmyt+QhuKGolJ5IqqiW4xTrr8y+jKgpif1oBDiBWd3IcNaQkoj1tzHyQkDblBa5oZQ4J1ZcztLfnMAOk3AEPBAEAAAABEAT9////DPwJbGlnaHRuaW5nAQg5j4QWOQoUFAABAwhOfA0AAAAAAAEEIlEgeDY1X9yKgtxMsAp3LFVUFR0GOEpN1l6NP2isCFZrhL4M/AlsaWdodG5pbmcBCMbeD+3qn9/kAAEDCODIEAAAAAAAAQQiACBbjNO5FM9nzdj6YnPJMDU902R2c0+9liECwt9TuQiAzQz8CWxpZ2h0bmluZwEI4upB+mjl6AIA", - "commitments_secured": true -} -``` - -AUTHOR ------- - -Dusty <<@dusty\_daemon>> is mainly responsible. - -SEE ALSO --------- - -lightning-splice\_init(7), lightning-splice\_signed(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-sql.7.md b/doc/lightning-sql.7.md deleted file mode 100644 index 4bb1d2f12d29..000000000000 --- a/doc/lightning-sql.7.md +++ /dev/null @@ -1,591 +0,0 @@ -lightning-sql -- Command to do complex queries on list commands -=============================================================== - -SYNOPSIS --------- - -**sql** *query* - -DESCRIPTION ------------ - -Command *added* in v23.02. - -The **sql** RPC command runs the given query across a sqlite3 database created from various list commands. - -When tables are accessed, it calls the below commands, so it's no faster than any other local access (though it goes to great length to cache `listnodes` and `listchannels`) which then processes the results. - -It is, however faster for remote access if the result of the query is much smaller than the list commands would be. - -- **query** (string): The standard sqlite3 query to run. - Note that queries like "SELECT *" are fragile, as columns will change across releases; see lightning-listsqlschemas(7). - -PERMITTED SQLITE3 FUNCTIONS ---------------------------- - -Writing to the database is not permitted, and limits are placed on various other query parameters. - -Additionally, only the following functions are allowed: - -* abs -* avg -* coalesce -* count -* hex -* quote -* length -* like -* lower -* upper -* min -* max -* sum -* total - -TREATMENT OF TYPES ------------------- - -The following types are supported in schemas, and this shows how they are presented in the database. This matters: a JSON boolean is represented as an integer in the database, so a query will return 0 or 1, not true or false. - -* *hex*. A hex string. - * JSON: a string - * sqlite3: BLOB - -* *hash*/*secret*/*pubkey*/*txid*: just like *hex*. - -* *msat*/*integer*/*u64*/*u32*/*u16*/*u8*. Normal numbers. - * JSON: an unsigned integer - * sqlite3: INTEGER - -* *boolean*. True or false. - * JSON: literal **true** or **false** - * sqlite3: INTEGER - -* *number*. A floating point number (used for times in some places). - * JSON: number - * sqlite3: REAL - -* *string*. Text. - * JSON: string - * sqlite3: TEXT - -* *short\_channel\_id*. A short-channel-id of form 1x2x3. - * JSON: string - * sqlite3: TEXT - -TABLES ------- - -Note that the first column of every table is a unique integer called `rowid`: this is used for related tables to refer to specific rows in their parent. sqlite3 usually has this as an implicit column, but we make it explicit as the implicit version is not allowed to be used as a foreign key. - -The following tables are currently supported: -- `bkpr_accountevents` (see lightning-bkpr-listaccountevents(7)) - - `account` (type `string`, sqltype `TEXT`) - - `type` (type `string`, sqltype `TEXT`) - - `tag` (type `string`, sqltype `TEXT`) - - `credit_msat` (type `msat`, sqltype `INTEGER`) - - `debit_msat` (type `msat`, sqltype `INTEGER`) - - `currency` (type `string`, sqltype `TEXT`) - - `timestamp` (type `u32`, sqltype `INTEGER`) - - `outpoint` (type `string`, sqltype `TEXT`) - - `blockheight` (type `u32`, sqltype `INTEGER`) - - `origin` (type `string`, sqltype `TEXT`) - - `payment_id` (type `hex`, sqltype `BLOB`) - - `txid` (type `txid`, sqltype `BLOB`) - - `description` (type `string`, sqltype `TEXT`) - - `fees_msat` (type `msat`, sqltype `INTEGER`) - - `is_rebalance` (type `boolean`, sqltype `INTEGER`) - - `part_id` (type `u32`, sqltype `INTEGER`) - -- `bkpr_income` (see lightning-bkpr-listincome(7)) - - `account` (type `string`, sqltype `TEXT`) - - `tag` (type `string`, sqltype `TEXT`) - - `credit_msat` (type `msat`, sqltype `INTEGER`) - - `debit_msat` (type `msat`, sqltype `INTEGER`) - - `currency` (type `string`, sqltype `TEXT`) - - `timestamp` (type `u32`, sqltype `INTEGER`) - - `description` (type `string`, sqltype `TEXT`) - - `outpoint` (type `string`, sqltype `TEXT`) - - `txid` (type `txid`, sqltype `BLOB`) - - `payment_id` (type `hex`, sqltype `BLOB`) - -- `channels` indexed by `short_channel_id` (see lightning-listchannels(7)) - - `source` (type `pubkey`, sqltype `BLOB`) - - `destination` (type `pubkey`, sqltype `BLOB`) - - `short_channel_id` (type `short_channel_id`, sqltype `TEXT`) - - `direction` (type `u32`, sqltype `INTEGER`) - - `public` (type `boolean`, sqltype `INTEGER`) - - `amount_msat` (type `msat`, sqltype `INTEGER`) - - `message_flags` (type `u8`, sqltype `INTEGER`) - - `channel_flags` (type `u8`, sqltype `INTEGER`) - - `active` (type `boolean`, sqltype `INTEGER`) - - `last_update` (type `u32`, sqltype `INTEGER`) - - `base_fee_millisatoshi` (type `u32`, sqltype `INTEGER`) - - `fee_per_millionth` (type `u32`, sqltype `INTEGER`) - - `delay` (type `u32`, sqltype `INTEGER`) - - `htlc_minimum_msat` (type `msat`, sqltype `INTEGER`) - - `htlc_maximum_msat` (type `msat`, sqltype `INTEGER`) - - `features` (type `hex`, sqltype `BLOB`) - -- `closedchannels` (see lightning-listclosedchannels(7)) - - `peer_id` (type `pubkey`, sqltype `BLOB`) - - `channel_id` (type `hash`, sqltype `BLOB`) - - `short_channel_id` (type `short_channel_id`, sqltype `TEXT`) - - `alias_local` (type `short_channel_id`, sqltype `TEXT`, from JSON object `alias`) - - `alias_remote` (type `short_channel_id`, sqltype `TEXT`, from JSON object `alias`) - - `opener` (type `string`, sqltype `TEXT`) - - `closer` (type `string`, sqltype `TEXT`) - - `private` (type `boolean`, sqltype `INTEGER`) - - related table `closedchannels_channel_type_bits`, from JSON object `channel_type` - - `row` (reference to `closedchannels_channel_type.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `bits` (type `u32`, sqltype `INTEGER`) - - related table `closedchannels_channel_type_names`, from JSON object `channel_type` - - `row` (reference to `closedchannels_channel_type.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `names` (type `string`, sqltype `TEXT`) - - `total_local_commitments` (type `u64`, sqltype `INTEGER`) - - `total_remote_commitments` (type `u64`, sqltype `INTEGER`) - - `total_htlcs_sent` (type `u64`, sqltype `INTEGER`) - - `funding_txid` (type `txid`, sqltype `BLOB`) - - `funding_outnum` (type `u32`, sqltype `INTEGER`) - - `leased` (type `boolean`, sqltype `INTEGER`) - - `funding_fee_paid_msat` (type `msat`, sqltype `INTEGER`) - - `funding_fee_rcvd_msat` (type `msat`, sqltype `INTEGER`) - - `funding_pushed_msat` (type `msat`, sqltype `INTEGER`) - - `total_msat` (type `msat`, sqltype `INTEGER`) - - `final_to_us_msat` (type `msat`, sqltype `INTEGER`) - - `min_to_us_msat` (type `msat`, sqltype `INTEGER`) - - `max_to_us_msat` (type `msat`, sqltype `INTEGER`) - - `last_commitment_txid` (type `hash`, sqltype `BLOB`) - - `last_commitment_fee_msat` (type `msat`, sqltype `INTEGER`) - - `close_cause` (type `string`, sqltype `TEXT`) - - `last_stable_connection` (type `u64`, sqltype `INTEGER`) - -- `forwards` indexed by `in_channel and in_htlc_id` (see lightning-listforwards(7)) - - `created_index` (type `u64`, sqltype `INTEGER`) - - `in_channel` (type `short_channel_id`, sqltype `TEXT`) - - `in_htlc_id` (type `u64`, sqltype `INTEGER`) - - `in_msat` (type `msat`, sqltype `INTEGER`) - - `status` (type `string`, sqltype `TEXT`) - - `received_time` (type `number`, sqltype `REAL`) - - `out_channel` (type `short_channel_id`, sqltype `TEXT`) - - `out_htlc_id` (type `u64`, sqltype `INTEGER`) - - `updated_index` (type `u64`, sqltype `INTEGER`) - - `style` (type `string`, sqltype `TEXT`) - - `fee_msat` (type `msat`, sqltype `INTEGER`) - - `out_msat` (type `msat`, sqltype `INTEGER`) - - `resolved_time` (type `number`, sqltype `REAL`) - - `failcode` (type `u32`, sqltype `INTEGER`) - - `failreason` (type `string`, sqltype `TEXT`) - -- `htlcs` indexed by `short_channel_id and id` (see lightning-listhtlcs(7)) - - `short_channel_id` (type `short_channel_id`, sqltype `TEXT`) - - `id` (type `u64`, sqltype `INTEGER`) - - `expiry` (type `u32`, sqltype `INTEGER`) - - `amount_msat` (type `msat`, sqltype `INTEGER`) - - `direction` (type `string`, sqltype `TEXT`) - - `payment_hash` (type `hash`, sqltype `BLOB`) - - `state` (type `string`, sqltype `TEXT`) - -- `invoices` indexed by `payment_hash` (see lightning-listinvoices(7)) - - `label` (type `string`, sqltype `TEXT`) - - `description` (type `string`, sqltype `TEXT`) - - `payment_hash` (type `hash`, sqltype `BLOB`) - - `status` (type `string`, sqltype `TEXT`) - - `expires_at` (type `u64`, sqltype `INTEGER`) - - `amount_msat` (type `msat`, sqltype `INTEGER`) - - `bolt11` (type `string`, sqltype `TEXT`) - - `bolt12` (type `string`, sqltype `TEXT`) - - `local_offer_id` (type `hash`, sqltype `BLOB`) - - `invreq_payer_note` (type `string`, sqltype `TEXT`) - - `created_index` (type `u64`, sqltype `INTEGER`) - - `updated_index` (type `u64`, sqltype `INTEGER`) - - `pay_index` (type `u64`, sqltype `INTEGER`) - - `amount_received_msat` (type `msat`, sqltype `INTEGER`) - - `paid_at` (type `u64`, sqltype `INTEGER`) - - `paid_outpoint_txid` (type `txid`, sqltype `BLOB`, from JSON object `paid_outpoint`) - - `paid_outpoint_outnum` (type `u32`, sqltype `INTEGER`, from JSON object `paid_outpoint`) - - `payment_preimage` (type `secret`, sqltype `BLOB`) - -- `nodes` indexed by `nodeid` (see lightning-listnodes(7)) - - `nodeid` (type `pubkey`, sqltype `BLOB`) - - `last_timestamp` (type `u32`, sqltype `INTEGER`) - - `alias` (type `string`, sqltype `TEXT`) - - `color` (type `hex`, sqltype `BLOB`) - - `features` (type `hex`, sqltype `BLOB`) - - related table `nodes_addresses` - - `row` (reference to `nodes.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `type` (type `string`, sqltype `TEXT`) - - `port` (type `u16`, sqltype `INTEGER`) - - `address` (type `string`, sqltype `TEXT`) - - `option_will_fund_lease_fee_base_msat` (type `msat`, sqltype `INTEGER`, from JSON object `option_will_fund`) - - `option_will_fund_lease_fee_basis` (type `u32`, sqltype `INTEGER`, from JSON object `option_will_fund`) - - `option_will_fund_funding_weight` (type `u32`, sqltype `INTEGER`, from JSON object `option_will_fund`) - - `option_will_fund_channel_fee_max_base_msat` (type `msat`, sqltype `INTEGER`, from JSON object `option_will_fund`) - - `option_will_fund_channel_fee_max_proportional_thousandths` (type `u32`, sqltype `INTEGER`, from JSON object `option_will_fund`) - - `option_will_fund_compact_lease` (type `hex`, sqltype `BLOB`, from JSON object `option_will_fund`) - -- `offers` indexed by `offer_id` (see lightning-listoffers(7)) - - `offer_id` (type `hash`, sqltype `BLOB`) - - `active` (type `boolean`, sqltype `INTEGER`) - - `single_use` (type `boolean`, sqltype `INTEGER`) - - `bolt12` (type `string`, sqltype `TEXT`) - - `used` (type `boolean`, sqltype `INTEGER`) - - `label` (type `string`, sqltype `TEXT`) - -- `peerchannels` indexed by `peer_id` (see lightning-listpeerchannels(7)) - - `peer_id` (type `pubkey`, sqltype `BLOB`) - - `peer_connected` (type `boolean`, sqltype `INTEGER`) - - `reestablished` (type `boolean`, sqltype `INTEGER`) - - `state` (type `string`, sqltype `TEXT`) - - `scratch_txid` (type `txid`, sqltype `BLOB`) - - related table `peerchannels_channel_type_bits`, from JSON object `channel_type` - - `row` (reference to `peerchannels_channel_type.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `bits` (type `u32`, sqltype `INTEGER`) - - related table `peerchannels_channel_type_names`, from JSON object `channel_type` - - `row` (reference to `peerchannels_channel_type.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `names` (type `string`, sqltype `TEXT`) - - `local_htlc_minimum_msat` (type `msat`, sqltype `INTEGER`, from JSON object `local`) - - `local_htlc_maximum_msat` (type `msat`, sqltype `INTEGER`, from JSON object `local`) - - `local_cltv_expiry_delta` (type `u32`, sqltype `INTEGER`, from JSON object `local`) - - `local_fee_base_msat` (type `msat`, sqltype `INTEGER`, from JSON object `local`) - - `local_fee_proportional_millionths` (type `u32`, sqltype `INTEGER`, from JSON object `local`) - - `remote_htlc_minimum_msat` (type `msat`, sqltype `INTEGER`, from JSON object `remote`) - - `remote_htlc_maximum_msat` (type `msat`, sqltype `INTEGER`, from JSON object `remote`) - - `remote_cltv_expiry_delta` (type `u32`, sqltype `INTEGER`, from JSON object `remote`) - - `remote_fee_base_msat` (type `msat`, sqltype `INTEGER`, from JSON object `remote`) - - `remote_fee_proportional_millionths` (type `u32`, sqltype `INTEGER`, from JSON object `remote`) - - `ignore_fee_limits` (type `boolean`, sqltype `INTEGER`) - - `lost_state` (type `boolean`, sqltype `INTEGER`) - - `feerate_perkw` (type `u32`, sqltype `INTEGER`, from JSON object `feerate`) - - `feerate_perkb` (type `u32`, sqltype `INTEGER`, from JSON object `feerate`) - - `owner` (type `string`, sqltype `TEXT`) - - `short_channel_id` (type `short_channel_id`, sqltype `TEXT`) - - `channel_id` (type `hash`, sqltype `BLOB`) - - `funding_txid` (type `txid`, sqltype `BLOB`) - - `funding_outnum` (type `u32`, sqltype `INTEGER`) - - `initial_feerate` (type `string`, sqltype `TEXT`) - - `last_feerate` (type `string`, sqltype `TEXT`) - - `next_feerate` (type `string`, sqltype `TEXT`) - - `next_fee_step` (type `u32`, sqltype `INTEGER`) - - related table `peerchannels_inflight` - - `row` (reference to `peerchannels.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `funding_txid` (type `txid`, sqltype `BLOB`) - - `funding_outnum` (type `u32`, sqltype `INTEGER`) - - `feerate` (type `string`, sqltype `TEXT`) - - `total_funding_msat` (type `msat`, sqltype `INTEGER`) - - `splice_amount` (type `integer`, sqltype `INTEGER`) - - `our_funding_msat` (type `msat`, sqltype `INTEGER`) - - `scratch_txid` (type `txid`, sqltype `BLOB`) - - `close_to` (type `hex`, sqltype `BLOB`) - - `private` (type `boolean`, sqltype `INTEGER`) - - `opener` (type `string`, sqltype `TEXT`) - - `closer` (type `string`, sqltype `TEXT`) - - related table `peerchannels_features` - - `row` (reference to `peerchannels.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `features` (type `string`, sqltype `TEXT`) - - `funding_pushed_msat` (type `msat`, sqltype `INTEGER`, from JSON object `funding`) - - `funding_local_funds_msat` (type `msat`, sqltype `INTEGER`, from JSON object `funding`) - - `funding_remote_funds_msat` (type `msat`, sqltype `INTEGER`, from JSON object `funding`) - - `funding_fee_paid_msat` (type `msat`, sqltype `INTEGER`, from JSON object `funding`) - - `funding_fee_rcvd_msat` (type `msat`, sqltype `INTEGER`, from JSON object `funding`) - - `to_us_msat` (type `msat`, sqltype `INTEGER`) - - `min_to_us_msat` (type `msat`, sqltype `INTEGER`) - - `max_to_us_msat` (type `msat`, sqltype `INTEGER`) - - `total_msat` (type `msat`, sqltype `INTEGER`) - - `fee_base_msat` (type `msat`, sqltype `INTEGER`) - - `fee_proportional_millionths` (type `u32`, sqltype `INTEGER`) - - `dust_limit_msat` (type `msat`, sqltype `INTEGER`) - - `max_total_htlc_in_msat` (type `msat`, sqltype `INTEGER`) - - `their_reserve_msat` (type `msat`, sqltype `INTEGER`) - - `our_reserve_msat` (type `msat`, sqltype `INTEGER`) - - `spendable_msat` (type `msat`, sqltype `INTEGER`) - - `receivable_msat` (type `msat`, sqltype `INTEGER`) - - `minimum_htlc_in_msat` (type `msat`, sqltype `INTEGER`) - - `minimum_htlc_out_msat` (type `msat`, sqltype `INTEGER`) - - `maximum_htlc_out_msat` (type `msat`, sqltype `INTEGER`) - - `their_to_self_delay` (type `u32`, sqltype `INTEGER`) - - `our_to_self_delay` (type `u32`, sqltype `INTEGER`) - - `max_accepted_htlcs` (type `u32`, sqltype `INTEGER`) - - `alias_local` (type `short_channel_id`, sqltype `TEXT`, from JSON object `alias`) - - `alias_remote` (type `short_channel_id`, sqltype `TEXT`, from JSON object `alias`) - - related table `peerchannels_state_changes` - - `row` (reference to `peerchannels.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `timestamp` (type `string`, sqltype `TEXT`) - - `old_state` (type `string`, sqltype `TEXT`) - - `new_state` (type `string`, sqltype `TEXT`) - - `cause` (type `string`, sqltype `TEXT`) - - `message` (type `string`, sqltype `TEXT`) - - related table `peerchannels_status` - - `row` (reference to `peerchannels.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `status` (type `string`, sqltype `TEXT`) - - `in_payments_offered` (type `u64`, sqltype `INTEGER`) - - `in_offered_msat` (type `msat`, sqltype `INTEGER`) - - `in_payments_fulfilled` (type `u64`, sqltype `INTEGER`) - - `in_fulfilled_msat` (type `msat`, sqltype `INTEGER`) - - `out_payments_offered` (type `u64`, sqltype `INTEGER`) - - `out_offered_msat` (type `msat`, sqltype `INTEGER`) - - `out_payments_fulfilled` (type `u64`, sqltype `INTEGER`) - - `out_fulfilled_msat` (type `msat`, sqltype `INTEGER`) - - `last_stable_connection` (type `u64`, sqltype `INTEGER`) - - related table `peerchannels_htlcs` - - `row` (reference to `peerchannels.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `direction` (type `string`, sqltype `TEXT`) - - `id` (type `u64`, sqltype `INTEGER`) - - `amount_msat` (type `msat`, sqltype `INTEGER`) - - `expiry` (type `u32`, sqltype `INTEGER`) - - `payment_hash` (type `hash`, sqltype `BLOB`) - - `local_trimmed` (type `boolean`, sqltype `INTEGER`) - - `status` (type `string`, sqltype `TEXT`) - - `state` (type `string`, sqltype `TEXT`) - - `close_to_addr` (type `string`, sqltype `TEXT`) - - `last_tx_fee_msat` (type `msat`, sqltype `INTEGER`) - - `direction` (type `u32`, sqltype `INTEGER`) - -- `peers` indexed by `id` (see lightning-listpeers(7)) - - `id` (type `pubkey`, sqltype `BLOB`) - - `connected` (type `boolean`, sqltype `INTEGER`) - - `num_channels` (type `u32`, sqltype `INTEGER`) - - related table `peers_netaddr` - - `row` (reference to `peers.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `netaddr` (type `string`, sqltype `TEXT`) - - `remote_addr` (type `string`, sqltype `TEXT`) - - `features` (type `hex`, sqltype `BLOB`) - -- `sendpays` indexed by `payment_hash` (see lightning-listsendpays(7)) - - `created_index` (type `u64`, sqltype `INTEGER`) - - `id` (type `u64`, sqltype `INTEGER`) - - `groupid` (type `u64`, sqltype `INTEGER`) - - `partid` (type `u64`, sqltype `INTEGER`) - - `payment_hash` (type `hash`, sqltype `BLOB`) - - `updated_index` (type `u64`, sqltype `INTEGER`) - - `status` (type `string`, sqltype `TEXT`) - - `amount_msat` (type `msat`, sqltype `INTEGER`) - - `destination` (type `pubkey`, sqltype `BLOB`) - - `created_at` (type `u64`, sqltype `INTEGER`) - - `amount_sent_msat` (type `msat`, sqltype `INTEGER`) - - `label` (type `string`, sqltype `TEXT`) - - `bolt11` (type `string`, sqltype `TEXT`) - - `description` (type `string`, sqltype `TEXT`) - - `bolt12` (type `string`, sqltype `TEXT`) - - `completed_at` (type `u64`, sqltype `INTEGER`) - - `payment_preimage` (type `secret`, sqltype `BLOB`) - - `erroronion` (type `hex`, sqltype `BLOB`) - -- `transactions` indexed by `hash` (see lightning-listtransactions(7)) - - `hash` (type `txid`, sqltype `BLOB`) - - `rawtx` (type `hex`, sqltype `BLOB`) - - `blockheight` (type `u32`, sqltype `INTEGER`) - - `txindex` (type `u32`, sqltype `INTEGER`) - - `locktime` (type `u32`, sqltype `INTEGER`) - - `version` (type `u32`, sqltype `INTEGER`) - - related table `transactions_inputs` - - `row` (reference to `transactions.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `txid` (type `txid`, sqltype `BLOB`) - - `idx` (type `u32`, sqltype `INTEGER`, from JSON field `index`) - - `sequence` (type `u32`, sqltype `INTEGER`) - - related table `transactions_outputs` - - `row` (reference to `transactions.rowid`, sqltype `INTEGER`) - - `arrindex` (index within array, sqltype `INTEGER`) - - `idx` (type `u32`, sqltype `INTEGER`, from JSON field `index`) - - `amount_msat` (type `msat`, sqltype `INTEGER`) - - `scriptPubKey` (type `hex`, sqltype `BLOB`) - -EXAMPLE USAGE -------------- - -Here are some example using lightning-cli. Note that you may need to use `-o` if you use queries which contain `=` (which make lightning-cli(1) default to keyword style): - -A simple peer selection query: - -```shell -$ lightning-cli sql "SELECT id FROM peers" -{ - "rows": [ - [ - "02ba9965e3db660385bd1dd2c09dd032e0f2179a94fc5db8917b60adf0b363da00" - ] - ] -} -``` - -A statement containing using `=` needs `-o`: - -```shell -$ lightning-cli sql -o "SELECT node_id,last_timestamp FROM nodes WHERE last_timestamp>=1669578892" -{ - "rows": [ - [ - "02ba9965e3db660385bd1dd2c09dd032e0f2179a94fc5db8917b60adf0b363da00", - 1669601603 - ] - ] -} -``` - -If you want to compare a BLOB column, `x'hex'` or `X'hex'` are needed: - -```shell -$ lightning-cli sql -o "SELECT nodeid FROM nodes WHERE nodeid != x'03c9d25b6c0ce4bde5ad97d7ab83f00ae8bd3800a98ccbee36f3c3205315147de1';" -{ - "rows": [ - [ - "0214739d625944f8fdc0da9d2ef44dbd7af58443685e494117b51410c5c3ff973a" - ], - [ - "02ba9965e3db660385bd1dd2c09dd032e0f2179a94fc5db8917b60adf0b363da00" - ] - ] -} -$ lightning-cli sql -o "SELECT nodeid FROM nodes WHERE nodeid IN (x'03c9d25b6c0ce4bde5ad97d7ab83f00ae8bd3800a98ccbee36f3c3205315147de1', x'02ba9965e3db660385bd1dd2c09dd032e0f2179a94fc5db8917b60adf0b363da00')" -{ - "rows": [ - [ - "02ba9965e3db660385bd1dd2c09dd032e0f2179a94fc5db8917b60adf0b363da00" - ], - [ - "03c9d25b6c0ce4bde5ad97d7ab83f00ae8bd3800a98ccbee36f3c3205315147de1" - ] - ] -} -``` - -Related tables are usually referenced by JOIN: - -```shell -$ lightning-cli sql -o "SELECT nodeid, alias, nodes_addresses.type, nodes_addresses.port, nodes_addresses.address FROM nodes INNER JOIN nodes_addresses ON nodes_addresses.row = nodes.rowid" -{ - "rows": [ - [ - "02ba9965e3db660385bd1dd2c09dd032e0f2179a94fc5db8917b60adf0b363da00", - "YELLOWWATCH-22.11rc2-31-gcd7593b", - "dns", - 7272, - "localhost" - ], - [ - "0214739d625944f8fdc0da9d2ef44dbd7af58443685e494117b51410c5c3ff973a", - "HOPPINGSQUIRREL-1rc2-31-gcd7593b", - "dns", - 7171, - "localhost" - ] - ] -} -``` - -Simple function usage, in this case COUNT. Strings inside arrays need ", and ' to protect them from the shell: - -```shell -$ lightning-cli sql 'SELECT COUNT(*) FROM nodes" -{ - "rows": [ - [ - 3 - ] - ] -} -``` - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:sql#1", - "method": "sql", - "params": [ - "SELECT * FROM forwards;" - ] -} -{ - "id": "example:sql#2", - "method": "sql", - "params": [ - "SELECT * from peerchannels_features" - ] -} -``` - -RETURN VALUE ------------- - -On success, an object containing **rows** is returned. It is an array. Each array entry contains an array of values, each an integer, real number, string or *null*, depending on the sqlite3 type. - -The object may contain **warning\_db\_failure** if the database fails partway through its operation. -On success, an object is returned, containing: - -- **rows** (array of arrays): - - (array) - -The following warnings may also be returned: - -- **warning\_db\_failure**: A message if the database encounters an error partway through. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "rows": [] -} -{ - "rows": [ - [ - 6, - 1, - 0, - "option_static_remotekey" - ], - [ - 7, - 1, - 1, - "option_anchors_zero_fee_htlc_tx" - ], - [ - 16, - 11, - 0, - "option_static_remotekey" - ], - [ - 17, - 11, - 1, - "option_anchors_zero_fee_htlc_tx" - ] - ] -} -``` - -ERRORS ------- - -On failure, an error is returned. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listtransactions(7), lightning-listchannels(7), lightning-listpeers(7), lightning-listnodes(7), lightning-listforwards(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-staticbackup.7.md b/doc/lightning-staticbackup.7.md deleted file mode 100644 index a390f4364f35..000000000000 --- a/doc/lightning-staticbackup.7.md +++ /dev/null @@ -1,57 +0,0 @@ -lightning-staticbackup -- Command for deriving getting SCB of all the existing channels -======================================================================================= - -SYNOPSIS --------- - -**staticbackup** - -DESCRIPTION ------------ - -The **staticbackup** RPC command returns an object with SCB of all the channels in an array. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:staticbackup#1", - "method": "staticbackup", - "params": "{}" -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **scb** (array of hexs): - - (hex, optional): SCB of a channel in TLV format. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "scb": [ - "0000000000000001c707da9b230e1655b0a6c082b8daf4fa44d9d1f68163ed4d531d45cf453dc651022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d5900017f000001b2e3c707da9b230e1655b0a6c082b8daf4fa44d9d1f68163ed4d531d45cf453dc6510000000000000000000186a000021000" - ] -} -``` - -AUTHOR ------- - -Aditya <> is mainly responsible. - -SEE ALSO --------- - -lightning-getsharedsecret(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-stop.7.md b/doc/lightning-stop.7.md deleted file mode 100644 index 1ef9ba31e9fd..000000000000 --- a/doc/lightning-stop.7.md +++ /dev/null @@ -1,50 +0,0 @@ -lightning-stop -- Command to shutdown the Core Lightning node. -============================================================== - -SYNOPSIS --------- - -**stop** - -DESCRIPTION ------------ - -The **stop** is a RPC command to shut off the Core Lightning node. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:stop#1", - "method": "stop", - "params": {} -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **result** (string) (always "Shutdown complete") *(added v24.05)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "result": "Shutdown complete" -} -``` - -AUTHOR ------- - -Vincenzo Palazzo <> wrote the initial version of this man page, -but many others did the hard work of actually implementing this rpc command. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-txdiscard.7.md b/doc/lightning-txdiscard.7.md deleted file mode 100644 index 2e71b65a2b70..000000000000 --- a/doc/lightning-txdiscard.7.md +++ /dev/null @@ -1,69 +0,0 @@ -lightning-txdiscard -- Abandon a transaction from txprepare, release inputs -=========================================================================== - -SYNOPSIS --------- - -**txdiscard** *txid* - -DESCRIPTION ------------ - -The **txdiscard** RPC command releases inputs which were reserved for use of the *txid* from lightning-txprepare(7). - -- **txid** (txid): The transaction id, inputs should be unreseverd from. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:txdiscard#1", - "method": "txdiscard", - "params": { - "txid": "6e680cb76077f11c838cc7aee0c0aa360f9857f00856bb1614025a1af53739fc" - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **unsigned\_tx** (hex): The unsigned transaction. -- **txid** (txid): The transaction id of *unsigned\_tx*. - -If there is no matching *txid*, an error is reported. Note that this may happen due to incorrect usage, such as **txdiscard** or **txsend** already being called for *txid*. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "unsigned_tx": "020000000142dc00d81359c3a551e170e3bf5262fa9cacc2eb2e283a10e579491cd86dce4b0000000000fdffffff02ffffff00000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd42839800000000002251207836355fdc8a82dc4cb00a772c5554151d06384a4dd65e8d3f68ac08566b84be66000000", - "txid": "6e680cb76077f11c838cc7aee0c0aa360f9857f00856bb1614025a1af53739fc" -} -``` - -ERRORS ------- - -The following error codes may occur: - -- -1: An unknown *txid*. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-txprepare(7), lightning-txsend(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-txprepare.7.md b/doc/lightning-txprepare.7.md deleted file mode 100644 index 01f6ed2c5c15..000000000000 --- a/doc/lightning-txprepare.7.md +++ /dev/null @@ -1,104 +0,0 @@ -lightning-txprepare -- Command to prepare to withdraw funds from the internal wallet -==================================================================================== - -SYNOPSIS --------- - -**txprepare** *outputs* [*feerate*] [*minconf*] [*utxos*] - -DESCRIPTION ------------ - -The **txprepare** RPC command creates an unsigned transaction which spends funds from Core Lightning's internal wallet to the outputs specified in *outputs*. - -**txprepare** is similar to the first part of a **withdraw** command, but supports multiple outputs and uses *outputs* as parameter. The second part is provided by **txsend**. - -- **outputs** (array of outputdescs): Format is like: [{destination1: amount1}, {destination2: amount2}] or [{destination: *all*}]. It supports any number of **confirmed** outputs.: - - (outputdesc, optional) -- **feerate** (feerate, optional): Used for the transaction as initial feerate. The default is *normal*. -- **minconf** (u32, optional): The minimum number of confirmations that used outputs should have. The default is 1. -- **utxos** (array of outpoints, optional): To be used to fund the transaction, as an array of `txid:vout`. These must be drawn from the node's available UTXO set.: - - (outpoint, optional) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:txprepare#1", - "method": "txprepare", - "params": { - "outputs": [ - { - "bcrt1qtwxd8wg5eanumk86vfeujvp48hfkgannf77evggzct048wggsrxsum2pmm": 16777215 - } - ], - "feerate": null, - "minconf": null, - "utxos": null - } -} -{ - "id": "example:txprepare#2", - "method": "txprepare", - "params": { - "outputs": [ - { - "bcrt1qyhu7rxj3rrlcj84jtzp2mk9d89xm9v2rx4d4h8au830axugx6mmqsuplng": "100000sat" - } - ], - "feerate": null, - "minconf": null, - "utxos": null - } -} -``` - -RETURN VALUE ------------- - -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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "unsigned_tx": "020000000142dc00d81359c3a551e170e3bf5262fa9cacc2eb2e283a10e579491cd86dce4b0000000000fdffffff02ffffff00000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd42839800000000002251207836355fdc8a82dc4cb00a772c5554151d06384a4dd65e8d3f68ac08566b84be66000000", - "txid": "6e680cb76077f11c838cc7aee0c0aa360f9857f00856bb1614025a1af53739fc", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQDeAgAAAAABATRHoQ9tEMHRHpf06v5uTEdjdMk1rccIaA6MNGMipNQWAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFLnqitWTi465LGxeucwoSAj16NGbAkcwRAIgVtOsUaQaPgH86aW6e6qmJa1xVb8KWvc+HALGosqVVmQCIFi4JU8Gy+vl2a2/frY+71hitYIBB/tjsRP7fpgb8b9TASECHUIV5q1r2ownjOlAFPQASTlZxxNgBvi5O3hCRvajwdJlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIELcANgTWcOlUeFw479SYvqcrMLrLig6EOV5SRzYbc5LAQ8EAAAAAAEQBP3///8AAQMI////AAAAAAABBCIAIFuM07kUz2fN2Ppic8kwNT3TZHZzT72WIQLC31O5CIDNAAEDCEKDmAAAAAAAAQQiUSB4NjVf3IqC3EywCncsVVQVHQY4Sk3WXo0/aKwIVmuEvgA=" -} -{ - "unsigned_tx": "0200000001a91077a134fb9fe4a8d13a482b718368bfd9ce3eff61ff7d96549480a1f97dca0100000000fdffffff02a08601000000000022002025f9e19a5118ff891eb25882add8ad394db2b143355b5b9fbc3c5fd37106d6f66173010000000000225120a2a01c7965289eee56b5cfcddb9856c70fa476c264d21f711c6a69af776ae40366000000", - "txid": "f11d436054607603e903fc69c4bd9b39ce97421341c7cf814ad025cb5bf59c1c", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQDeAgAAAAABAYZ4QwAgPq6Os8kk073f5Yx4T9LXYfbOjAdkzMXfuBQdAAAAAAD9////AjPkAioBAAAAFgAUeOeqzyifepeJAMCl4vnnJ/TRptRADQMAAAAAABYAFAH62Qq81maX4lkhZHIt5KlevuFlAkcwRAIgYBFwmqWCrVkxxZ0/tte3z4lIem0L7MkhXzGAOvBWa6YCIFx7H4zOzxjixlZMi0DYYbIEflDjYHJXLfN1wVcXYuekASEDgztw/3Rks6vKGYMXJ83VEvQcNIjg3rJW6KdxEh26uwplAAAAAQEfQA0DAAAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQEOIKkQd6E0+5/kqNE6SCtxg2i/2c4+/2H/fZZUlICh+X3KAQ8EAQAAAAEQBP3///8AAQMIoIYBAAAAAAABBCIAICX54ZpRGP+JHrJYgq3YrTlNsrFDNVtbn7w8X9NxBtb2AAEDCGFzAQAAAAAAAQQiUSCioBx5ZSie7la1z83bmFbHD6R2wmTSH3Ecammvd2rkAwA=" -} -``` - -ERRORS ------- - -On failure, an error is reported and the transaction is not created. - -- -1: Catchall nonspecific error. -- 301: There are not enough funds in the internal wallet (including fees) to create the transaction. -- 302: The dust limit is not met. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-withdraw(7), lightning-txsend(7), lightning-txdiscard(7), lightning-feerates(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-txsend.7.md b/doc/lightning-txsend.7.md deleted file mode 100644 index 6321605cf913..000000000000 --- a/doc/lightning-txsend.7.md +++ /dev/null @@ -1,69 +0,0 @@ -lightning-txsend -- Command to sign and send transaction from txprepare -======================================================================= - -SYNOPSIS --------- - -**txsend** *txid* - -DESCRIPTION ------------ - -The **txsend** RPC command signs and broadcasts a transaction created by *txprepare* RPC command. - -- **txid** (txid): The transaction id of the transaction created by `txprepare` rpc command. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:txsend#1", - "method": "txsend", - "params": { - "txid": "c9f59ba6bda8e095bb43ecabfa37de8d5194e5c839b6b63be4e29bceaae483ce" - } -} -``` - -RETURN VALUE ------------- - -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*. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "tx": "020000000142dc00d81359c3a551e170e3bf5262fa9cacc2eb2e283a10e579491cd86dce4b0000000000fdffffff020000000100000000220020b636f07026ea64952ece5b7620a9337d9ac2321c796a499260994d1b373667504183980000000000225120754a77b503fcba0fd80f0a1a8226ed6764ff9a9d9bb61b485d40d4c9f4be245966000000", - "txid": "c9f59ba6bda8e095bb43ecabfa37de8d5194e5c839b6b63be4e29bceaae483ce", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQDeAgAAAAABATRHoQ9tEMHRHpf06v5uTEdjdMk1rccIaA6MNGMipNQWAAAAAAD9////AoCWmAEAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WXzWm0oAQAAABYAFLnqitWTi465LGxeucwoSAj16NGbAkcwRAIgVtOsUaQaPgH86aW6e6qmJa1xVb8KWvc+HALGosqVVmQCIFi4JU8Gy+vl2a2/frY+71hitYIBB/tjsRP7fpgb8b9TASECHUIV5q1r2ownjOlAFPQASTlZxxNgBvi5O3hCRvajwdJlAAAAAQEfgJaYAQAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZSICA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPRzBEAiBp/HPhg1ObOXqTr5rIjUYLMspGLz+sk1pjD9pjRFzf3wIgWycOB/dQPzwZAK3OXYs269h8o85ucDpdVhH4AyX69a0BIgYD10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8IAfrZCgAAAAABDiBC3ADYE1nDpVHhcOO/UmL6nKzC6y4oOhDleUkc2G3OSwEPBAAAAAABEAT9////AAEDCAAAAAEAAAAAAQQiACC2NvBwJupklS7OW3YgqTN9msIyHHlqSZJgmU0bNzZnUAABAwhBg5gAAAAAAAEEIlEgdUp3tQP8ug/YDwoagibtZ2T/mp2bthtIXUDUyfS+JFkhBycqmiXx/+1S+rBKLMiK6rE1tTcjhWqPFIHCZBf4ipIuCQDVXEk5CwAAAAA=" -} -``` - -ERRORS ------- - -On failure, an error is reported (from bitcoind), and the inputs from the transaction are unreserved. - -- -1: Catchall nonspecific error. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-txprepare(7), lightning-txdiscard(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-unreserveinputs.7.md b/doc/lightning-unreserveinputs.7.md deleted file mode 100644 index a3eccdd6337c..000000000000 --- a/doc/lightning-unreserveinputs.7.md +++ /dev/null @@ -1,91 +0,0 @@ -lightning-unreserveinputs -- Release reserved UTXOs -=================================================== - -SYNOPSIS --------- - -**unreserveinputs** *psbt* [*reserve*] - -DESCRIPTION ------------ - -The **unreserveinputs** RPC command releases (or reduces reservation) on UTXOs which were previously marked as reserved, generally by lightning-reserveinputs(7). - -- **psbt** (string): Inputs to unreserve are the inputs specified in the passed-in *psbt*. -- **reserve** (u32, optional): The number of blocks to decrease reservation by. The default is 72. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:unreserveinputs#1", - "method": "unreserveinputs", - "params": { - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQDeAgAAAAABAXyy20ynmOFyRbegGyApk50yNIAb4C+RKV5c2n5VKL3lAAAAAAD9////Akf0EAAAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WUs/fQpAQAAABYAFN9HebR4q6498ytdeRKjC64CkCOMAkcwRAIgSTJCpWVH1FLZYPdwFe7gZckxCtk+AxPp20KUVKqPIdUCIA3hkoUco68vffiwt6TrE3KgX09JE9m7PDUUgrHQANMRASEDBOBlCza/8qXE5q8uJ+OWsKscDERWfdA+LLCa/lwMH0BlAAAAAQEfR/QQAAAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZSICA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPRzBEAiBKjSasyN29ODqXSemEQCZfRIvbJP8thKRBrd4e+NLEMQIgMGNz3+DWDnLmjnIDCaVcC7BKxuycwvtJq1qlKFtTaXcBIgYD10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8IAfrZCgAAAAABDiAoXS6QUlCcOApG/j+hr4OhNt0tT4GvCzI6z16Hepi7OwEPBAAAAAABEAT9////AAEDCCN6CAAAAAAAAQQWABQfJ4Qjje0sa2yGBz++6jkM2hGRmAz8CWxpZ2h0bmluZwQCAAEAAQMIinkIAAAAAAABBCJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aIQeRRTKBKkQKTXZscc05GTaUo0CuEeAS5boa2e+6bnbKUwkAwsyrFwIAAAAA", - "reserve": 200 - } -} -{ - "id": "example:unreserveinputs#2", - "method": "unreserveinputs", - "params": { - "psbt": "cHNidP8BAF4CAAAAAVa79WPJoiYrzo/RgzIAn5HanoBFZo0vZvEjxPAVwLv4AAAAAAD9////AXzpHAAAAAAAIlEgBRjpLNlOD2LAbxJt/5i5q+ebfthFoVbVJFZ44mVUR11mAAAAAAEA3gIAAAAAAQENwcSElLyC0jcwUHiODBhtapHyzIdiwytOGiu/Raf4BwAAAAAA/f///wKAhB4AAAAAABYAFAH62Qq81maX4lkhZHIt5KlevuFl82znKQEAAAAWABQyIWyAI6LDf6dJ58BDPdkh+PWUZwJHMEQCIGiJFhVi/d/Hz19Cz48uHTjhgBJ6WAlgl/bLVS7A6VtxAiAwlb7xYzIM4uopFvMnpOmGIOp3+upOPPF2F8VaB8U/HQEhA6BAjey7RADP4ifoh2VXhX7QXkh+sZqozv1EPuU5TxZmZQAAAAEBH4CEHgAAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WUAAA==", - "reserve": null - } -} -``` - -RETURN VALUE ------------- - -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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "reservations": [ - { - "txid": "3bbb987a875ecf3a320baf814f2ddd36a183afa13ffe460a389c5052902e5d28", - "vout": 0, - "was_reserved": true, - "reserved": false - } - ] -} -{ - "reservations": [] -} -``` - -ERRORS ------- - -On failure, an error is reported and no UTXOs are unreserved. - -- -32602: Invalid parameter, i.e. an unparseable PSBT. - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-unreserveinputs(7), lightning-signpsbt(7), lightning-sendpsbt(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-upgradewallet.7.md b/doc/lightning-upgradewallet.7.md deleted file mode 100644 index fb99cd40ea62..000000000000 --- a/doc/lightning-upgradewallet.7.md +++ /dev/null @@ -1,81 +0,0 @@ -lightning-upgradewallet -- Command to spend all P2SH-wrapped inputs into a Native Segwit output -=============================================================================================== - -SYNOPSIS --------- - -**upgradewallet** [*feerate*] [*reservedok*] - -DESCRIPTION ------------ - -`upgradewallet` is a convenience RPC which will spend all p2sh-wrapped Segwit deposits in a wallet into a single Native Segwit P2WPKH address. - -- **feerate** (feerate, optional): Feerate for the upgrade transaction. The default is *opening*. *(added v23.02)* -- **reservedok** (boolean, optional): Tells the wallet to include all P2SH-wrapped inputs, including reserved ones. *(added v23.02)* - -EXAMPLE USAGE -------------- - -The caller is trying to buy a liquidity ad but the command keeps failing. They have funds in their wallet, but they're all P2SH-wrapped outputs. - -The caller can call `upgradewallet` to convert their funds to native segwit outputs, which are valid for liquidity ad buys. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:upgradewallet#1", - "method": "upgradewallet", - "params": "{}" -} -{ - "id": "example:upgradewallet#2", - "method": "upgradewallet", - "params": { - "feerate": "urgent", - "reservedok": true - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **upgraded\_outs** (u64): Count of spent/upgraded UTXOs. *(added v23.02)* -- **psbt** (string, optional): The PSBT that was finalized and sent. *(added v23.02)* -- **tx** (hex, optional): The raw transaction which was sent. *(added v23.02)* -- **txid** (txid, optional): The txid of the **tx**. *(added v23.02)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "upgraded_outs": 0 -} -{ - "tx": "0200000001c08ce0a9ea1e00179ea603cb8619ec2a2df990ef931e1ccd87fa7a0e271ed8370100000000fdffffff013514310100000000225120888ab14b6e1655d1d00039b836d70b66e3351543ab6cd2f94166255f3d5e6cb5cf000000", - "txid": "de5f1d6f0b2f95cfe5cfbf8cc33bd3f279a8f800ee0efc27bbfafb2b6ead9560", - "psbt": "cHNidP8BAgQCAAAAAQMEzwAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQDgAgAAAAABAZRZ0m0kaJA+ubJw1eYurGROu1BYc0i7l9xbyG06R6uZAQAAAAD9////AmQtPCgBAAAAF6kUnoGu9IUv0FGnzol3Lb/BNBNkOViHAC0xAQAAAAAXqRRlVyjzbP420BqlDTI2cERp+EpVQIcCRzBEAiBliJpjBsipwFgsLZMlzbESZ6hMTh+pgKQlXUIL0nLb3wIga/xwr/IJgEc7Ie6ApS4aVDr9xr1TZ3wj+8bRvI6WqScBIQPgYuc48PzUufScX6A6YOsdmJwn+bAQjLZ/g9jhQYduHM4AAAABASAALTEBAAAAABepFGVXKPNs/jbQGqUNMjZwRGn4SlVAhyICArnAxoROEqUxyWjlXFUHjsFtm/dr6SkP2H0cynK0g5oXRzBEAiBlTUNYfS5n5rGRVmoNb0z3AMGJjHijwpXROGIVxfoBnQIgeTx32KY3CcfYTYzXUIRQAMUQB7rlPWRptWMDD3UttkcBAQQWABTWuWnTbf/a2YaRk/Zj7kgN/cc0iCIGArnAxoROEqUxyWjlXFUHjsFtm/dr6SkP2H0cynK0g5oXCNa5adMAAAAAAQ4gwIzgqeoeABeepgPLhhnsKi35kO+THhzNh/p6Dice2DcBDwQBAAAAARAE/f///wABAwg1FDEBAAAAAAEEIlEgiIqxS24WVdHQADm4NtcLZuM1FUOrbNL5QWYlXz1ebLUhByjMj8l44gnxaV+ltWVQYdsaqyMRtSQXaUW/EBXvLUuJCQCftnv8BwAAAAA=", - "upgraded_outs": 1 -} -``` - -AUTHOR ------- - -Lisa Neigut <> is mainly responsible. - -SEE ALSO --------- - -lightning-utxopsbt(7), lightning-reserveinputs(7), lightning-unreserveinputs(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-utxopsbt.7.md b/doc/lightning-utxopsbt.7.md deleted file mode 100644 index f5f705f7ded1..000000000000 --- a/doc/lightning-utxopsbt.7.md +++ /dev/null @@ -1,148 +0,0 @@ -lightning-utxopsbt -- Command to populate PSBT inputs from given UTXOs -====================================================================== - -SYNOPSIS --------- - -**utxopsbt** *satoshi* *feerate* *startweight* *utxos* [*reserve*] [*reservedok*] [*locktime*] [*min\_witness\_weight*] [*excess\_as\_change*] [*opening\_anchor\_channel*] - -DESCRIPTION ------------ - -*utxopsbt* is a low-level RPC command which creates a PSBT using unreserved inputs in the wallet, optionally reserving them as well. - -It deliberately mirrors the parameters and output of lightning-fundpsbt(7) except instead of an optional *minconf* parameter to select unreserved outputs from the wallet, it takes a compulsory list of outputs to use. - -- **satoshi** (msat\_or\_all): The minimum satoshi value of the output(s) needed (or the string `all` meaning use all unreserved inputs). If a value, it can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. -- **feerate** (feerate): Used for the transaction as initial feerate. The default is *normal*. -- **startweight** (u32): The weight of the transaction before *fundpsbt* has added any inputs. -- **utxos** (array of outpoints): An array of `txid:vout`, each of which must be reserved or available.: - - (outpoint, optional) -- **reserve** (u32, optional): If not zero, then *reserveinputs* is called (successfully, with *exclusive* true) on the returned PSBT for this number of blocks. The default is 72 blocks. -- **reservedok** (boolean, optional): If set to true, it will also fail if any of the *utxos* are already reserved. The default is false. -- **locktime** (u32, optional): If not set, it is set to a recent block height. -- **min\_witness\_weight** (u32, optional): Minimum weight to use for a UTXO's witness. If the actual witness weight is greater than the provided minimum, the actual witness weight will be used. -- **excess\_as\_change** (boolean, optional): Flag to add a change output for the excess sats. -- **opening\_anchor\_channel** (boolean, optional): To signel that it needs emergency reserve for anchors so that we can lowball our commitment tx fees, and min-emergency-msat for reserving some sats for closing anchor channels. *(added v23.08)* - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:utxopsbt#1", - "method": "utxopsbt", - "params": { - "satoshi": 0, - "feerate": "253perkw", - "startweight": 0, - "utxos": [ - "d82a99192fb333106ea8d08f5231ed45f2ed5b1ef9eb81b0fef8f9ea354d2637:1" - ], - "reserve": 0, - "reservedok": true, - "locktime": null, - "min_witness_weight": null, - "excess_as_change": false - } -} -{ - "id": "example:utxopsbt#2", - "method": "utxopsbt", - "params": { - "satoshi": 1000000, - "feerate": "7500perkw", - "startweight": 0, - "utxos": [ - "2fc3b9f8d4aed120f6d9a6f206f07c35ef4d518ec0305d1d974873d256e38ca7:1", - "2f669f6a605ee5c7ddd2abb753bc64b1a90bd1b7448264f5d78a7ca823c00a1b:1" - ], - "reserve": null, - "reservedok": true, - "locktime": null, - "min_witness_weight": null, - "excess_as_change": false - } -} -``` - -RETURN VALUE ------------- - -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. -- **excess\_msat** (msat): The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change\_outnum* is also returned. -- **change\_outnum** (u32, optional): The 0-based output number where change was placed (only if parameter *excess\_as\_change* was true and there was sufficient funds). -- **reservations** (array of objects, optional): If *reserve* was true or a non-zero number, just as per lightning- reserveinputs(7).: - - **txid** (txid): The txid of the transaction. - - **vout** (u32): The 0-based output number. - - **was\_reserved** (boolean): Whether this output was previously reserved. - - **reserved** (boolean) (always *true*): Whether this output is now reserved. - - **reserved\_to\_block** (u32): The blockheight the reservation will expire. - -On success, returns the *psbt* it created, containing the inputs, *feerate\_per\_kw* showing the exact numeric feerate it used, *estimated\_final\_weight* for the estimated weight of the transaction once fully signed, and *excess\_msat* containing the amount above *satoshi* which is available. This could be zero, or dust. If *satoshi* was `all`, then *excess\_msat* is the entire amount once fees are subtracted for the weights of the inputs and *startweight*. - -If *reserve* was *true* or a non-zero number, then a *reservations* array is returned, exactly like *reserveinputs*. - -If *excess\_as\_change* is true and the excess is enough to cover an additional output above the `dust_limit`, then an output is added to the PSBT for the excess amount. The *excess\_msat* will be zero. A *change\_outnum* will be returned with the index of the change output. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "psbt": "cHNidP8BADMCAAAAATcmTTXq+fj+sIHr+R5b7fJF7TFSj9CobhAzsy8ZmSrYAQAAAAD9////AGYAAAAAAQDeAgAAAAABAWQACJva49ga8OCYXvPRWQRhoXndrJykwjgXbwT251dEAAAAAAD9////AiOI9ikBAAAAFgAU3gClv/YpAKRpfDuiFu6mIL2E4+5QaQ8AAAAAABYAFAH62Qq81maX4lkhZHIt5KlevuFlAkcwRAIgUXIQFs7oRkorVThUn3sLj7WI7g8c8RHai4ChoCvIkWsCICp1CqHl4BlMJCKFHRWHXhhekaj0r1EFSNrh8UnvysQPASEDqHIAEdaH3H6pb3VJzbJNDG4lL8PTfsheL+h2p6baK3JlAAAAAQEfUGkPAAAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZQA=", - "feerate_per_kw": 253, - "estimated_final_weight": 271, - "excess_msat": 1009932000 -} -{ - "psbt": "cHNidP8BAFwCAAAAAqeM41bSc0iXHV0wwI5RTe81fPAG8qbZ9iDRrtT4ucMvAQAAAAD9////GwrAI6h8itf1ZIJEt9ELqbFkvFO3q9Ldx+VeYGqfZi8BAAAAAP3///8AZgAAAAABAN4CAAAAAAEBEaK0TQ97IsrzuO1gLt+vYbvLBG90NrCOZp7SCgrRknYAAAAAAP3///8CM6/2KQEAAAAWABQ1B/KkIVbg7yFRcCEN/VOptfOX/EBCDwAAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WUCRzBEAiA1oI1us81XEa/DRlvcP2qnbWLsV5pZcRfvj9MLyT202gIgb7noMqHYWMmm7H7VNEfWa29jjtuV9yrrSc9ui11ECQ0BIQKhZOHR4gFKMu2EKKgZ/7qnhzq9PvhtnAW2sxPZ4c9RIWUAAAABAR9AQg8AAAAAABYAFAH62Qq81maX4lkhZHIt5KlevuFlAAEA3gIAAAAAAQGnjONW0nNIlx1dMMCOUU3vNXzwBvKm2fYg0a7U+LnDLwAAAAAA/f///wJmbOcpAQAAABYAFOwPo5eUrDF7UgZBFQLRHOeX6PiGQEIPAAAAAAAWABTCzKsXHCpb6dq1LsQbglhjAkxUZgJHMEQCICgjGlauGj2eiMS4MWUK6zAWqMe1OuidQR+Hy9ZgSTuzAiA8JTb9OrLqS3hiWtT+TQ/NBsKJ2hhHLDaKUUNdgi4OkAEhA9g3oH5ejmGIqUY2ZWxc8YWF2+T+XpE/6oC40Cx3+e97ZQAAAAEBH0BCDwAAAAAAFgAUwsyrFxwqW+natS7EG4JYYwJMVGYA", - "feerate_per_kw": 7500, - "estimated_final_weight": 542, - "excess_msat": 995935000, - "reservations": [ - { - "txid": "2fc3b9f8d4aed120f6d9a6f206f07c35ef4d518ec0305d1d974873d256e38ca7", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - }, - { - "txid": "2f669f6a605ee5c7ddd2abb753bc64b1a90bd1b7448264f5d78a7ca823c00a1b", - "vout": 1, - "was_reserved": true, - "reserved": true, - "reserved_to_block": 246 - } - ] -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: Catchall nonspecific error. -- 301: Insufficient UTXOs to meet *satoshi* value. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-fundpsbt(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-wait.7.md b/doc/lightning-wait.7.md deleted file mode 100644 index 79bb02a40af5..000000000000 --- a/doc/lightning-wait.7.md +++ /dev/null @@ -1,163 +0,0 @@ -lightning-wait -- Command to wait for creations, changes and deletions -====================================================================== - -SYNOPSIS --------- - -**wait** *subsystem* *indexname* *nextvalue* - -DESCRIPTION ------------ - -Command *added* in v23.08. - -The **wait** RPC command returns once the index given by *indexname* in *subsystem* reaches or exceeds *nextvalue*. All indexes start at 0, when no events have happened (**wait** with a *nextvalue* of 0 is a way of getting the current index, though naturally this is racy!). - -- **subsystem** (string) (one of "invoices", "forwards", "sendpays"): The subsystem to get the next index value from. - `invoices`: corresponding to `listinvoices` (added in *v23.08*). - `sendpays`: corresponding to `listsendpays` (added in *v23.11*). - `forwards`: corresponding to `listforwards` (added in *v23.11*). -- **indexname** (string) (one of "created", "updated", "deleted"): The name of the index to get the next value for. - `created` is incremented by one for every new object. - `updated` is incremented by one every time an object is changed. - `deleted` is incremented by one every time an object is deleted. -- **nextvalue** (u64): The next value of the index. - -RELIABILITY ------------ - -Indices can go forward by more than one; in particlar, if multiple objects were created and the one deleted, you could see this effect. Similarly, there are some places (e.g. invoice expiration) where we can update multiple entries at once. - -Indices only monotoncally increase. - -USAGE ------ - -The **wait** RPC is used to track changes in the system. Consider tracking invoices being paid or expiring. The simplest (and inefficient method) would be: -1. Call `listinvoices` to get the current state of all invoices, and remember the highest `updated_index`. Say it was 5. -2. Call `wait invoices updated 6`. -3. When it returns, call `listinvoices` again to see what changed. - -This is obviously inefficient, so there are two optimizations: -1. Call `listinvoices` with `index=updated` and `start=6` to only see invoices with `updated_index` greater than or equal to 6. -2. `wait` itself may also return some limited subset of fields from the list command (it can't do this in all cases); for `invoices` this is `label` and `status`, allowing many callers to avoid the `listinvoices` call. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:wait#1", - "method": "wait", - "params": { - "subsystem": "invoices", - "indexname": "created", - "nextvalue": 1 - } -} -{ - "id": "example:wait#2", - "method": "wait", - "params": { - "subsystem": "invoices", - "indexname": "updated", - "nextvalue": 2 - } -} -{ - "id": "example:wait#3", - "method": "wait", - "params": { - "subsystem": "sendpays", - "indexname": "updated", - "nextvalue": 2 - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **subsystem** (string) (one of "invoices", "forwards", "sendpays") -- **created** (u64, optional): 1-based index indicating order entry was created. -- **updated** (u64, optional): 1-based index indicating order entry was updated. -- **deleted** (u64, optional): 1-based index indicating order entry was deleted. - -If **subsystem** is "invoices": - - **details** (object, optional): - - **status** (string, optional) (one of "unpaid", "paid", "expired"): Whether it's paid, unpaid or unpayable. - - **label** (string, optional): Unique label supplied at invoice creation. - - **description** (string, optional): Description used in the invoice. - - **bolt11** (string, optional): The BOLT11 string. - - **bolt12** (string, optional): The BOLT12 string. - -If **subsystem** is "forwards": - - **details** (object, optional): - - **status** (string, optional) (one of "offered", "settled", "failed", "local\_failed"): Still ongoing, completed, failed locally, or failed after forwarding. - - **in\_channel** (short\_channel\_id, optional): Unique label supplied at invoice creation. - - **in\_htlc\_id** (u64, optional): The unique HTLC id the sender gave this (not present if incoming channel was closed before upgrade to v22.11). - - **in\_msat** (msat, optional): The value of the incoming HTLC. - - **out\_channel** (short\_channel\_id, optional): The channel that the HTLC (trying to) forward to. - -If **subsystem** is "sendpays": - - **details** (object, optional): - - **status** (string, optional) (one of "pending", "failed", "complete"): Status of the payment. - - **partid** (u64, optional): Part number (for multiple parts to a single payment). - - **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment\_hash. - - **payment\_hash** (hash, optional): The hash of the *payment\_preimage* which will prove payment. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "subsystem": "invoices", - "created": 1, - "details": { - "status": "unpaid", - "label": "invlabel", - "bolt11": "lnbcrt420p1pjmxtevsp5d8c6gnaj8lyjy2qly783vklda9dfaqeyzyc37agxxp8h3uguv8pqpp5w6lhwxhqnuew4hle5h7qwjm27zz784mvsrzhmayhscy5t2hy5c4qdqvd9h8ver9wd3sxqyjw5qcqp99qxpqysgq09gxhjhwu9u3z6dlt5ln5f4g8zl78wz4pgh0am3kz54m9lllhqckf4gmhmt2ftrclq5x62zkqmggc7y0ju0ghdfwjz8hyd8l5cqvemgpyyhm6w" - } -} -{ - "subsystem": "invoices", - "updated": 2, - "details": { - "status": "expired" - } -} -{ - "subsystem": "sendpays", - "updated": 2, - "details": { - "status": "complete", - "partid": 0, - "groupid": 1, - "payment_hash": "220dcfcf43e1fab3ce30f70eb943c3ce962393f5a65ced52d749e324b443d19e" - } -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-listinvoice(7), lightning-listforwards(7), lightning-listsendpays(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-waitanyinvoice.7.md b/doc/lightning-waitanyinvoice.7.md deleted file mode 100644 index 826af9f34a85..000000000000 --- a/doc/lightning-waitanyinvoice.7.md +++ /dev/null @@ -1,124 +0,0 @@ -lightning-waitanyinvoice -- Command for waiting for payments -============================================================ - -SYNOPSIS --------- - -**waitanyinvoice** [*lastpay\_index*] [*timeout*] - -DESCRIPTION ------------ - -The **waitanyinvoice** RPC command waits until an invoice is paid, then returns a single entry as per **listinvoice**. It will not return for any invoices paid prior to or including the *lastpay\_index*. - -This is usually called iteratively: once with no arguments, then repeatedly with the returned *pay\_index* entry. This ensures that no paid invoice is missed. The *pay\_index* is a monotonically-increasing number assigned to an invoice when it gets paid. The first valid *pay\_index* is 1. - -- **lastpay\_index** (u64, optional): Ignores any invoices paid prior to or including this index. 0 is equivalent to not specifying and negative value is invalid. -- **timeout** (u64, optional): If specified, wait at most that number of seconds, which must be an integer. If the specified *timeout* is reached, this command will return with an error. You can specify this to 0 so that **waitanyinvoice** will return immediately with an error if no pending invoice is available yet. If unspecified, this command will wait indefinitely. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:waitanyinvoice#1", - "method": "waitanyinvoice", - "params": { - "lastpay_index": null, - "timeout": null - } -} -{ - "id": "example:waitanyinvoice#2", - "method": "waitanyinvoice", - "params": { - "lastpay_index": 3, - "timeout": 0 - } -} -``` - -RETURN VALUE ------------- - -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. -- **status** (string) (one of "paid", "expired"): Whether it's paid or expired. -- **expires\_at** (u64): UNIX timestamp of when it will become / became unpayable. -- **created\_index** (u64): 1-based index indicating order this invoice was created in. *(added v23.08)* -- **amount\_msat** (msat, optional): The amount required to pay this invoice. -- **bolt11** (string, optional): The BOLT11 string (always present unless *bolt12* is). -- **bolt12** (string, optional): The BOLT12 string (always present unless *bolt11* is). -- **updated\_index** (u64, optional): 1-based index indicating order this invoice was changed (only present if it has changed since creation). *(added v23.08)* - -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. - - **payment\_preimage** (secret): Proof of payment. - - **paid\_outpoint** (object, optional): Outpoint this invoice was paid with. *(added v23.11)*: - - **txid** (txid): ID of the transaction that paid the invoice. *(added v23.11)* - - **outnum** (u32): The 0-based output number of the transaction that paid the invoice. *(added v23.11)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "label": "inv1", - "bolt11": "lnbcrt10n1pjmxtsxsp56sn02x8lccjfsvunnhz5858zuyxztug9luy226w4qsmfm4r8pkcspp5gw5r0dw99yf3zqxrg24l8g9m9hun9cu06ldg4rga8s9t9kv8z45sdq8d9h8vvgxqyjw5qcqp99qxpqysgqv537uh2sx8ch640mf4t43t8qjtpg3z7gukgm07tlyq986m7nvsnxkapg37z4vsxtl4thfqzc64anqr83geygkc2xaftxgr97dltqfjqpe3mhja", - "payment_hash": "43a837b5c529131100c342abf3a0bb2df932e38fd7da8a8d1d3c0ab2d9871569", - "amount_msat": 1000, - "status": "paid", - "pay_index": 1, - "amount_received_msat": 1000, - "paid_at": 1706241546, - "payment_preimage": "a0c668998de14b975f33e1060b3efd7efc0bde784ac266ab667a1b2fddab3cd1", - "description": [ - "Inv1." - ], - "expires_at": 1706846342, - "created_index": 1, - "updated_index": 1 -} -{ - "label": "inv4", - "bolt11": "lnbcrt10n1pja0tkmsp57j4z9zwvdsyh57unh3da7aac5z20clfnrwy5nqm6wujaelduw23qpp580mdrwakz9xewc2vhvpucset9gjkgdvyhw7h9frcy2d6p2lwdw2qdq8d9h8vdqxqyjw5qcqp99qxpqysgqtgyzhtxs3p2dyk8wk9q028033303702d2hml4frmu38qe79mrkgzgxvyjmq2q4nhjgcuz3uhmlda3jnhf9w6mj8mj97pkgnda9l5kdcqsdgewf", - "payment_hash": "3bf6d1bbb6114d97614cbb03cc432b2a25643584bbbd72a478229ba0abee6b94", - "amount_msat": 1000, - "status": "paid", - "pay_index": 4, - "amount_received_msat": 1000, - "paid_at": 1708633825, - "payment_preimage": "77336a342dde76050c7ee7fc18599e407dfc1edad3c784ba68e9603004365b94", - "description": "inv4", - "expires_at": 1709238619, - "created_index": 4, - "updated_index": 4 -} -``` - -ERRORS ------- - -The following error codes may occur: - -- 904: The *timeout* was reached without an invoice being paid. - -AUTHOR ------- - -Rusty Russell <> is mainly responsible. - -SEE ALSO --------- - -lightning-waitinvoice(7), lightning-listinvoice(7), lightning-delinvoice(7), lightning-invoice(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-waitblockheight.7.md b/doc/lightning-waitblockheight.7.md deleted file mode 100644 index 31236ab7f976..000000000000 --- a/doc/lightning-waitblockheight.7.md +++ /dev/null @@ -1,75 +0,0 @@ -lightning-waitblockheight -- Command for waiting for blocks on the blockchain -============================================================================= - -SYNOPSIS --------- - -**waitblockheight** *blockheight* [*timeout*] - -DESCRIPTION ------------ - -The **waitblockheight** RPC command waits until the blockchain has reached the specified *blockheight*. - -- **blockheight** (u32): Current blockheight of the blockchain if the value is greater than this number. If it is a present or past block height, then the command returns immediately. -- **timeout** (u32, optional): Only wait up to specified seconds. The default is 60 seconds. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:waitblockheight#1", - "method": "waitblockheight", - "params": { - "blockheight": 99, - "timeout": null - } -} -{ - "id": "example:waitblockheight#2", - "method": "waitblockheight", - "params": { - "blockheight": 103, - "timeout": 600 - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **blockheight** (u32): The current block height (>= *blockheight* parameter). - -If *timeout* seconds is reached without the specified blockheight being reached, this command will fail with a code of `2000`. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "blockheight": 99 -} -{ - "blockheight": 103 -} -``` - -ERRORS ------- - -The following error codes may occur: - -- 2000: Timed out. - -AUTHOR ------- - -ZmnSCPxj <> is mainly responsible. - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-waitinvoice.7.md b/doc/lightning-waitinvoice.7.md deleted file mode 100644 index f9364d93243f..000000000000 --- a/doc/lightning-waitinvoice.7.md +++ /dev/null @@ -1,101 +0,0 @@ -lightning-waitinvoice -- Command for waiting for specific payment -================================================================= - -SYNOPSIS --------- - -**waitinvoice** *label* - -DESCRIPTION ------------ - -The **waitinvoice** RPC command waits until a specific invoice is paid, then returns that single entry as per **listinvoice**. - -- **label** (one of): Unique label of the invoice waiting to be paid.: - - (string) - - (integer) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:waitinvoice#1", - "method": "waitinvoice", - "params": { - "label": "inv2" - } -} -``` - -RETURN VALUE ------------- - -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. -- **status** (string) (one of "paid", "expired"): Whether it's paid or expired. -- **expires\_at** (u64): UNIX timestamp of when it will become / became unpayable. -- **created\_index** (u64): 1-based index indicating order this invoice was created in. *(added v23.08)* -- **amount\_msat** (msat, optional): The amount required to pay this invoice. -- **bolt11** (string, optional): The BOLT11 string (always present unless *bolt12* is). -- **bolt12** (string, optional): The BOLT12 string (always present unless *bolt11* is). -- **updated\_index** (u64, optional): 1-based index indicating order this invoice was changed (only present if it has changed since creation). *(added v23.08)* - -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. - - **payment\_preimage** (secret): Proof of payment. - - **paid\_outpoint** (object, optional): Outpoint this invoice was paid with. *(added v23.11)*: - - **txid** (txid): ID of the transaction that paid the invoice. *(added v23.11)* - - **outnum** (u32): The 0-based output number of the transaction that paid the invoice. *(added v23.11)* - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "label": "inv2", - "bolt11": "lnbcrt10n1pjmxtwjsp5mzvdu6v8hqsf2tlj0nlyks23afqp7ejs444syjxf74p60ztmld8qpp5q4ayz5pys3t0yj0dmkmh7ctarkv9z434paz4u9rdwnj4f43thhaqdq8d9h8vvsxqyjw5qcqp99qxpqysgqn0055ttns6pafsxh6xuqce6e4vz8gtxlzqx0l9d9f5crmqx4jymh4zy9jdaszm0dj89sq39fvhpwcs626dt0n3gw8kassfdehp5sy3sq7fzy3w", - "payment_hash": "057a4150248456f249edddb77f617d1d985156350f455e146d74e554d62bbdfa", - "amount_msat": 1000, - "status": "paid", - "pay_index": 1, - "amount_received_msat": 1000, - "paid_at": 1706241494, - "payment_preimage": "34ccd37cc85e067cb376f9ea8c70d70469f58bf296f2566ed9ad4dfb70971a26", - "description": [ - "Inv2." - ], - "expires_at": 1706846290, - "created_index": 2, - "updated_index": 1 -} -``` - -ERRORS ------- - -On error the returned object will contain `code` and `message` properties, with `code` being one of the following: - -- -32602: If the given parameters are wrong. -- -1: If the invoice is deleted while unpaid, or the invoice does not exist. -- 903: If the invoice expires before being paid, or is already expired. - -AUTHOR ------- - -Christian Decker <> is mainly responsible. - -SEE ALSO --------- - -lightning-waitanyinvoice(7), lightning-listinvoice(7), lightning-delinvoice(7), lightning-invoice(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-waitsendpay.7.md b/doc/lightning-waitsendpay.7.md deleted file mode 100644 index c2ae24b75a1f..000000000000 --- a/doc/lightning-waitsendpay.7.md +++ /dev/null @@ -1,117 +0,0 @@ -lightning-waitsendpay -- Command for sending a payment via a route -================================================================== - -SYNOPSIS --------- - -**waitsendpay** *payment\_hash* [*timeout*] [*partid* *groupid*] - -DESCRIPTION ------------ - -The **waitsendpay** RPC command polls or waits for the status of an outgoing payment that was initiated by a previous **sendpay** invocation. - -If the payment completed with success, this command returns with success. Otherwise, if the payment completed with failure, this command returns an error. - -- **payment\_hash** (hash): The hash of the *payment\_preimage*. -- **timeout** (u32, optional): A timeout in seconds, for this RPC command to return. If the *timeout* is provided and the given amount of time passes without the payment definitely succeeding or definitely failing, this command returns with a 200 error code (payment still in progress). If *timeout* is not provided this call will wait indefinitely. Indicating a *timeout* of 0 effectively makes this call a pollable query of the status of the payment. -- **partid** (u64, optional): Unique ID within this (multi-part) payment. It must match that of the **sendpay** command. -- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay the same payment\_hash. - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:waitsendpay#1", - "method": "waitsendpay", - "params": { - "payment_hash": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "timeout": null, - "partid": null, - "groupid": null - } -} -``` - -RETURN VALUE ------------- - -On success, an object is returned, containing: - -- **created\_index** (u64): 1-based index indicating order this payment was created in. *(added v23.11)* -- **id** (u64): Old synonym for created\_index. -- **payment\_hash** (hash): The hash of the *payment\_preimage* which will prove payment. -- **status** (string) (always "complete"): Status of the payment. -- **created\_at** (u64): The UNIX timestamp showing when this payment was initiated. -- **amount\_sent\_msat** (msat): The amount sent. -- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment\_hash. -- **amount\_msat** (msat, optional): The amount delivered to destination (if known). -- **destination** (pubkey, optional): The final destination of the payment if known. -- **updated\_index** (u64, optional): 1-based index indicating order this payment was changed (only present if it has changed since creation). *(added v23.11)* -- **completed\_at** (number, optional): The UNIX timestamp showing when this payment was completed. -- **label** (string, optional): The label, if given to sendpay. -- **partid** (u64, optional): The *partid*, if given to sendpay. -- **bolt11** (string, optional): The bolt11 string (if pay supplied one). -- **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**. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "created_index": 1, - "id": 1, - "payment_hash": "072b1d20f4a7c757a56d5fb10eaed40b58b68849da41fe396cdbd2d81692875a", - "groupid": 1, - "updated_index": 1, - "destination": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59", - "amount_msat": 11000000, - "amount_sent_msat": 11000000, - "created_at": 1706152930, - "completed_at": 1706152933, - "status": "complete", - "payment_preimage": "af7ba559629f719c04c43a82767fe3622790a539164d6270db07f765203e574b", - "bolt11": "lnbcrt110u1pjmr5lzsp5sfjyj3xn7ux592k36hmmt4ax98n6lgct22wvj54yck0upcmep63qpp5qu436g855lr40ftdt7csatk5pdvtdzzfmfqluwtvm0fds95jsadqdpq0pzk7s6j8y69xjt6xe25j5j4g44hsatdxqyjw5qcqp99qxpqysgquwma3zrw4cd8e8j4u9uh4gxukaacckse64kx2l9dqv8rvrysdq5r5dt38t9snqj9u5ar07h2exr4fg56wpudkhkk7gtxlyt72ku5fpqqd4fnlk" -} -``` - -ERRORS ------- - -On error, and even if the error occurred from a node other than the final destination, the route table will no longer be updated. Use the *exclude* parameter of the `getroute` command to ignore the failing route. - -- -1: Catchall nonspecific error. -- 200: Timed out before the payment could complete. -- 202: Unparseable onion reply. The *data* field of the error will have an *onionreply* field, a hex string representation of the raw onion reply. -- 203: Permanent failure at destination. The *data* field of the error will be routing failure object. -- 204: Failure along route; retry a different route. The *data* field of the error will be routing failure object. -- 208: A payment for *payment\_hash* was never made and there is nothing to wait for. -- 209: The payment already failed, but the reason for failure was not stored. This should only occur when querying failed payments on very old databases. - -A routing failure object has the fields below: - -*erring\_index*: The index of the node along the route that reported the error. 0 for the local node, 1 for the first hop, and so on. -*erring\_node*: The hex string of the pubkey id of the node that reported the error. -*erring\_channel*: The short channel ID of the channel that has the error (or the final channel if the destination raised the error). -*erring\_direction*: The direction of traversing the *erring\_channel*: -*failcode*: The failure code, as per BOLT #4. -*failcodename*: The human-readable name corresponding to *failcode*, if known. - -AUTHOR ------- - -ZmnSCPxj <> is mainly responsible. - -SEE ALSO --------- - -lightning-sendpay(7), lightning-pay(7) - -RESOURCES ---------- - -Main web site: diff --git a/doc/lightning-withdraw.7.md b/doc/lightning-withdraw.7.md deleted file mode 100644 index a22ab6d88257..000000000000 --- a/doc/lightning-withdraw.7.md +++ /dev/null @@ -1,99 +0,0 @@ -lightning-withdraw -- Command for withdrawing funds from the internal wallet -============================================================================ - -SYNOPSIS --------- - -**withdraw** *destination* *satoshi* [*feerate*] [*minconf*] [*utxos*] - -DESCRIPTION ------------ - -The **withdraw** RPC command sends funds from Core Lightning's internal wallet to the address specified in *destination*. - -- **destination** (string): Any Bitcoin accepted type, including bech32. -- **satoshi** (msat\_or\_all): The amount to be withdrawn from the internal wallet (expressed, as name suggests, in satoshi). The string *all* can be used to specify withdrawal of all available funds (but if we have any anchor channels, this will always leave at least `min-emergency-msat` as change). Otherwise, it is in satoshi precision; it can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. -- **feerate** (feerate, optional): Used for the withdrawal as initial feerate. The default is *normal*. -- **minconf** (u16, optional): Minimum number of confirmations that used outputs should have. The default is 1. -- **utxos** (array of outpoints, optional): Specifies the utxos to be used to be withdrawn from, as an array of `txid:vout`. These must be drawn from the node's available UTXO set.: - - (outpoint, optional) - -EXAMPLE JSON REQUEST --------------------- - -```json -{ - "id": "example:withdraw#1", - "method": "withdraw", - "params": { - "destination": "bcrt1qjc7j2l5es4haw35c9jzm8dfm763ng5djp8f0s0", - "satoshi": 555555, - "feerate": null, - "minconf": null, - "utxos": null - } -} -{ - "id": "example:withdraw#2", - "method": "withdraw", - "params": { - "destination": "bcrt1q66ukn5mdllddnp53j0mx8mjgph7uwdygn0uy45", - "satoshi": "all", - "feerate": "20000perkb", - "minconf": 0, - "utxos": [ - "218390859cf94d869e33f69161f4187a98f691afe868c20811528f589e90a61f:1" - ] - } -} -``` - -RETURN VALUE ------------- - -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. - -EXAMPLE JSON RESPONSE ---------------------- - -```json -{ - "tx": "0200000001ef28647baa13cc4c03b8a58c8bd08b69de434c22ff591eb68171ae992e3d816d0000000000fdffffff02237a080000000000160014963d257e99856fd746982c85b3b53bf6a33451b24d6808000000000022512063ffee4ea7d51e6cadf9086e286a2527922aaa25b8c53aebf32fa32a0a627f5a66000000", - "txid": "ccb97d7dc695cabb78b217c0b27d7d00d2941966199480e6443e0680d24d69eb", - "psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQDeAgAAAAABAWPCRda9hy4QKqUEmtb7gK7SAqzh1xBP8nZ7PCj+7+JDAAAAAAD9////Akf0EAAAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WUs/fQpAQAAABYAFOIj6yaI/g85utJBtkPPdK1X59cfAkcwRAIgH7J57HuUTpnCbDrDqE8W7ryuCXk+i/TszQ/NF55lWncCIDeN4y+EzIDP3l2XO5/wjk98krYqnzvEhrStk+0+fTowASEC6Ng5r5KTNIXBRRvjivsd8SKnHF59r/ViDj2+CLJVb75lAAAAAQEfR/QQAAAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZSICA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPRzBEAiBY0urYSHLnnXaAJH7yaGfvGmm+VuNCNIBhQaJU6iDNEgIgA7EASW+V00Su+lRQAE3Qbe4wavLq7l6Jn2vR+6Snyd0BIgYD10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8IAfrZCgAAAAABDiDvKGR7qhPMTAO4pYyL0Itp3kNMIv9ZHraBca6ZLj2BbQEPBAAAAAABEAT9////AAEDCCN6CAAAAAAAAQQWABSWPSV+mYVv10aYLIWztTv2ozRRsgz8CWxpZ2h0bmluZwQCAAEAAQMITWgIAAAAAAABBCJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aIQeRRTKBKkQKTXZscc05GTaUo0CuEeAS5boa2e+6bnbKUwkAwsyrFwIAAAAA" -} -{ - "tx": "02000000011fa6909e588f521108c268e8af91f6987a18f46191f6339e864df99c859083210100000000fdffffff0158070f0000000000160014d6b969d36dffdad9869193f663ee480dfdc7348867000000", - "txid": "ad9a712a201214c68c39ca5be68c9d153d1cac91e540d88aa3207b241e23acf8", - "psbt": "cHNidP8BAgQCAAAAAQMEZwAAAAEEAQEBBQEBAQYBAwH7BAIAAAAAAQD9ZQECAAAAAAEBVa+m1d1amChv4Dwq1rVoS4KSm0BUUnVa3fUYcB3dH9oAAAAAAP////8CECcAAAAAAAAiUSBXeaBg8gDUDo+HGkDrkWFMxb+m0KX4UuBTQAp/7/hhUOEPDwAAAAAAIlEg7tdFgE2peEzCA/Vj76mf+lT98BsTe8lk5jwxJAcP++YEAEcwRAIgPsWO/4IxeW6OclDdXVnwL99X7B18sRlxgFqyvUAzN7gCIGOQOq0wZ6bV+wdYQP+9sH8IkfmqWZbQRRDkZEgfcprMAUcwRAIgb5/dI4+uVhluQjSA2q/3oAGxZd4vYzQWexfmcRQML7ECIFfgRwCaHYdyu5/H5moOPlfQlLc2gPgB6bgtfNSfRA6jAUdSIQIyQmbehAOzqxV6CfH3hNWHr2GDHJmMFRvMIbt0wrIxSyEC4704AJhmydqOxKqZzE6pxsDdRt8Vxh7wzh8nEpFxTldSrgAAAAABASvhDw8AAAAAACJRIO7XRYBNqXhMwgP1Y++pn/pU/fAbE3vJZOY8MSQHD/vmAQ4gH6aQnliPUhEIwmjor5H2mHoY9GGR9jOehk35nIWQgyEBDwQBAAAAARAE/f///wETQL0MqyYsx9Z9q14BhByMgWLW4oJHOqED5qcZ3wyJ4eDuLYfNGq6Ck30dAqFzJL4VhZLSuv87zN/1AEDNMl2DmTohFl03KAgp8YbLmVzcy/I4q0VkATk5c1E5YySjZXXfNN3/CQAHHEnKAAAAAAAiAgK5wMaEThKlMclo5VxVB47BbZv3a+kpD9h9HMpytIOaFwjWuWnTBAAAAAEDCFgHDwAAAAAAAQQWABTWuWnTbf/a2YaRk/Zj7kgN/cc0iAz8CWxpZ2h0bmluZwQCAAEA" -} -``` - -ERRORS ------- - -On failure, an error is reported and the withdrawal transaction is not created. - -- -1: Catchall nonspecific error. -- 301: There are not enough funds in the internal wallet (including fees) to create the transaction. -- 302: The dust limit is not met. -- 313: The `min-emergency-msat` reserve not be preserved (and we have anchor channels). - -AUTHOR ------- - -Felix <> is mainly responsible. - -SEE ALSO --------- - -lightning-listfunds(7), lightning-fundchannel(7), lightning-newaddr(7), lightning-txprepare(7), lightning-feerates(7) - -RESOURCES ---------- - -Main web site: