0

i'm trying to use metaplex mpl token metadata v3 to burn an nft, and i need the instruction. When i use burnNft method, it returns a transaction builder instance.

Is there a way to get only the instruction like in old versions ? (i build the transaction myself)

thanks !

Edit

I'm using JS (vue) I would like to be able to do the following :

let transaction = new Transaction()
let instruction = await burnNft(umi, accounts)
transaction.add(instruction)

But i'm missing something since burnNft doesn't return an instruction, but a transactionBuilder, and i would like to get only the burn instruction

3
  • what do you mean when you say get only the instruction?
    – Jimii
    Sep 11, 2023 at 11:01
  • Please specify which language, JS/TS or Rust. Sep 11, 2023 at 11:18
  • i'm using JS (vue) i would like to be able to do the following : let transaction = new Transaction() let instruction = await burnNft(umi, accounts) transaction.add(instruction)
    – Effe2
    Sep 11, 2023 at 14:29

1 Answer 1

0

On the rust client side you can use Metaplex builders to do this. https://github.com/metaplex-foundation/mpl-token-metadata/blob/main/programs/token-metadata/program/tests/burn.rs

On anchor, you can use the burn_nft or burn_edition_nft

If you are using a pNFT or cNFT these methods won't work as pNFTs require additional accounts and cNFTs use the bubblegum program

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.