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
Christian Decker
9a8bc777e5
msggen: Add pay descriptions and maxfee
2022-04-08 11:30:10 +09:30
Christian Decker
aae5e3d070
cln-grpc: Final generation of derived files
...
Didn't want to pollute each commit with the changes in the derived
files so here are all the changes in one commit :-)
2022-04-02 09:46:01 +10:30
Christian Decker
0c08ca8f27
cln-grpc: Add conversion test for listpeers
2022-04-02 09:46:01 +10:30
Christian Decker
cd9c00b629
cln-rpc: Log requests and responses
2022-04-02 09:46:01 +10:30
Christian Decker
ecda4f717f
cln-rpc: Move tests into separate file
...
These json structs are gigantic, so let's externalize them a bit.
2022-04-02 09:46:01 +10:30
Christian Decker
1613c44b0a
cln-rpc: Make Pubkey and ShortChannelId proper types
2022-04-02 09:46:01 +10:30
Christian Decker
ef145c7900
msggen: Add RoutehintList as a primitive
2022-04-02 09:46:01 +10:30
Christian Decker
ec5cd92580
msggen: Add model-side overrides
...
Sometimes we just want to paper over the schema directly. Mostly
useful to sidestep the `oneof` things that are required for
expressiveness.
2022-04-02 09:46:01 +10:30
Christian Decker
bba68e2136
cln-grpc: Map AmountOrAll and AmountOrAny
2022-04-02 09:46:01 +10:30
Christian Decker
04e7e285d7
cln-rpc: Map PSBT and TX methods
2022-04-02 09:46:01 +10:30
Christian Decker
0354a7fdb1
cln-rpc: Add OutputDesc
for {addr: amt}
style arguments
...
This is likely inherited from bitcoind, and a bit awkward for us, so
we parse it into a classic struct, but serialize it back into the
bitcoind format when talking to the RPC.
2022-04-02 09:46:01 +10:30
Christian Decker
eb2aa8c51c
cln-rpc: Map feerates and backfill methods using it
2022-04-02 09:46:01 +10:30
Christian Decker
20704746bc
grpc: Map sendonion
and createonion
2022-04-02 09:46:01 +10:30
Christian Decker
565518246a
msggen: Add custom mappings for JSON -> grpc conversions
2022-04-02 09:46:01 +10:30
Christian Decker
a7f3c54600
cln-rpc: Add invoice RPC methods
2022-04-02 09:46:01 +10:30
Christian Decker
d90aafeed6
cln-grpc: Add the connect
method
2022-04-02 09:46:01 +10:30
Christian Decker
0cbf918af1
cln-grpc: Set cln-grpc version to 0.0.1 until it's complete
...
Suggested-by: Vincenzo Palazzo <@vincenzopalazzo>
2022-03-30 12:15:55 +10:30
Christian Decker
6098386182
cln-grpc: Add the connect
method
2022-03-30 12:15:55 +10:30
Christian Decker
a8aa9bd5ae
cln-rpc: Fixed two minor compiler warnings
2022-03-16 11:11:58 +10:30
Christian Decker
487b5e6169
msggen: Add meta file to keep the field numbers stable
...
We are inferring the field numbers on the fly, which isn't really
compatible with the way GRPC field numbers work, i.e., they must be
stable while the IDL file evolves. So far when a field was added in
the middle of a struct or removed all subsequent fields would get
renumbered, essentially breaking any client that was using the old
scheme.
We now add a meta file `.msggen.json` that keeps track of the numbers
assigned so far, so they can be reused, and new ones can be generated
not to conflict with existing ones. This file is intentionally kept
generic, so other generators can add more information that has to be
managed across runs.
Changelog-None
2022-03-16 11:11:58 +10:30
Christian Decker
75f0b8e916
cln-grpc: Add listpeers
RPC method
...
This is pretty much the hardest to map, but we map it correctly, with
the exception of the state_changes[] array we truncated out in the
last commit.
2022-02-28 23:25:37 +00:00
Christian Decker
fd2d126ec4
cln-grpc: Add conversion from pb Amount to json Amount
2022-02-28 23:25:37 +00:00
Christian Decker
d95c9d2990
cln-grpc: Add conversion from pb Amount to json Amount
2022-02-28 23:25:37 +00:00
Christian Decker
24e44ecbb6
cln-grpc: Add glue to get all pieces to work together
2022-02-28 23:25:37 +00:00
Christian Decker
62dc078271
cln-grpc: Generate server dispatcher
...
The server doesn't do much more than unwrapping the request from its
grpc envelope, convert it into the matching JSON-RPC binding struct,
initiate the RPC connection (until we have connection pooling), and
then forwards the converted request. The inverse then happens for the
result.
2022-02-28 23:25:37 +00:00
Christian Decker
5d6e9d6dae
cln-grpc: Add generation of request conversion
...
This is taking protobuf requests on one side and converting them into
the JSON-RPC requests.
2022-02-28 23:25:37 +00:00
Christian Decker
8d3871d791
cln-grpc: Add result conversion generator to msggen
...
This takes the Rust bindings and converts them into the generated
protobuf bindings:
> JSON-RPC -> Rust bindings -> grpc bindings -> protobuf
2022-02-28 23:25:37 +00:00
Christian Decker
4c105d2424
cln-grpc: Generate grpc bindings from proto
...
This is the easy way, since there's already tooling for this.
2022-02-28 23:25:37 +00:00
Christian Decker
d01b2c21a7
cln-grpc: Add generation of grpc protobuf file from schema
2022-02-28 23:25:37 +00:00