Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve RPC Documentation: Return Values, Parameters, and Hex Encoding Details #60

Open
onmax opened this issue Oct 1, 2024 · 0 comments

Comments

@onmax
Copy link
Member

onmax commented Oct 1, 2024

The current RPC documentation (https://www.nimiq.com/developers/build/set-up-your-own-node/rpc-docs/) could benefit from additional clarification in several areas:

Return values:

Return values are often unclear. For example, while the OpenRPC file states that listAccounts returns an array of strings, it doesn't clarify what these strings represent (e.g. addresses, hex-encoded public keys, etc.).

Parameter descriptions

Parameters lack descriptions and their names are sometimes not intuitive. Adding clear explanations for each parameter would help improve understanding.

Hex encoding:

  • Many fields appear to be hex-encoded bytes, but this is not explicitly stated. It would be helpful to specify the hex encoding format, including
  • Whether it contains a leading 0x
  • Whether it uses upper or lower case
  • Improving these sections will make the documentation more comprehensive and user friendly.

Suggested improvements

  • Add detailed descriptions for each parameter, including examples where possible.
  • Clearly define the structure and purpose of return values, especially if they are strings representing encoded data.
  • Specify hex encoding formats for fields that require it.
  • These changes will make the RPC documentation much clearer for developers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant