Submit a transaction
Method
Type
Description
//Create the transaction
AccountCreateTransaction transaction = new AccountCreateTransaction()
.setKey(newPublicKey)
.setInitialBalance(new Hbar(1000));
//Sign with client operator private key and submit the transaction to a Hedera network
TransactionResponse txResponse = transaction.execute(client);
//Get the transaction ID
TransactionId transactionId = txResponse.transactionId;
//Get the account ID of the node that processed the transaction
AccountId nodeId = txResponse.nodeId;
//Get the transaction hash
byte [] transactionHash = txResponse.transactionHash;
System.out.println("The transaction ID is " +transactionId);
System.out.println("The transaction hash is " +transactionHash);
System.out.println("The node ID is " +nodeId);
//v2.0.0Last updated