mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
0fc0ffc961
We build an in-memory model of what the API should look like, which will later be used to generate a variety of bindings. In this PR we will use the model to build structs corresponding to the requests and responses for the various methods. The JSON-RPC schemas serve as ground-truth, however they are missing a bit of context: methods, and the request-response matching (as well as a higher level grouping we'll call a Service). I'm tempted to create a new document that describes this behavior and we could even generate the rather repetitive JSON schemas from that document. Furthermore it'd allow us to add some required metadata such as grpc field numbering once we generate those bindings. Changelog-Added: JSON-RPC: A new `msggen` library allows easy generation of language bindings for the JSON-RPC from the JSON schemas
20 lines
470 B
TOML
20 lines
470 B
TOML
[tool.poetry]
|
|
name = "msggen"
|
|
version = "0.1.0"
|
|
description = "A utility to transform wire messages and JSON-RPC messages to arbitrary target languages."
|
|
authors = ["Christian Decker <decker@blockstream.com>"]
|
|
license = "BSD-MIT"
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.6"
|
|
|
|
[tool.poetry.dev-dependencies]
|
|
pytest = "^6.2.5"
|
|
|
|
[build-system]
|
|
requires = ["poetry-core>=1.0.0"]
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
[tool.poetry.scripts]
|
|
msggen = 'msggen.__main__:run'
|