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

Flatten the getEvents response schema #998

Closed
Shaptic opened this issue Oct 3, 2023 · 2 comments · Fixed by #1015
Closed

Flatten the getEvents response schema #998

Shaptic opened this issue Oct 3, 2023 · 2 comments · Fixed by #1015

Comments

@Shaptic
Copy link
Contributor

Shaptic commented Oct 3, 2023

What problem does your feature solve?

The current schema for the event value does not make sense: according to the getEvents documentation, we have

{
  // ...other fields...
  value: {
    xdr: string
  }
}

where xdr is a serialized ScVal. This nested structure offers no add'l value.

What would you like to see?

A flatter structure:

{
  value: string;
}

It would be highly beneficial to get this in prior to a stable build due to the fact that it's a breaking change.

What alternatives are there?

This can be abstracted client-side, but it's cleaner if it comes from the server.

@Shaptic Shaptic added this to the Soroban Stable P20 Release milestone Oct 3, 2023
@Shaptic Shaptic moved this from Backlog to Next Sprint Proposal in Platform Scrum Oct 3, 2023
@sydneynotthecity
Copy link

Confirm if this will be a breaking change for SDKs and whether we are willing to refactor in downstream clients.

@Shaptic
Copy link
Contributor Author

Shaptic commented Oct 4, 2023

This would be a breaking change, yes, but I imagine it would be quite a small + painless one for most SDKs (i.e. mostly just a schema change).

Similarly, SDK consumers would just need to change all calls from .value.xdr to .value, which doesn't seem like a lot of lift to expect in a release candidate given a cleaner API.

@Shaptic Shaptic moved this from Next Sprint Proposal to In Progress in Platform Scrum Oct 10, 2023
@Shaptic Shaptic self-assigned this Oct 10, 2023
@Shaptic Shaptic moved this from In Progress to Needs Review in Platform Scrum Oct 11, 2023
@github-project-automation github-project-automation bot moved this from Needs Review to Done in Platform Scrum Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants