Commit Graph

1373 Commits

Author SHA1 Message Date
Rusty Russell
a55c0d005d spelling: its listinvoices and listinvoicerequests
Not singular (though we used to have a listinvoice, removed in v0.6.1).

Reported-by: "Plant" via email
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-20 10:49:50 -04:00
daywalker90
507c2de9c1 newaddr: various fixes for msggen and docs
Changelog-None
2024-04-17 14:47:52 +02:00
ShahanaFarooqui
aff8f0ff5e doc: Updated dev command warning
Changelog-Changed: Documentation: Merged `example_json_request` and `example_json_response` in a single `json_examples` array to maintain the request and its corresponding response together.
2024-04-04 13:16:27 +10:30
ShahanaFarooqui
9e782f491b doc: updated schemas for json_examples 2024-04-04 13:16:27 +10:30
Rusty Russell
3483bff66b doc: document the rune conditions for parsing invoice strings.
This pre-promises an implementation, which we are now going to write!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-27 16:09:23 +10:30
Rusty Russell
22b713d6b7 plugins: remove allowance for missing JSON id in commando.
Changelog-Removed: Plugins: no longer allow missing `id` field in commando requests (deprecated v23.02, EOL v24.02)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
9960454159 lightningd: remove createrune restrictions as strings.
Changelog-Removed: JSON-RPC: `createrune` restrictions as raw strings (use arrays) (deprecated v23.05, EOL 24.02).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
4e086f28c3 lightningd: remove channels from listpeers.
Changelog-Removed: JSON-RPC: `listpeers` `channels` (deprecated v23.02, EOL v24.02)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
99db9b795e lightningd: remove handling of invalid sendpay route first channel
Changelog-Removed: JSON-RPC: `sendpay` ignoring first channel (deprecated v0.12, EOL v24.02)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
ba922f9160 lightningd/connectd: remove --experimental-websocket-port
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Config `experimental-websocket-port` (deprecated 23.08, EOL 24.02)
2024-03-25 15:02:35 +10:30
Rusty Russell
109b915d57 lightningd: remove funding_locked from channel_opened notification.
Changelog-Removed: Plugins: `funding_locked` from channel_opened notification (deprecated v22.11, EOL v24.02)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
52895ac1eb lightningd: remove obsolete feerate output fields.
Changelog-Removed: JSON-RPC: `feerates` output fields `delayed_to_us` and `htlc_resolution`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
094f43c207 autoclean: remove deprecated configs.
Changelog-Removed: Config: `autocleaninvoice-cycle` and `autocleaninvoice-expired-by` (deprecated v22.11, EOL v24.02)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
ed1393b3e1 doc: correctly remove generated schemas on make clean.
We also remove manpages, since they're no longer in git anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
7e0e39460b lightningd: remove delexpiredinvoice
Changelog-Removed: JSON-RPC: `delexpiredinvoice` (deprecated v22.11, EOL v24.02)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
57e594762e lightnind: remove deprecated feerate names.
Changelog-Removed: JSON-RPC feerates by internal names ("opening", "mutual_close", "delayed_to_us", "htlc_resolution", "penalty", "min_acceptable", "max_acceptable") (deprecated v23.05, EOL v24.02).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Rusty Russell
6a2d949250 lightningd: remove failure_code from invoice hook and htlc_accepted hook.
These were deprecated in v22.08 (invoice hook) and v0.8 (htlc_accepted hook), and
marked EOL in v23.02.

*PLEASE* complain if this breaks things for you: it's kind of a test canary of
the deprecation system!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Plugins: `invoice_payment` and `htlc_accepted` hook `failure_code` response (derepcated v22.08 and v0.8, EOL v23.02)
2024-03-25 15:02:35 +10:30
bitkarrot
e3315329e1 doc: add dev-forget-channel to Makefile 2024-03-21 20:12:37 -07:00
bitkarrot
99aa519457 doc: Add json schema for dev-forget-channel 2024-03-21 20:12:37 -07:00
Rusty Russell
1321d35855 multifundchannel: fix amount argument in schema & docs (it can be "all").
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-21 19:52:56 +10:30
Rusty Russell
e0e879c003 common: remove type_to_string files altogther.
This means including <common/utils.h> where it was indirectly included.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-20 13:51:48 +10:30
Rusty Russell
4816550b0f lightningd: check rune parameter names with and without punctuation.
Changelog-Changed: runes: named parameters (e.g. `pnameamountmsat`) no longer need to remove underscores (i.e. `pnameamount_msat` now works as expected).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-20 11:18:36 +10:30
Rusty Russell
7af045df4e pyln-testing: use DEBUG_LIGHTNINGD to start gdb on lightningd during test.
We do this for DEBUG_SUBD already, but I wanted to debug the main lightningd.

