lightning
lightning copied to clipboard
SQL RPC method for grpc
This https://docs.corelightning.org/reference/lightning-sql is very nice. Could we have this also on the grpc api.
I would love to see that supported as well. Here is my solution for now: https://github.com/ffaex/lightning/tree/feature/add_sql_rpc . But I have not tested it yet tbh. The SQL query should return a Vector of string, aka ROWs whose content is a string. One should serialize that string on his own, depending on the query.
Another thing to keep in mind is that autogenerating is not working perfectly with that, i had to modify cln-grpc/src/convert.rs manually see: "impl Fromresponses::SqlResponse for pb::SqlResponse {"