Commit Graph

175 Commits

Author SHA1 Message Date
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
Christian Decker 557cd183ac cln-rpc: Generate ToString for Enums
This will return the stringified name of the variant.
2023-07-10 18:22:11 +02:00
Christian Decker 32f9d78096 msggen: Derive `Eq` on generated Enums as well 2023-07-10 18:22:11 +02:00
Paul Miller a298f00229 rs: derive PartialEq for simple rust enums 2023-07-10 18:22:11 +02:00
Christian Decker 706b47587f cln-rpc: Remove wildcard import from model
There is a name clash between request and response for the delinvoicestatus
param.
2023-07-10 13:47:38 +09:30
Rusty Russell 0402e645f0 lightningd: add option `opening_anchor_channel` to fundpsbt, utxopsbt.
This is needed when we know we're *opening* an anchor channel, to
override the "do we already have an anchor channel open?" logic.

Also, document the nonwrapped arg added in v23.02.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `fundpsbt` and `utxopsbt` new parameter `opening_anchor_channel` so lightningd knowns it needs emergency reserve for anchors.
2023-06-29 11:28:47 -04:00
Rusty Russell e45bf14300 lightningd: use lowball feerate for commit_tx on anchor channels.
Since we can CPFP, we don't have to track the feerate as closely.  But
it still needs to get in the mempool, so we use 10 sat/byte, or the
100 block estimate if that is higher.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `feerates` has new fields `unilateral_anchor_close` to show the feerate used for anchor channels (currently experimental), and `unilateral_close_nonanchor_satoshis`.
Changelog-Changed: JSON-RPC: `feerates` `unilateral_close_satoshis` now assumes anchor channels if enabled (currently experimental).
2023-06-29 11:28:47 -04:00
Matt Whitlock 8d737cc4bf Makefile: use grouped targets for recipes with multiple fixed outputs
See the section headed "Rules with Grouped Targets" on the Texinfo page
`(make)Multiple Targets`.

Without this fix, Make does not know that these recipes unconditionally
make *all* of their named targets regardless of which target triggers
their execution, and Make will blissfully execute multiple instances of
any such recipe in parallel, not only wasting CPU cycles but potentially
producing incorrect results if the recipe is not atomic in its effects
on the file system.  With this fix, Make understands that it need only
execute such a recipe once to make all of its targets.

In pursuit of the above, move and combine two redundant msggen recipes
into the top-level Makefile, and populate its grouped targets from the
subordinate Makefiles.

Changelog-None
2023-06-23 13:58:31 +09:30
Christian Decker 8c02d9587d msggen: Extend support range to v0.10.1 and mark address, added in v23.02 2023-06-13 11:28:35 +09:30
Rusty Russell a6772e9dec common: add new internal type for websockets.
Now it's not a public type, we need a way to refer to it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-01 09:28:39 +09:30
Rusty Russell 3f35d48fe4 common: remove websocket type from wireaddr.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-01 09:28:39 +09:30
Christian Decker 5ed6f618b3 rust: Bump the versions of cln-rpc, cln-grpc, cln-plugin and grpc-plugin
We haven't uploaded the new v23.05 version just yet, and this includes
a couple of bugfixes that happened since too.
2023-05-30 10:06:10 +09:30
Christian Decker c029de7d56 msggen: Add preapproveinvoice and preapprovekeysend to msggen 2023-05-29 14:50:13 +09:30
Rusty Russell b8aa3a579e listtransactions: remove annotations, which were only in EXPERIMENTAL_FEATURES.
I don't know if anyone was using them, they seem half-hearted.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-05-23 09:34:08 +09:30
daywalker90 0ea7cb2484 add missing htlc states from incoming htlcs 2023-05-20 13:17:36 +02:00
Christian Decker acc3bb2276 msggen: Switch signatures to string instead of bytes 2023-05-05 09:24:07 -07:00
Christian Decker fc26675336 msggen: Add DecodePay to the mappings
Changelog-Added: grpc: Added mapping for `listpeerchannels`, `listclosedchannels`, `decode` and `decodepay` RPC method
2023-05-05 11:54:41 +09:30
Christian Decker 0031f1160b msggen: Map arrays of hashes and add HtlcState enum 2023-05-05 11:54:41 +09:30
Christian Decker bff3b1ca8c msggen: Add ListClosedChannels and overrides 2023-05-05 11:54:41 +09:30
Christian Decker e7a96cac11 msggen: Normalize enum and field names if they contain a '/' 2023-05-05 11:54:41 +09:30
Christian Decker 65f5134643 msggen: Add ListPeerChannels to generated interfaces 2023-05-05 11:54:41 +09:30
Christian Decker db3707f957 pytest: Highlight the re-entrancy issue for cln-plugin events
This was pointed out by Daywalker [1]: we are synchronously processing
events from `lightningd` which means that if processing one of the
hooks or requests was slow or delayed, we would not get notifications,
hooks, or RPC requests, massively impacting the flexbility.