(We rename --debugger to the more accurate --dev-debug-self)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-20 11:18:36 +10:30
Rusty Russell
4a9b9b8b29 pay: add partial_msat option to make partial payment.
a.k.a. "Pay with a friend!".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `pay` has a new parameter `partial_msat` to only pay part of an invoice (someone else presumably will pay the rest at the same time!)
Suggested-by: Calle
2024-03-20 10:58:28 +10:30
ShahanaFarooqui
9b83b8b967 doc: Delete markdowns as they will be generated by scripts now
This PR will generate doc/lightning-*.md file for rpc commands. It will get the information from consolidated doc/schemas/lightning-*.json file and use it to generate markdown file for RPC commands.

Changelog-Changed: Documentation: great documentation rewrite, all reference pages now generated from the fully-tested JSON schemas and include examples.
2024-03-19 14:58:59 +10:30
ShahanaFarooqui
f72b0fdabd docs: Updates script and fixed test to generate lightning-sql
- Updated doc/Makefile for generating schemas/lightning-sql.json
    - Read the lightning-sql template from schemas/lightning-sql-template.json
    - Generate sql tables data and merge it with json object read from above template
    - Save final merged object in schemas/lightning-sql.json
- Updated doc/Makefile to auto generate lightning-sql.7.md and lightning-sql.7
- Deleted schemas/lightning-sql.json and adding it into .gitignore
- Added lightning-sql specific titles in the fromschema.py script
- Fixed test_sql by changing the sequence for listpeerchannels `reestablished` field
- Ignoring lightning-sql.json for msggen schema.json because it is auto generated by sql plugin and lightning-sql-template.json.
2024-03-19 14:58:59 +10:30
ShahanaFarooqui
7e33a10425 doc: Schema generation instructions update 2024-03-19 14:58:59 +10:30
ShahanaFarooqui
2c99f2e100 doc: Remove unused request.json and schema.json files 2024-03-19 14:58:59 +10:30
ShahanaFarooqui
5242523fc7 doc: updated markdown files 2024-03-19 14:58:59 +10:30
ShahanaFarooqui
418ecf3e42 script: Update scripts
- Update `make doc-all` script
- `fromschema.py` script
    - Updated to generate whole doc/lightning-*.md via doc/schemas/lightning-*.json file
    - Updated to print request params
    - Added `oneOfMany` condition for request params
    - Added `pairedWith` condition for request params
    - Added `dependentUpon` condition for request params
    - Updated for pre and post_return_value for response
    - Hiding `hidden` fields
    - `descriptions` are array now
    - Unified gaps between titles
    - Added default key-value pair

- script: msggen, sql-schema, listconfig and pyln-testing script updates

This does not add created markdowns for cleaner review. We will add the markdown files in a separate commit.
2024-03-19 14:58:59 +10:30
ShahanaFarooqui
4c370022d0 script: Updated sql-schema_gen and documented it's jq dependency. 2024-03-19 14:58:59 +10:30
ShahanaFarooqui
04884ca664 doc: Merge request and schema jsons in a single file
Merge information from `*.request.json` & `*.schema.json`. Also consolidate remaining details from `*.md` files and create a single file in schemas folder.
2024-03-19 14:58:59 +10:30
ShahanaFarooqui
b0da807700 doc: Markdown cleanup
This commit will remove parameter descriptions from RPC markdown but we will fix it in next commits by reading these descriptions directly from json.

- Removing parameter description text
- Adding/removing newlines for cleaner formatting
- Adding ERRORS title wherever needed
- Updating titles for consistency
- Adding resources links
2024-03-19 14:58:59 +10:30
ShahanaFarooqui
fdc2dbdbc3 doc: Updated schemas *.schema.json
- Makes emergency schema stricter
- Fixes some formatting
2024-03-19 14:58:59 +10:30
Rusty Russell
d7cc1e4a17 doc: Updated parameter descriptions for *.request.json
Added descriptions for rpc command parameters

