Delete a topic
Constructor
Description
new ConsensusTopicDeleteTransaction()Method
Type
Description
ConsensusTopicDeleteTransaction transaction = new ConsensusTopicDeleteTransaction()
.setTopicId(newTopicId);
//Sign the transaction with the admin key, sign with the client operator and submit the transaction to a Hedera network, get the transaction ID
TransactionId txId = transaction.build(client).sign(adminKey).execute(client);
//Request the receipt of the transaction
TransactionReceipt receipt = txId.getReceipt(client);
//Get the transaction consensus status
Status transactionStatus = receipt.status;
System.out.println("The transaction consensus status is " +transactionStatus);
//v1.3.2const transaction = new ConsensusTopicDeleteTransaction()
.setTopicId(newTopicId);
//Sign the transaction with the admin key, sign with the client operator and submit the transaction to a Hedera network, get the transaction ID
const txId = await transaction.build(client).sign(adminKey).execute(client);
//Request the receipt of the transaction
const receipt = await txId.getReceipt(client);
//Get the transaction consensus status
const transactionStatus = receipt.status;
console.log("The transaction consensus status is " +transactionStatus);
//v1.4.4Get transaction values
Method
Type
Description
Requirement
Last updated