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

Add memo text base64 field in Horizon transaction response #2458

Closed
tamirms opened this issue Apr 6, 2020 · 0 comments
Closed

Add memo text base64 field in Horizon transaction response #2458

tamirms opened this issue Apr 6, 2020 · 0 comments

Comments

@tamirms
Copy link
Contributor

tamirms commented Apr 6, 2020

As noted in #2022 , the memo value in a transaction can be an arbitrary binary blob even if the memo type is text. When horizon ingests transactions, it tries to store the memo field as a utf8 string even if the memo value is not valid utf8.

The Java SDK tries to recover the original byte representation of the memo by decoding the XDR. See lightsail-network/java-stellar-sdk#259 . However, we would like to avoiding XDR decoding in the SDKs when deserializing Horizon responses. The XDR definitions are subject to change so the SDKs should be relying on Horizon's API to avoid manually parsing XDR.

If we can include a memo_bytes field in the Horizon transaction resource, which is present alongside the memo field when memo_type is "text", then the Java SDK can use memo_bytes to recover the original memo value without having to parse envelope_xdr.

Once this feature is implemented, we should update the Java SDK to use the memo_bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants