Deleting assets
Authorized by: Asset Manager
Created assets can be destroyed only by the asset manager account. All of the assets must be owned by the creator of the asset before the asset can be deleted.
1 """2 Send an asset destroy transaction destroying an asset with asset id 12343 All of the assets must be owned by the creator of the asset before the asset can be deleted.4
5 Parameters for destroying an asset.6 - sender: The address of the account that will send the transaction7 - asset_id: ID of the asset8 """9 txn_result = algorand_client.send.asset_destroy(10 AssetDestroyParams(11 sender=account_a.address,12 asset_id=1234,13 )14 )
const deleteTxn = algosdk.makeAssetDestroyTxnWithSuggestedParamsFromObject({ from: manager.addr, suggestedParams, assetIndex,});
const signedDeleteTxn = deleteTxn.signTxn(manager.privateKey);await algodClient.sendRawTransaction(signedDeleteTxn).do();await algosdk.waitForConfirmation( algodClient, deleteTxn.txID().toString(), 3);
goal asset destroy --creator <creator-address> --manager <asset-manager-address> --asset <asset-name> -d data
See also