Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
What is the "mint" key referring to in Metaplex SDK JS's token burning function parameters?

I am trying to burn a token (that is definitely minted and exists) on the Solana network using the javascript Metaplex SDK.

Their token burning function (written at the bottom) takes in an object of this interface for a parameter:

interface IBurnTokenParams {
  connection: Connection;
  wallet: Wallet;
  token: PublicKey;
  mint: PublicKey;
  amount: number | u64;
  owner?: PublicKey;
  // close token account after
  close?: boolean;
}

But nowhere in their docs do they explain exactly what the "mint" field represents. I have tried the Token's Public Address (which I think is what the 'token' field is for), the Mint Authority Address, and the Update Address, and none of them seem to work.

Here is the function:

export const burnToken = async ({
  connection,
  wallet,
  token,
  mint,
  amount,
  owner,
  close = true,
}: IBurnTokenParams): Promise<IBurnTokenResponse> => {
  const tx = new Transaction({ feePayer: wallet.publicKey }).add(
    Token.createBurnInstruction(
      TOKEN_PROGRAM_ID,
      mint,
      token,
      owner ?? wallet.publicKey,
      [],
      amount,
    ),
  );

  if (close) {
    tx.add(
      Token.createCloseAccountInstruction(
        TOKEN_PROGRAM_ID,
        token,
        wallet.publicKey,
        owner ?? wallet.publicKey,
        [],
      ),
    );
  }

  const txId = await sendTransaction({ connection, wallet, txs: [tx] });

  return { txId };
};
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda