hiero-ledger / hiero-ledger/hiero-sdk-java

Multi node, multi signature offline signing support

Open
#1,985 1 comment 0 reactions 1 assignee Claimed by @mustafauzunn View on GitHub
backlog enhancement
Dominant language
Java
Stars
264
Forks
192
Avg merge
2d
Merged PRs (30d)
39

Description

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

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

### Alternatives

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.