This also performs the following fixes:
1. delforward parameters are compulsory (required).
2. disableinvoicerequest request added `added` field.
3. invoice request order fixed (label then description, not vice-versa!).
4. listpeers log levels are a proper enum
5. description parameter documented for sendonion requests.
6. deprecatred amount_msat removed from sendpay request.
7. sendpay request partid type fixed to u64 (was u16!)
8. sendpay request localinvreqid type tightened to hash (was hex)
9. sendpay request payment_metadata and description fields documented.
10. sendpsbt request reserve type fixed to u32 (was boolean)
11. utxopsbt request satoshi type fixed to msat_or_all (was msat)
12. withdraw request parameter satoshi is compulsory (required)
13. fundchannel_start request amount is sat, not msat_or_all.
14. openchannel_init request amount is sat, not msat
15. openchannel_init close_to is a string, not hex.
16: invoice labels can be strings OR numbers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-19 14:58:59 +10:30
ShahanaFarooqui
d9dd3a1840 doc: Adding missing *.schema.json
Adding missing *.schema.json files for rpc commands to create consolidated json files.
Updating and deleting other as per requirement.
2024-03-19 14:58:59 +10:30
ShahanaFarooqui
e8c8c8887b doc: Adding missing *.request.json
Some rpc commands did not have their corresponding *.request.json files to generate the consolidated json
2024-03-19 14:58:59 +10:30
Rusty Russell
ee00f84fed JSON: don't return a raw result string for "stop" and "recover".
In general, results should always be an object, so we can add new fields
later (e.g. warnings!).  But we violated this for "stop", and when "recover"
used the same infrastructure, it started doing the same thing.

I'm assuming nobody cares, so we don't need to do a deprecation cycle.

Changelog-Changed: JSON-RPC: `stop` and `recover` now return a JSON object (not a raw string!) like every other command does.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-19 14:58:59 +10:30
Aditya Sharma
9acc1d7db6 peer_control: Add lost_state param inside listpeerchannels rpc, which'd help us identify if we've fall behind or lost some state. 2024-02-16 22:17:46 +01:00
Erik De Smedt
7827a26685 Docfix: connec-notification
The previous example was updated.
2024-02-16 17:54:31 +01:00
shuoer86
6c04a6c15a doc: fix typos 2024-02-11 11:27:41 +01:00
Rusty Russell
689e596036 options: make anchors enabled by default, ignore experimental-anchors.
We still want to test non-anchor channels, as we still support them, but
we've made it non-experimental.  To test non-anchor channels, we
use dev-force-features: -23.

Changelog-Added: Protocol: `option_anchors_zero_fee_htlc_tx` enabled, no longer experimental.
Changelog-Changed: Config: `experimental-anchors` now does nothing (it's enabled by default).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


Header from folded patch 'fixup!_options__make_anchors_enabled_by_default,_ignore_experimental-anchors.patch':

fixup! options: make anchors enabled by default, ignore experimental-anchors.
2024-02-08 06:32:01 +10:30
Christian Decker
99aa1e827e msggen: Fix the offer schemas
I had to do some trickery with the interchangeability between string
and int, but now it works as expected.
2024-02-07 20:38:29 +01:00
Christian Decker
09d32ecff5 doc: Fix schema for offer.amount, it can be a non-BTC unit too
The `amount` field is intended to be either a native unit (`msat`,
`sat` or `btc`) or it can also be a non-native unit that needs to be
converted into native when creating the invoice. As such limiting the
`amount` to only be native is very restrictive.
2024-02-07 20:38:29 +01:00
vacwmX
317cf4d430 feat: added listoffers grpc command 2024-02-07 20:38:29 +01:00
vacwmX
d1052e3924 doc: adding schema to create offer requests 2024-02-07 20:38:29 +01:00
vacwmX
3ae3243517 fix: fixing start_any_period type for offer recurrence 2024-02-07 20:38:29 +01:00
Alex Myers
61e1e0c89c doc: update reckless documentation 2024-02-07 13:24:34 +01:00
Rusty Russell
f56b9e9b73 lightningd: deprecate @-prefix hack for offer recurrence_base.
Christian points out that this makes the type harder, and it's just awkward.

Changelog-EXPERIMENTAL: JSON-RPC: Deprecated `offer` parameter `recurrence_base` with `@` prefix: use `recurrence_start_any_period`.
Changelog-EXPERIMENTAL: JSON-RPC: Added `offer` parameter `recurrence_start_any_period`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-02-07 09:21:00 +10:30
Rusty Russell
07cd4a809b gossipd: remove spam handling.
We weakened this progressively over time, and gossip v1.5 makes spam
impossible by protocol, so we can wait until then.

Removing this code simplifies things a great deal!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Protocol: we no longer ratelimit gossip messages by channel, making our code far simpler.
2024-02-04 09:24:44 +10:30