Closed jbaldwinroberts closed 1 month ago
this is the correct way to generate the digest:
func getDigest(transaction *hedera.TransferTransaction) ([]byte, error) {
var signedTransaction services.SignedTransaction
if err := prototext.Unmarshal([]byte(transaction.String()), &signedTransaction); err != nil {
return nil, err
}
hash := crypto.Keccak256Hash(signedTransaction.BodyBytes)
return hash.Bytes(), nil
}
with this change it works as expected.
Description
I expected the code below to work given the documentation here: https://hips.hedera.com/hip/hip-222
Steps to reproduce
Execute this:
Actual result:
exceptional precheck status INVALID_SIGNATURE received for transaction 0.0.4655904@1726050695.936559436
Expected result: transaction is submittedAdditional context
No response
Hedera network
testnet
Version
v2.44.0
Operating system
macOS