-
Notifications
You must be signed in to change notification settings - Fork 313
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 toXDR and fromXDR for multiauth flow #977
add toXDR and fromXDR for multiauth flow #977
Conversation
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.
In the CHANGELOG entry that you add for this, let's be sure to mention that toJSON
and fromJSON
and txFromJson
are now all deprecated, and to prefer the XDR
variants.
If it were up to me, given the low-usage of this so far (literally probably only the CLI using this toJSON
and fromJSON
logic right now), I would just ship a breaking change. But we should probably wait until the next major version to do that. Maybe we can also add @deprecated
markers to the JSDoc for these json-related methods.
d72aee7
to
40f5a6c
Compare
I completely agree, but it's not the way we want to do things anymore (i.e. we want a single major version across the stack [up to the platform] to define protocol compatibility). Yet another reason why the SDK and the binding code should be able to evolve independently 😉 |
fmt Co-authored-by: George <Shaptic@users.noreply.github.com>
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.
Glad to have this, thanks!
Addresses #976
Adds a
toXDR
andfromXDR
forAssembledTransaction
class. Also adds atxFromXDR
to the Client class. Changes the swap test to use this flow.Limitations: If you use the XDR multi-auth flow, you must resimulate before the final
signAndSend
call. This is due to the fact that we can't serialize the XDR of the transaction envelope with the results of the simulation. If we want to do this, we would need to add an AssembledTransaction type to XDR in Stellar Base.