Transaction Signing Requirements
- Admin key
- Transaction fee payer account key
- Please see the transaction and query fees table for the base transaction fee
- Please use the Hedera fee estimator to estimate your transaction fee cost
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| Method | Type | Description | Requirement |
|---|---|---|---|
setTokenId(<tokenId>) | TokenId | The ID of the token to delete | Required |
//Create the transaction
TokenDeleteTransaction transaction = new TokenDeleteTransaction()
.setTokenId(tokenId);
//Freeze the unsigned transaction, sign with the admin private key of the account, submit the transaction to a Hedera network
TransactionResponse txResponse = transaction.freezeWith(client).sign(adminKey).execute(client);
//Request the receipt of the transaction
TransactionReceipt receipt = txResponse.getReceipt(client);
//Obtain the transaction consensus status
Status transactionStatus = receipt.status;
System.out.println("The transaction consensus status is " +transactionStatus);
//v2.0.1
//Create the transaction and freeze the unsigned transaction for manual signing
const transaction = await new TokenDeleteTransaction()
.setTokenId(tokenId)
.freezeWith(client);
//Sign with the admin private key of the token
const signTx = await transaction.sign(adminKey);
//Submit the transaction to a Hedera network
const txResponse = await signTx.execute(client);
//Request the receipt of the transaction
const receipt = await txResponse.getReceipt(client);
//Get the transaction consensus status
const transactionStatus = receipt.status;
console.log("The transaction consensus status " +transactionStatus.toString());
//v2.0.5
//Create the transaction and freeze the unsigned transaction for manual signing
transaction, err = hedera.NewTokenDeleteTransaction().
SetTokenID(tokenId).
FreezeWith(client)
if err != nil {
panic(err)
}
//Sign with the admin private key of the account, submit the transaction to a Hedera network
txResponse, err := transaction.Sign(adminKey).Execute(client)
if err != nil {
panic(err)
}
//Request the receipt of the transaction
receipt, err = txResponse.GetReceipt(client)
if err != nil {
panic(err)
}
//Get the transaction consensus status
status := receipt.Status
fmt.Printf("The transaction consensus status is %v\n", status)
//v2.1.0
// Delete a token
let transaction = TokenDeleteTransaction::new()
.token_id(token_id);
// Freeze the unsigned transaction, sign with the admin private key of the token
let tx_response = transaction
.freeze_with(&client)?
.sign(admin_key)
.execute(&client).await?;
// Request the receipt of the transaction
let receipt = tx_response.get_receipt(&client).await?;
// Get the transaction consensus status
let status = receipt.status;
println!("The transaction consensus status is {:?}", status);
// v0.34.0
Was this page helpful?