This highlights the issue with a failing test (it times out), and in
the next commit we will isolate event processing into their own task,
so to free the event loop from having to wait for an eventual
response.

[1] https://community.corelightning.org/c/developers/hold-invoice-plugin#comment_wrapper_16754493
2023-04-13 18:13:28 -07:00
Christian Decker 6d76642f7e cln: Fix routehints conversion from cln-rpc and cln-grpc
Fixes #6143
Changelog-Fixed: clnrs: Fixed an issue converting routehints in keysend
2023-04-10 17:34:54 +09:30
Rusty Russell 3a3370f4c1 feerates: add `floor` field for the current minimum feerate bitcoind will accept
Changelog-Added: JSON-RPC: `feerates`: added `floor` field for current minimum feerate bitcoind will accept
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-04-10 07:31:12 +09:30
Rusty Russell 64b1ddd761 lightningd: clean up feerate handling, deprecate old terms.
Drop try_get_feerate() in favor of explicit feerate_for_deadline() and
smoothed_feerate_for_deadline().

This shows us everywhere we deal with old-style feerates by names.

`delayed_to_us` and `htlc_resolution` will be moving to dynamic fees,
so deprecate those.

Note that "penalty" is still used for generating penalty txs for
watchtowers, and "unilateral_close" still used until we get zero-fee
anchors.

