-
Notifications
You must be signed in to change notification settings - Fork 121
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
Decode API responses #291
Comments
My preference would be adding a {
"output": "0xabcf...",
"output_repr": "(int 3)",
} |
Also note, I don't think we have defined JSON encoding for Clarity values. For example, a Clarity tuple can have an easily human readable string format, while being just as difficult to use programmatically as decoding a hex string. We could define a JSON Clarity encoding, something like an extension of the json ABI schema but with additional fields for the literal values? |
Ah, nice! The |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I looked through the referenced endpoints and all the non-proxied endpoints appear to have For the proxied endpoints, the API would have to make a bunch of semi-redundant wrapper endpoints around the |
would you like to propose this through an issue on their repo and close out the issue in this one? |
Currently, the API returns encoded strings in multiple places. These need to be decoded in tooling manually and are hard to read. A developer, for instance, couldn't easily verify if a response is correct or not. It makes the development cycle longer as it should be. We could add a layer of abstraction to our endpoints to decode Clarity values by default with additional
repr
fields.Here is a list of endpoints that currently expose encoded hex strings in one of the fields:
The text was updated successfully, but these errors were encountered: