Commit Graph

282 Commits

Author SHA1 Message Date
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
Harshit933 85b79bc2e1 fix : implements the `bkpr-listincome` plugin for grpc interface.
Changelog-added support for the `bkpr-listincome` for grpc interface

Signed-off-by: harshit933 <harshitverma933@gmail.com>
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
Rusty Russell 81a280d8a3 lightningd: expose `reestablished` field.
This is useful to see if we've really made progress, or just bounced
off the peer (e.g. it doesn't know the channel, or we have fallen
behind somehow).

Changelog-Added: JSON-RPC: `listpeerchannels` new field `reestablished` set once we've exchanged `channel_reestablish` messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-31 14:47:33 +10:30
Erik De Smedt 72687d2a75 Schema: Add schema's for detailed fundchannel methods 2024-01-30 18:44:56 +01:00
Rusty Russell 17d0d006d2 fundchannel_start & multifundchannel: add channel_type.
Let's tell the caller what channel_type they got!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `fundchannel`, `multifundchannel`, `fundchannel_start` and `openchannel_init`: new field `channel_type`.
2024-01-29 13:40:34 +10:30
Rusty Russell 3c2a57598f spenderp: add channel_type parameter to fundchannel / multifundchannel.
And add a request schema for multifundchannel.

Changelog-Added: JSON-RPC: `fundchannel` and `multifundchannel` now take an optional `channel_type` parameter.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-29 13:40:34 +10:30
Rusty Russell e749aebbff fundchannel_start / openchannel_init: add a channel_type parameter to force channel type.
And add request schemas for openchannel_init and fundchannel_start.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `fundchannel_start` and `openchannel_init` now take an optional `channel_type` parameter.
2024-01-29 13:40:34 +10:30
Rusty Russell dadbdf488c schemas: deprecated is now a range.
Don't assume removal is +6 months, but have a start deprecation/end support range.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-26 10:30:22 +10:30
Rusty Russell ba2c912a39 config: remove disable-ip-discovery
Changelog-Removed: Config: `disable-ip-discovery` (deprecated in v23.02): use `announce-addr-discovered`
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-26 10:30:22 +10:30
Rusty Russell f342630b92 wallet: remove P2SH support.
Seriously, it's taproot time, let's get rid of p2sh wrapped segwit.

Changelog-Removed: wallet: removal of p2sh-segwit addresses; newaddr won't issue them, we won't watch them for new funds (deprecated in *23.02*)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-26 10:30:22 +10:30
Rusty Russell c8e30de513 topology: deprecate overriding `active` in `listchannels` with `listpeerchannels` info.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: `listchannels` no longer uses local knowledge to set `active` to false if disconnected.
2023-12-14 09:16:56 +10:30
Rusty Russell 58a1c4c012 topology: don't show private nodes in listchannels.
This alters a few remaining tests, as well.

[ Inclused even more test fixes from Alex Myers <alex@endothermic.dev>! ]

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: JSON-RPC: `listchannels` listing private channels: use listpeerchannels
2023-12-14 09:16:56 +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 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 62de535619 listpeerchannels: only add the scratch_txid if it exists
Changelog-Changed: RPC `listpeerchannels`.`inflights` may sometimes not include `scratch_txid` (mandatory -> optional)
2023-11-02 19:32:05 +10:30
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
Alex Myers 10bac49dac ld: add commit-fee-offset option, update config schema
Changelog-Added: Added option --commit-fee-offset to potentially reduce feerate update disagreements
2023-11-02 09:49:59 +10:30
Rusty Russell 1d677bcba7 addpsbtoutput: allow command to specify output address.
Default is still to generate it.

Changelog-None: Introduced this release anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-11-01 14:11:28 +10:30
Rusty Russell 62ddf84b4f doc: document wait for new subsystems, add request & response schemas.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-28 15:48:26 +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
Chris Guida fc4b2f864e add invoices-onchain-fallback config option and warnings
Changelog-Added: Config: `invoices-onchain-fallback` to automatically add an onchain p2tr address to invoices, and allow that for payment.
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 aab948e538 datastore: Add datastoreusage command
datastoreusage returns the total_bytes that are stored under a given
{Key} or from root. {Key} is the entry point from which we begin to
traverse the datastore.

Changelog-Added: JSON-RPC: `datastoreusage`: returns the total bytes that are stored under a given key.

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
Dusty Daemon bc9333ac1e addpsbtoutput: New onchain command for PSBT output
Also added splice_out tests that use the new PSBT command.

ChangeLog-Added: New `addpsbtoutput` command for creating a PSBT that can receive funds to the on-chain wallet.
2023-10-03 10:12:39 +02:00
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
Rusty Russell eaf76ddbd6 doc: fix listpeerchannels schema to allow CHANNELD_AWAITING_SPLICE in state.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Rusty Russell 64ab7c0c1d lightningd: add --developer runtime option.
Currently it just defaults to the DEVELOPER compile option, but we'll
move over to this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Config: `--developer` enables developer options and changes default to be "disable deprecated APIs".
2023-09-21 20:08:24 +09:30
ShahanaFarooqui d745323f74 lightning/runes: added last_used in showrunes
Changelog-Added: JSON-RPC: `showrunes` new field `last_used`
2023-09-21 13:31:34 +09:30
Rusty Russell bb38f83b88 checkrune: make nodeid and method optional.
nodeid is only useful when we know the peer we're talking to (e.g. commando).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
No-schema-diff-check: We're simply making optional, not deprecating!
2023-09-12 15:19:02 +09:30
Rusty Russell f8a3c64500 doc: fix checkrune request schema.
There's actually no "filter" here, this was mistakenly taken from commando.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-12 15:19:02 +09:30
Christian Decker 990096f904 schema: Fix wrong type of CLTV in route
We were using `number` instead of `u32` which caused it to be
serialized to string with a decimal, which then would be rejected by
lightningd.

Changelog-Fixed: proto: Fixed a wrong number type being used in routes
2023-09-01 07:32:14 +09:30
Lagrang3 961ad21281 renepay: add help for renepay & renepaystatus
Signed-off-by: Lagrang3 <eduardo.quintana@pm.me>
2023-08-09 11:43:58 +09:30
Peter Neuroth 29fea55980 doc: Fix typo in the description of fields `private`
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
[ Regenerated man pages --RR ]
2023-08-08 09:45:20 +09:30
Dusty Daemon aa2df28faf splicing: Update documentation
Added documentation for splice_update & splice_signed and tweaked splice_init.

Added corresponding schemas for splice_* commands

Changelog-None
2023-08-07 12:38:36 +09:30
Christian Decker 3e14056ce0 doc: The SCB fields are hex-encoded binary TLVs, not strings
This makes them smaller when passing them over a binary-capable encoding.
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
Shahana Farooqui f5f496d698 docs: Incorrect params sequence for checkrune command
It accepts rune first and nodeid second but the documentation showed
incorrect sequence.

No-schema-diff-check
2023-07-25 17:41:34 +09:30
Shahana Farooqui 49fdc0df99 runes: Renamed `listrunes` to `showrunes` 2023-07-25 11:07:43 +09:30