功能
销毁压缩NFT
Last updated February 24, 2026
Summary
Burning a compressed NFT permanently removes it from the Bubblegum Tree using the burnV2 instruction. This page covers burning by owner, leaf delegate, and permanent burn delegate.
- Burn a cNFT using the burnV2 instruction
- Authorize burns via the leaf owner, leaf delegate, or permanent burn delegate
- Pass the coreCollection parameter when the cNFT belongs to a collection
burnV2指令可用于销毁压缩NFT,因此将其从Bubblegum树中永久移除。要授权此操作,当前所有者或委托权限(如果有)必须签署交易。该指令接受以下参数:
- 叶子所有者、叶子委托人或永久销毁委托人:压缩NFT的当前所有者、其委托权限(如果有)或集合的永久销毁委托人。如果资产是集合的一部分,必须传递
coreCollection参数。其中一个必须签署交易。
请注意,由于此指令替换Bubblegum树上的叶子,必须提供额外的参数来验证压缩NFT的完整性才能销毁它。由于这些参数对于所有改变叶子的指令都是通用的,它们在以下FAQ中有记录。幸运的是,我们可以使用辅助方法,该方法将使用Metaplex DAS API自动为我们获取这些参数。
交易大小
如果遇到交易大小错误,请考虑在getAssetWithProof中使用{ truncateCanopy: true }。详见FAQ。
集合
如果cNFT是集合的一部分,必须传递coreCollection参数。
销毁压缩NFT
import { getAssetWithProof, burnV2 } from '@metaplex-foundation/mpl-bubblegum';
const assetWithProof = await getAssetWithProof(umi, assetId, {truncateCanopy: true});
await burnV2(umi, {
...assetWithProof,
leafOwner: currentLeafOwner,
}).sendAndConfirm(umi)
Notes
- Burning is irreversible — the cNFT is permanently removed from the merkle tree.
- If the cNFT belongs to a collection, you must pass the
coreCollectionparameter. - The permanent burn delegate can burn any cNFT in the collection without the owner's signature, if the
PermanentBurnDelegateplugin is enabled on the collection.
FAQ
Glossary
| Term | Definition |
|---|---|
| burnV2 | The Bubblegum V2 instruction that permanently removes a cNFT from the merkle tree |
| Permanent Burn Delegate | A collection-level authority that can burn any cNFT in the collection without owner consent |
| Leaf Delegate | An account authorized by the cNFT owner to perform actions (transfer, burn, freeze) on their behalf |
| getAssetWithProof | A helper function that fetches all required parameters (proof, hashes, nonce, index) from the DAS API |
