cardano-serialization-lib
cardano-serialization-lib copied to clipboard
Ability to import `Transaction` into `TxBuilder`
It would be nice if the TransactionBuilder API was able to "import" a pre-existing Transaction into the builder for further manipulation. Is there any reason this wouldn't be possible?
Thank you for the request, @FinleyMcIlwaine! We'll look into trying to add this.
The only complication will be that internally the TransactionBuilder works by assuming many fields of the future transaction are empty or non-existing at the beginning and with initialising from an existing transaction that won't be true. For example, when the builder is called to calculate and add change if needed it calculates the fee size only if the value where not set before, with a pre-existing transaction the fee logically would also be already present. This might require some additional careful API changes.