The SDK currently does not support the use case of multiple signatures for multiple nodes when signing is done offline. Transaction.sign(key) works for multi node, multi sig but not offline. PrivateKey.signTransaction(transaction) supports offline multi sig, but not multi node.
Solution
A new object and a couple new methods can solve this situation.
Signature/SignatureDictionary - this object can mimic transaction in that it would have sub-signatures, each signature would be tied to a node account id. Or this object could just be a simple { [key: string]: string } dictionary.
PrivateKey.sign(transaction) - this function would create the signature object. Goes through all the sub transactions and creates a signature for each.
Transaction.addSignature(PublicKey, signature/signatureDictionary) - this function would add each signature in the dictionary to the matching sub-transaction, based on node account id.
Problem
Issue is copied from JS SDK, please review the conversation: https://github.com/hashgraph/hedera-sdk-js/issues/2481
The SDK currently does not support the use case of multiple signatures for multiple nodes when signing is done offline. Transaction.sign(key) works for multi node, multi sig but not offline. PrivateKey.signTransaction(transaction) supports offline multi sig, but not multi node.
Solution
A new object and a couple new methods can solve this situation.
Alternatives
No response