INVALID_SIGNATURE" response will be returned from the network. The
senderAccountIdis a Hedera account that was created with a key list of 3 keys. Since the sender account is required to sign in a transfer transaction, all three keys are required to sign to complete the transfer of hbars from the sender account to the recipient account. The recipient account is not required to sign the transaction.
freezeWith(client)) the transaction from further modification so that transaction cannot be tampered with. This ensures each signer is signing the same exact transaction. The
transactionis then shared with each of the three signers to sign with their private keys.
transactionwith their private key. The signed transactions are then returned to you from each of the 3 signers, resulting in 3 separate signature bytes. The sample code below is for illustrative purposes as you would not have the private keys to sign the transaction for each signer.
signature 3), you will then apply them to the transaction (
transaction) to create a single transaction with all three signatures to submit to the network. You will take the
transactionthat we started with and apply the signature bytes to the transaction using
addSignature(). You will need the public keys of each of the signers to include in the method.
.setMaxTransactionFee()before submitting the transaction to the network.
signedTransaction. You can then compare the public keys returned from the
signedTransaction.getSignatures()to the public keys of each of the signers to verify the required keys have signed. Both the public key and public key bytes are returned.
signedTransaction. After the transaction is submitted, we will print the transaction ID to the console. You can use the transaction ID to search for transaction details in a mirror node explorer like Kabuto or DragonGlass. Be sure to select the correct network when searching for the transaction in a mirror node explorer. You can also check the status of a transaction by requesting the receipt of the transaction and obtaining the status.