Developer Questions

Ask a Question
Back to All

how to BatchMint in XUMM

here is an example of how im using xrpl to batchminting nfts, 100+ nfts at once. how can i do the same with xumm without having the user to sign the tx 100 times.
https://xrpl.org/batch-minting.html

const mintBatch = async (account,tickets) => {  
  try {
    
    const mintedTxs = [];

for (let i = 0; i < tickets.length; i++) {
  const transactionBlob = {
    TransactionType: "NFTokenMint",
    Account: account.classicAddress,
    URI: xrpl.convertStringToHex("some url" + i),
    Flags: parseInt("9"),
    TransferFee: 100,
    Sequence: 0,
    TicketSequence: tickets[i],
    LastLedgerSequence: null,
    NFTokenTaxon: 0,
  };
  mintedTxs.push(client.submit(transactionBlob, { wallet: account }));
}

Promise.all(mintedTxs)
  .then(async (txs) => {
    console.log(txs);
    return "done!";
  })
  .catch((err) => {
    console.log(err);
  });