xmtp / xps-gateway

XPS (XMTP Postal Service) JSON-RPC for xmtp-specific interactions with decentralized networks
https://xmtp.github.io/xps-gateway/
MIT License
2 stars 1 forks source link

Feature request: Add `rpc_methods` endpoint for listing available endpoints #65

Closed insipx closed 6 months ago

insipx commented 7 months ago

Is your feature request related to a problem?

It would be nice if the JSON-RPC were self-documenting, so we had a constant endpoint to query if we wanted to know which methods are available on an xps server.

Describe the solution to the problem

We could have an endpoint, rpc_methods which listed all the methods available on the RPC node.

I did something exactly like this in an example in didethresolver here

We basically merge in a rpc_methods endpoint after converting all our method names to a string. Very useful for on-the-fly checking, instead of opening up the docs