I have a group consisting of transactions T0,T1,T2, which I need to sign using the same LogicSig but with different argument for each T0,T1,T2. I did this successfully using goal and some quick scripts in the command line but I did not manage to do it in Javascript SDK.
The problem that I have is that I create a set of transactions first, their associated logicsigs and after that I assign a group identifier, but this changes the transaction ID returned by .txID() so I lose the association between the LogicSigs and their original unsigned TXs. Of course, I cannot sign first because assignGroupID wont work.
I’m looking into 1.13-beta which includes an interesting “TransactionSigner” for LogicSigs, but I dont know if arguments can be customizable per-transaction in the group.
In that case I must find a method to refer to the TXs not using the TXIDs, which change after the group assignment. I dont want to rely on AssignGroupID not changing the unsigned TX list ordering, which is not documented.
Hi @fabrice , I create one LogicSigAccount(i) object for each unsigned TX(i), and associate them with TXID, before assigning a group ID. I have an idea for after-group-assignment now in my head, I will see if it works.
But probably the TransactionSigner of 1.13 SDK is the way to go in the future.
If the LogicSigs themselves do not check the transaction ID of the transaction, there should be no issue to first assign the group ID and then sign using the logicsigs.
What error do you encounter doing so?
Simply that I associated each LogicSigAccount object with each unsigned TXID, and after the AssignGroupID call, the TX identifiers change, so the mapping does not apply.