stellar / go

Stellar's public monorepo of go code
https://stellar.org/developers
Apache License 2.0
1.31k stars 499 forks source link

Feature Request: txnbuild: add ability to create TransactionParams from Transaction #3649

Open leighmcculloch opened 3 years ago

leighmcculloch commented 3 years ago

What

Add ability to create TransactionParams from Transaction.

Why

So that we can load a Transaction, edit it, then resign it, etc.

As far as I can tell the txnbuild package does not contain functionality for this.

Since the way to provide parameters to a new Transaction is to use the TransactionParams type, it seems fitting that to modify a Transaction, which is largely immutable other than for signing, the method to do so would be to construct a TransactionParams from a Transaction.

There are plenty of use cases where different parties will sign a transaction, but then decide they need to modify it and resign it. SEP-8 is one example. Payment channels has a flow that will require it as well where a prior signed transaction stored as XDR will need reparsing, modifying, and resigning.

MishraShivendra commented 2 years ago

Hi @leighmcculloch Hope this feature is still relevant.?