hashgraph / hedera-sdk-go

Hedera™ Hashgraph SDK for Go
https://docs.hedera.com/docs/hedera-sdks
Apache License 2.0
89 stars 64 forks source link

Add functions for remove/remove all signatures #1049

Open jbair06 opened 2 weeks ago

jbair06 commented 2 weeks ago

Problem

Issued copied from JS SDK: https://github.com/hashgraph/hedera-sdk-js/pull/2491

Once a signature has been added via addSignature, there is no convenience method to remove the signature.

Removing signatures is helpful when a transaction has a signing account that has a large keylist with many thresholds. If all signatures added to the transaction result in a transaction too large to submit, then only the minimum number of signatures required to make the transaction valid should be added to the transaction.

Also, if a signature is added, the owner of the key might decide to revoke the signature. Without recreating the transaction and re adding all the signatures, this is not possible.

Solution

These two convenience methods will be helpful to remove signatures as needed.

Review the solution in the JS SDK: https://github.com/hashgraph/hedera-sdk-js/pull/2491

Alternatives

No response