async function main() {
const client = Client.forTestnet(); // Create a client for the Hedera testnet
client.setOperator(myAccountId, myPrivateKey); // Set the operator account for the client
const transaction = new TransferTransaction() // Create a transfer transaction
.addHbarTransfer(myAccountId, new Hbar(-10)) // Subtract 10 HBars from the operator account
.addHbarTransfer(otherAccountId, new Hbar(10)); // Add 10 HBars to the other account
console.log(`Doing transfer from ${myAccountId} to ${otherAccountId}`);
const txId = await transaction.execute(client); // Execute the transfer transaction
const receipt = await txId.getReceipt(client); // Get the receipt of the transaction
const transactionStatus = receipt.status; // Get the transaction consensus status
console.log("The transaction consensus status is " + transactionStatus);
const queryMine = new AccountBalanceQuery().setAccountId(myAccountId); // Create a query for operator account balance
const queryOther = new AccountBalanceQuery().setAccountId(otherAccountId); // Create a query for other account balance
const accountBalanceMine = await queryMine.execute(client); // Execute the query for operator account balance
const accountBalanceOther = await queryOther.execute(client); // Execute the query for other account balance
console.log(`My account balance ${accountBalanceMine.hbars} HBar, other account balance ${accountBalanceOther.hbars}`);
}