Changelog-Added: JSON-RPC: `feerates` `estimates` array shows fee estimates by blockcount from underlying plugin (usually *bcli*).
Changelog-Changed: JSON-RPC: `close`, `fundchannel`, `fundpsbt`, `multifundchannel`, `multiwithdraw`, `txprepare`, `upgradewallet`, `withdraw` `feerate` (`feerange` for `close`) value *slow* is now 100 block-estimate, not half of 100-block estimate.
Changelog-Deprecated: JSON-RPC: `close`, `fundchannel`, `fundpsbt`, `multifundchannel`, `multiwithdraw`, `txprepare`, `upgradewallet`, `withdraw` `feerate` (`feerange` for `close`) expressed as, "delayed_to_us", "htlc_resolution", "max_acceptable" or "min_acceptable".  Use explicit block counts or *slow*/*normal*/*urgent*/*minimum*.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-04-10 07:31:12 +09:30
Christian Decker 60b12ec096 msggen: Use the inferred optional field
Changelog-Changed: msggen: The generated interfaces `cln-rpc` anc `cln-grpc` can now work with a range of versions rather than having to match the CLN version
2023-04-06 10:16:19 +09:30
Kristaps Kaupe 906279a46e Output channel_id in listfunds
Changelog-Added: JSON-RPC: `listfunds` now has a `channel_id` field.
2023-03-21 10:29:33 +00:00
Rusty Russell 780f32dfc6 global: remove deprecated non-msat-named msat fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: JSON-RPC: all the non-msat-named millisatoshi fields deprecated in v0.12.0.
2023-03-18 15:55:49 +10:30
Rusty Russell 67f23c19f7 lightningd: remove deprecated local_msat, remote_msat from listpeers.
Changelog-Removed: JSON-RPC: `listpeers`.`local_msat` and `listpeers`.`remote_msat` (deprecated v0.12.0)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-03-18 15:55:49 +10:30
Carl Dong b83a19164c msggen: Regenerate for addition of SendCustomMsg
Performed using:
  PYTHONPATH=contrib/msggen python3 contrib/msggen/msggen/__main__.py
2023-02-08 23:10:53 -06:00
Riccardo Casatta 913f9da5a8 cln-rpc: explicitly enumerate ChannelState enum 2023-02-08 12:03:27 -06:00
Riccardo Casatta 21a8342289 Implement GRPC -> JSON conversions also for response types 2023-02-08 12:03:27 -06:00
Michael Schmoock 1e951a9479 mssgen: adds num_channels 2023-02-07 14:46:04 -06:00
Carl Dong dc4ae9deb4 msggen: Regenerate for addition of SignInvoice
Performed using:
  PYTHONPATH=contrib/msggen python3 contrib/msggen/msggen/__main__.py
2023-02-06 15:54:32 -06:00
Rusty Russell 18397c0b87 doc-schema: make address field in getinfo response required
There were cases where address it's empty, and this cases are not right if the
field is considered optional.
This makes it required and add the field also when `--offline` is set.

Changelog-Changed: JSON-RPC: `getinfo` `address` array is always present (though may be empty)
2023-02-01 13:55:00 +10:30
Rusty Russell 2c41c5d52d doc: use specific types in schema rather than "hex".
We have "secret" and "hash" types which are often more appropriate.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-01-30 15:15:41 -06:00
Rusty Russell 83c690fe5f doc: fix listsendpays man page.
We actually had a partid allowed (in the oneOf clauses), but didn''t
document it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-01-30 15:15:41 -06:00
Rusty Russell 9ab488fc41 plugins/topology: add direction field to listchannels.
It's a core concept in the spec which isn't directly exposed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listchannels` added a `direction` field (0 or 1) as per gossip specification.
2023-01-30 15:15:41 -06:00
Rusty Russell 611795beee listtransactions: get rid of per-tx type annotations.
We didn't actually populate them properly, and the real annotations
are on inputs and outputs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: JSON-RPC: `listtransactions` `channel` and `type` field removed at top level.
2023-01-30 15:15:41 -06:00
Riccardo Casatta 182a9cdcb6 cln-rpc: use serde rename instead of alias
rename is necessary to roundtrip, otherwise the rust name is used.

This also remove the rename if they are not necessary.

Note that:
```
 #[serde(rename="foo", skip_serializing_if=="bar")]
 pub field: bool,
```

is equivalent to:
```
 #[serde(rename="foo")]
 #[serde(skip_serializing_if=="bar")]
 pub field: bool,
```

and for simplicity of construction the latter is used
2023-01-26 15:03:54 +01:00
daywalker90 82c94330a5 add PartialEq to ShortChannelId
PartialEq makes it possible to compare 2 ShortChannelIds for equality which i found often helpful
2023-01-17 14:58:07 +01:00
Christian Decker 71b581da4d make: Clean up duplicate cargo examples build rules 2023-01-16 13:53:48 +10:30
Christian Decker e76618e2a6 ci: Use bzip2 and release to reduce artifact size 2023-01-16 13:53:48 +10:30
Rusty Russell 932ca9e91f lightningd: deprecate p2sh-segwit addresses for `newaddr` `addresstype`
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: JSON-RPC: `newaddr`: `addresstype` `p2sh-segwit` (use default, or `bech32`).
2023-01-14 21:17:45 +10:30
Vincenzo Palazzo 6c0b9b0c78 lightningd: deprecate listpeers.channels
Changelog-Deprecated: JSON-RPC: `listpeers` `channels` array: use `listpeerchannels`

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-01-13 10:42:42 +10:30
Rusty Russell 717cb03f51 doc: add recent additions, fix annotation on listpeers to actually deprecate.
TODO: It would be great to similarly annotate new/deprecated commands and
their parameters.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: doc: we now annotate what versions JSON field additions and deprecations happenened.
2023-01-11 12:51:18 +10:30
Justin Litchfield 879db694e1 Ping request types are changed from number to u16 2023-01-09 14:35:23 +01:00
Jesse de Wit 241cd8d012 generate composite fields in grpc 2023-01-03 10:56:10 +01:00
Christian Decker 89534f749a rs: Add cln-rpc metadata 2023-01-02 14:33:02 +01:00
Christian Decker 465d9121bf rs: Bump crate versions for publication 2022-12-22 15:42:12 +01:00
Christian Decker 8e75232205 rs: Update outdated dependencies
This commit updates outdated dependencies and hangs all
bitcoin-related dependencies off of the `bitcoin` crate, using its
re-exports. This means that as long as the bitcoin crate matches, all
of its dependents will also match.

Changelog-None
2022-12-22 15:42:12 +01:00
Christian Decker 2e270ea7d3 rs: Bump cln crate versions to 0.1.1 2022-11-18 15:10:32 +01:00
Rusty Russell 02d7454226 db: add invoicerequests table.
We no longer use offers for "I want to send you money", but we'll use
invoice_requests directly.  Create a new table for them, and
associated functions.

The "localofferid" for "pay" and "sendpay" is now "localinvreqid".
This is an experimental-only option, so document the change under
experimental only.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: JSON-RPC: `pay` and `sendpay` `localofferid` is now `localinvreqid`.
2022-11-09 15:08:03 +01:00
Rusty Russell ef2f4a0648 bolt12: use spec field names, update decode API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-11-09 15:08:03 +01:00
niftynei 26f5dcd2a5 wallet: mark coinbase outputs as 'immature' until spendable
Changelog-Changed: JSON-RPC: `listfunds` now lists coinbase outputs as 'immature' until they're spendable
Changelog-Changed: JSON-RPC: UTXOs aren't spendable while immature
2022-11-09 11:55:25 +01:00
Christian Decker 1a1c0a38fc msggen: Map the `extratlvs` field of `keysend`
Changelog-Added: cln-rpc: `keysend` now exposes the `extratlvs` field
2022-11-01 17:05:30 +01:00
Christian Decker 93c95056a3 rs: Fix two small regressions
These were only in the test targets, but still.
2022-11-01 17:05:30 +01:00
okjodom 335f52d1a8 cln-rpc: implement from Secret to slice conversion 2022-09-30 10:18:12 +02:00
joemphilips 52be59587c msggen: generate deprecated fields in rust.py 2022-09-29 11:18:06 +02:00
Christian Decker 93b315756f schema: Add `enforcedelay` to `setchannel`
This was missing in the last version
2022-09-28 15:13:07 +02:00
Justin Litchfield 51e2433087 Setchannel request is provided 2022-09-28 15:13:07 +02:00
joemphilips 836a2aa261 use msat_or_all for fundpsbt request amount 2022-09-28 10:52:55 +02:00
Rusty Russell cafa1a8c65 db: correctly migrate forwards for closed incoming channels.
We have to allow them (as otherwise `fees_collected_msat` in getinfo breaks),
but it means that actually, in_htlc_id might be missing in listforwards
(also, out_htlc_id might be missing, which we didn't catch before).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: #5628
2022-09-27 14:42:03 +09:30
elsirion 6abcb18145 Add basic arithmetic to `Amount` type 2022-09-26 22:05:30 +02:00
elsirion 09dfe3931d Make eligible types `Copy` 2022-09-26 22:05:30 +02:00
elsirion b4b0b479ac Use `secp256k1` for public key type 2022-09-26 22:05:30 +02:00
elsirion e272c93a88 Use `bitcoin_hashes` for `Sha256` 2022-09-26 22:05:30 +02:00
elsirion 10917743fe Implement a typed version of `call` to avoid useless matching 2022-09-26 22:05:30 +02:00
elsirion 7046252f96 Impl `std::error::Error` for `RpcError` to make it anyhow compatible 2022-09-26 22:05:30 +02:00
Rusty Russell 05095313f5 lightningd: listsendpays always has groupid.
Schema was too loose since we did deprecations.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-22 15:19:46 +02:00
Rusty Russell 311807ff1f lightningd: add in_htlc_id / out_htlc_id to listforwards.
And document that we never know payment_hash.

Changelog-Added: JSON-RPC: `listforwards` now shows `in_htlc_id` and `out_htlc_id`
Changelog-Changed: JSON-RPC: `listforwards` now never shows `payment_hash`; use `listhtlcs`.
2022-09-22 15:19:46 +02:00
Kristaps Kaupe 775d6ba193 doc: Fix wrong_funding description in manpage and type in schema 2022-09-22 10:41:05 +02:00
Christian Decker 5c1de8029a openingd: Add `reserve` to `fundchannel` and `multifundchannel`
Changelog-Added: JSON-RPC: `fundchannel`, `multifundchannel` and `fundchannel_start` now accept a `reserve` parameter to indicate the absolute reserve to impose on the peer.
2022-09-21 11:25:47 +02:00
Rusty Russell ce0b765c96 cln-rpc: allow id to be any token.
Suggested-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-16 12:31:45 +09:30
Rusty Russell 746b5f3691 Makefile: fix msggen regeneration when schemas change.
1. It depends on both request and reply schemas.
2. Wildcards aren't natively expanded in make, so use $(wildcard).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-14 17:46:43 +02:00
Christian Decker a80211e960 doc: Update generated artifacts to match master 2022-09-14 13:14:10 +02:00
Christian Decker cb3ee0ac2e wallet: Load and value `completed_at` timestamp from DB 2022-09-14 13:14:10 +02:00
niftynei 4e503f7d0a bkpr/listpeeers: add lease_fees back to funds; separate out in listpeers
First, how we record "our_funds" and then apply pushes vs lease_fees
(for liquidity ad buys/sales) was exactly opposite.

For pushes we were reporting the total funded into the channel, with the
push representing how much we'd later moved to the peer.

For lease_fees we were rerporting the total in the channel, with the
push representing how much was already moved to the peer.

We fix this (from a view perspective) by re-adding lease fees to what's
reported in the channel funding totals. Since this is now new behavior
(for leased channel values), we added new fields so we can take the old
field names thru a deprecation cycle.

We also make it possible to differentiate btw a push and a lease_fee
(before they were all the same), by adding to new fields to `listpeers`:
`fee_paid_msat` and `fee_rcvd_msat`.

This allows us to avoid math in the bookkeeper, instead we just pick
the numbers out directly and record them.

Fixes #5472

Changelog-Added: JSON-RPC: `listpeers` now has a few new fields for `funding` (`remote_funds_msat`, `local_funds_msat`, `fee_paid_msat`, `fee_rcvd_msat`).
Changelog-Deprecated: JSON-RPC: `listpeers`.`funded` fields `local_msat` and `remote_msat` are now deprecated.
2022-07-31 21:53:05 +09:30
Christian Decker 217ce4c03c schema: Add missing `mindepth` argument to `fundchannel`
This was likely missed during the zeroconf PR.

Changelog-None
2022-07-21 14:19:06 +09:30
Christian Decker b6a4cbbf98 cln-rpc: Add mindepth after rebase on `master` 2022-07-21 14:19:06 +09:30
Christian Decker ca8c46c286 schema: `minconf` should be an integer (u32) not a float (number) 2022-07-21 14:19:06 +09:30
Christian Decker 18a9eb2feb msggen: Add `stop` method to generators
We'll need this when testing the grpc interface in pyln-testing,
otherwise tests just slowly die and wither.
2022-07-21 14:19:06 +09:30
Christian Decker 12275d0bfe cln-grpc: Skip serializing fields when Option<Vec<T>> is empty too
The CLN API is rather strict about the fact that we should skip
providing a field whenever it is empty. Checking for `is_none` would
still include empty arrays.

Changelog-Fixed cln-rpc: Optional empty arrays will no longer be serialized in requests
2022-07-21 14:19:06 +09:30
Christian Decker 77f5eb556b msggen: Add fundchannel request 2022-07-21 14:19:06 +09:30
Christian Decker 2d35c9a929 msggen: Do not override method names when loading Schema
We were overriding the name right when loading, which is bad since in
some languages we use the method name as tag in the requests, thus
renaming causes us to call something that isn't defined.

Changelog-Fixed: cln-rpc: Fixed a naming mismatch for `ConnectPeer` causing `connectpeer` to be called on the JSON-RPC
2022-07-21 14:19:06 +09:30
Vincenzo Palazzo e70729b04b rust: upgrade model with new checkmessage requirements
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-07-19 17:55:31 +02:00
Christian Decker 50180e040c msggen: Update generated files to add Listpeers.peers[].remote_addr
Changelog-None
2022-07-15 15:27:45 +09:30
Christian Decker cdedd433a4 jsonrpc: Add aliases to `listpeers` result 2022-07-04 22:14:06 +02:00
Justin Moon acc78397eb Remove native-tls dependency from cln-rpc 2022-06-23 15:45:06 +02:00
Christian Decker 9a880a0932 clnrs: Implement backwards compatible mode for Amount as bare u64
Since we want to transition to raw `u64` values we need to accept both
for some time.
2022-06-21 06:52:35 +09:30
Rusty Russell 08d5776ebc lightningd: deprecate `msatoshi` in `sendpay` `route`.
We should be using amount_msat always.  Many tests were not.  Plus,
deprecating it simplifies the code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: JSONRPC: `sendpay` `route` elements `msatoshi` (use `amount_msat`)
2022-06-21 06:52:35 +09:30
Rusty Russell cd7e784d6f lightningd: change `msatoshi` args to `amount_msat`.
This is consistent with our output changes, and increases consistency.
It also keeps future sanity checks happy, that we only use JSON msat
helpers with '_msat' fields.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice`: `msatoshi` argument is now called `amount_msat` to match other fields.
Changelog-Deprecated: JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice` `msatoshi` (use `amount_msat`)
2022-06-21 06:52:35 +09:30
Rusty Russell 36a2491a89 json: fix up msat amounts in non-_msat fields.
We had json_add_amount_msat_only(), which was designed to be used to
print out msat fields, if we had sats.

However, we misused it, so split it into the three different cases:
1. json_add_amount_sat_msat: We are using it correctly, with a field called
   xxx_msat.
2. json_add_amount_sats_deprecated: We were using it wrong, so deprecate
   the old field and create a new one which does end in _msat.
3. json_add_sats: we were using it to hand sats as a JSON parameter to an
   interface, where "XXXsat".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: Plugins: `rbf_channel` and `openchannel2` hooks `their_funding` (use `their_funding_msat`)
Changelog-Deprecated: Plugins: `openchannel2` hook `dust_limit_satoshis` (use `dust_limit_msat`)
Changelog-Deprecated: Plugins: `openchannel` hook `funding_satoshis` (use `funding_msat`)
Changelog-Deprecated: Plugins: `openchannel` hook `dust_limit_satoshis` (use `dust_limit_msat`)
Changelog-Deprecated: Plugins: `openchannel` hook `channel_reserve_satoshis` (use `channel_reserve_msat`)
Changelog-Deprecated: Plugins: `channel_opened` notification `amount` (use `funding_msat`)
Changelog-Deprecated: JSON-RPC: `listtransactions` `msat` (use `amount_msat`)
Changelog-Deprecated: Plugins: `htlc_accepted` `forward_amount` (use `forward_msat`)
2022-06-21 06:52:35 +09:30
Rusty Russell c7d359baf4 cln-grpc: API updates after 8dd51d127f
Changing the JSON schemas changes this, and I didn't rebuild!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-05-19 10:00:27 +09:30
Rusty Russell f078e54e98 lightningd: remove various deprecated JSON fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: JSON-RPC: removed `listtransactions` `outputs` `satoshis` field (deprecated v0.10.1)
Changelog-Removed: JSON-RPC: removed `listpeers` `channels` deprecated fields (deprecated v0.10.1)
Changelog-Removed: JSON-RPC: removed `listpeers` `channels` `closer` now omitted, rather than `null` (deprecated v0.10.1)
2022-05-18 10:15:36 +09:30
joe.miyamoto 562974acdb Fix miner bug in rust client generator.
This commit fixes a bug in a function `gen_enum`, which
is not caught because so far we have no non-required field in enums
defined in json schema.
2022-04-21 16:43:50 +09:30
Christian Decker 9a8bc777e5 msggen: Add pay descriptions and maxfee 2022-04-08 11:30:10 +09:30
Rusty Russell 836c1b805b doc: update c-lightning to Core Lightning almost everywhere.
Mostly comments and docs: some places are actually paths, which
I have avoided changing.  We may migrate them slowly, particularly
when they're user-visible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-07 06:53:26 +09:30