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.
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.