Commit Graph

96 Commits

Author SHA1 Message Date
daywalker90
54e1c78e46 msggen: add renepaystatus method
Changelog-None
2024-05-13 20:06:40 +02:00
daywalker90
9538ecccad msggen: add renepay method
Changelog-None
2024-05-13 20:06:40 +02:00
daywalker90
5c0f25f916 msggen: add plugin method
Changelog-None
2024-05-13 20:06:40 +02:00
Rusty Russell
cb2c4963f2 bolt12: allow first_node_id in blinded path to be a scid.
We don't actually support it yet, but this threads through the type change,
puts it in "decode" etc.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-12 19:11:43 -05:00
Ken Sedgwick
e3c600b0c8 logging: add TRACE between DEBUG and IO
By moving super-noisy debugging logging to new TRACE level we can
make long-term logging at DEBUG possible w/o removing any logging.

Addresses ([#7279])

Related Issues:
https://github.com/ElementsProject/lightning/issues/6927
https://github.com/chrisguida/smaug/issues/34
https://github.com/ZmnSCPxj/clboss/issues/194
2024-05-08 21:05:49 -05:00
daywalker90
14fea4b72b msggen: add missing bkpr-* methods
Changelog-None
2024-04-25 13:21:25 +02:00
daywalker90
3189ff6a6d msggen: add getlog method
Changelog-None
2024-04-25 13:21:25 +02:00
ShahanaFarooqui
cf5e8822b9 plugin/clnrest: Adding new config param as clnrest-swagger-root
- Updated config params and plugin
- Updated documentation

Changelog-Added: Added a new configuration for clnrest plugin to change the default Swagger UI path from `/` to custom url.
2024-04-25 13:21:25 +02:00
daywalker90
7317bb174f msggen: add delforward method
Changelog-None
2024-04-24 11:47:22 +02:00
daywalker90
448f4c0cfb msggen: add low level fundchannel methods
Changelog-None
2024-04-23 18:43:03 +02:00
daywalker90
c80a70de25 msggen: add methods autoclean-once and autoclean-status, fix bkpr-listincome
Changelog-None
2024-04-23 17:47:56 +02:00
daywalker90
2d0778ec38 msggen: add delpay method 2024-04-22 13:28:58 +02:00
daywalker90
fe180e189c msggen: add low level openchannel methods
Changelog-None
2024-04-22 09:04:43 +09:30
daywalker90
ada4de1588 msggen: fix walk through nested json schemas
Changelog-None
2024-04-18 18:16:30 +02:00
daywalker90
507c2de9c1 newaddr: various fixes for msggen and docs
Changelog-None
2024-04-17 14:47:52 +02:00
daywalker90
58b78d2b32 schema: add multifundchannel generation
Changelog-None
2024-04-17 13:06:02 +02:00
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
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
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
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
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
Christian Decker
5924509813 rpc: Regenerate derived files after adding bkpr-listincome 2024-02-01 20:00:52 +01:00
Rusty Russell
dd59d0617d lightningd: expose last_stable_connection in RPC.
This isuseful to find completely dead channels which are worthy of
closing.

Changelog-Added: JSON-RPC: `listpeerchannels` field `last_stable_connection` showing when we last held an established channel for a minute or more.
Changelog-Added: JSON-RPC: `listclosedchannels` field `last_stable_connection` showing when we last held an established channel for a minute or more.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-31 14:47:33 +10:30
Christian Decker
45b298fca4 msggen: Make ChannelTypeName a native enum
It fails because this is an array of enum values, which is a
combination we hadn't seen before. Replacing this with a manually
managed enum, since it is likely we'll want to reuse it in the future.
2024-01-29 13:40:34 +10:30
Rusty Russell
c3f33eb6dd listpeerchannels: show gossip updates.
This is redundant if it's a public channel, but vital if it's not.  Publishing unconditionally makes
it easier for gossmap: we create a local modification all the time, even if redundant (and we can
have the actual capacity ceiling accurate in this case, since we know it for local channels).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Changelog-Added: JSON-RPC: `listpeerchannels` now shows gossip update contents (even if channel unannounced).
2023-12-14 09:16:56 +10:30
Christian Decker
94f4d75006 msggen: Add Wait method to managed API
Fixes #6792

Changelog-Added: Cln-RPC: Add `wait` system to cln-rpc and cln-grpc.
2023-11-16 09:02:33 +01:00
Christian Decker
bdfd2d5fda msggen: Add FetchInvoice method to Rust and grpc bindings
Closes #6844

Changelog-Added: Cln-RPC: Add `fetchinvoice` method to cln-rpc and cln-grpc.
2023-11-16 09:02:33 +01:00
niftynei
ecb8d9d71f dual-fund: add new open-commit-ready state
From the spec:

	Once peers are ready to exchange commitment signatures, they must remember
	the details of the funding transaction to allow resuming the signatures
	exchange if a disconnection happens.

Basically this means we add channels to the database before we've gotten
commitments for them; it's nice that there's now a state for commitments
recevied but we now save the channel prior to that.

This commit makes it possible to track the pre-commit-rcvd but not quite
open-init state.
2023-11-02 19:32:05 +10:30
Rusty Russell
f2162bf202 lightningd: add ordering and pagination to listforwards.
Changelog-Added: JSON-RPC: `listforwards` new parameters `index`, `start` and `limit`.
2023-10-28 15:48:26 +10:30
Rusty Russell
1d8af90b56 listforwards: add created_index and updated_index fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listforwards` fields `created_index` (old: `id`) and `updated_index`.
2023-10-28 15:48:26 +10:30
Rusty Russell
c70a326f1f lightningd: add ordering and pagination to listsendpays.
Changelog-Added: JSON-RPC: `listsendpays` new parameters `index`, `start` and `limit`.
2023-10-28 15:48:26 +10:30
Rusty Russell
00ac1a9475 listsendpays: add created_index and updated_index fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `sendpay`, `listsendpays`, `delpay` new fields `created_index` (old: `id`) and `updated_index`.
2023-10-28 15:48:26 +10:30
Aditya Sharma
b0c603581f doc/lightning-decode.7: Update the doc 2023-10-27 16:05:28 +10:30
Chris Guida
88ac2dcb7e add test, update schemas, fix warning_custom_fallbacks 2023-10-26 19:11:17 +10:30
niftynei
411bb2884a fallback: json add fallback cleanup
Expand to handle P2TR addresses, use the common script encoding utility
function instead of reimplementing it.
2023-10-26 19:11:17 +10:30
Peter Neuroth
1b5dc2e055 msggen: Add datastoreusage command
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2023-10-26 12:58:04 +10:30
Christian Decker
dfea5fbe6d grpc: Add WaitBlockHeight method to grpc interface 2023-10-24 10:24:52 +10:30
Rusty Russell
5b9b056853 doc: introduce new state DUALOPEND_OPEN_COMMITTED.
This is the variant of DUALOPEND_OPEN_INIT which you see once
the channel is in the db: we'll be adding it next, but to reduce
clutter the docs are added as a separate commit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Christian Decker
9074341ef6 msggen: Add staticbackup call to list of managed methods
Changelog-Added: cln-grpc: Added `staticbackup` support to cln-grpc
2023-08-06 12:34:36 +09:30
Dusty Daemon
4628e3ace8 channeld: Code to implement splicing
Update the lightningd <-> channeld interface with lots of new commands to needed to facilitate spicing.

Implement the channeld splicing protocol leveraging the interactivetx protocol.

Implement lightningd’s channel_control to support channeld in its splicing efforts.

Changelog-Added: Added the features to enable splicing & resizing of active channels.
2023-07-31 21:00:22 +09:30
Christian Decker
7b8ea7f60a msggen: Add two missing fields to the listpays schema
The fields were missing because they weren't annotated with a type and
a description. Adding those fixes them.

Changelog-Fixed: msggen: `listpays` now includes the missing `amount_msat` and `amount_sent_msat` fields
No-schema-diff-check: fields were always there, just undocumented!
2023-07-27 12:40:28 +09:30
ff
6920e36135 added listhtlcs model 2023-07-24 09:07:24 +09:30
Rusty Russell
d25a8ca0fd lightningd: expose created_index and updated_index fields.
If you miss a wait event, you can catch up by doing listinvoices and
getting the max of these fields.  It's also a good debugging clue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-23 13:48:37 +09:30
Rusty Russell
284262d006 listinvoices: add limit param.
Changelog-Added: JSON-RPC: `listinvoices` has `limit` parameter for listing control.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-23 13:48:37 +09:30
Rusty Russell
16c133746b listinvoices: add index and start params.
Now we have defined ordering, we can add a start param.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listinvoices` has `index` and `start` parameters for listing control.
2023-07-23 13:48:37 +09:30
Rusty Russell
b529e79621 lightningd: setchannel can set ignorefeelimits.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `setchannel` adds a new `ignorefeelimits` parameter to allow peer to set arbitrary commitment transaction fees on a per-channel basis.
2023-07-22 13:11:08 +09:30
Rusty Russell
8910529e6a lightningd: expose ignore_fee_limits field in listpeerchannels.
Changelog-Added: JSON-RPC: `listpeerchannels` has a new field `ignore_fee_limits`
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-22 13:11:08 +09:30
Greg Sanders
4b70736d13 Support p2tr deposit addresses
Changelog-Added: JSON-RPC: newaddr: p2tr option to create taproot addresses.
Changelog-Changed: Wallet: we now use taproot change addresses.
2023-07-11 11:41:15 +09:30