-
Notifications
You must be signed in to change notification settings - Fork 17
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
Automatically decode XDR for getLedgerEntries
and friends
#154
Conversation
src/index.ts
Outdated
export { AxiosClient, version } from "./axios"; | ||
export * from "./transaction"; | ||
|
||
// only needed for testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once it's available in the wild, nothing prevents clients from using in their production side code, should comment just be removed or not exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't avoid exporting because it would mean it isn't available for browser testing, unfortunately :( you're right that nothing is stopping people from using it if they want. I added a comment to that effect in 47e445e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
New and updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
What
We have the following breaking schema change in the top-level response:
and in each entry:
More specificially,
entries
is now guaranteed to exist, but it may be emptyentries[i].key
is an instance ofxdr.LedgerKey
entries[i].xdr
field is nowval
, insteadentries[i].val
is an instance ofxdr.LedgerEntryData
If users want to continue to use the raw RPC response, there is still a
Server._getLedgerEntries
method.Some helpers from previous PRs have been moved around into a new
src/parsers.ts
, also.Why
Better UX, see #128.