stellar / js-stellar-sdk

Main Stellar client library for the JavaScript language.
https://stellar.github.io/js-stellar-sdk/
Apache License 2.0
628 stars 311 forks source link

feature: XDR serialization of Auth Entries for multi-auth workflow #976

Closed BlaineHeffron closed 3 months ago

BlaineHeffron commented 4 months ago

We currently have toJSON and fromJSON methods in AssembledTransaction, as well as txFromJSON in ContractClient, and typed fromJSON methods in the TS Bindings generation in soroban-cli.

This was a first-pass at supporting multi-auth workflows, and is not needed by most use-cases. For multi-auth workflows, we want to support a full-XDR serialization approach, rather than unexpectedly using JSON in this one Soroban use-case.

We need to design a multi-auth workflow that potentially just does toXDR on the specific authEntries to be signed, which could then be sent to other users/machines, then signed and re-serialized, then sent back to the original transaction author, on whose machine it can then be reassembled and submitted.