566cd86a1d
This commit adds a REST interface to the existing gRPC server by employing a simple http proxy auto-generated from the existing protobuf files. Currently full-support for any streaming RPC’s are currently untested. In addition to auto-generating a REST proxy server, a swagger.json is also generated which allows for gRPC-like native objects with higher-level clients, and also for auto-generated documentation. Due to limitations with accepting raw byte strings as parameters, some RPC’s have been modified to take both raw-bytes and string arguments. Additionally a new RPC has been added ‘NewWitnessAddress’ since the proxy doesn’t currently support enum-based arguments. Currently the proxy server is embedded within the daemon as an active HTTP server, however we may want to package the proxy server as a separate binary in the future. Similarly, we may want to add additional configuration information which controls the optional inclusion of the REST proxy. Atm, just like the current gRPC interface, the REST API is fully unauthenticated. Before moving to an initial alpha release after making the necessary changes to meet the spec drafted in Milan, authentication of the RPC interfaces will be addressed. |
||
---|---|---|
.. | ||
gen_protos.sh | ||
rpc.pb.go | ||
rpc.pb.gw.go | ||
rpc.proto | ||
rpc.swagger.json |