Developer Questions

Ask a Question
Back to All

trying to mint NFT using NFTokenMint

this is my payload

const request: any = {
txjson: {
TransactionType: "NFTokenMint",
Account: publicAddress,
URI: "697066733A2F2F6261666B72656965696979727A613670706179687635716675366E6B636477646D377233366775666F366A796B64357A6C6D7A7735617467716479",
Flags: 8,
TransferFee: 10,
NFTokenTaxon: 0,
},
user_token: issued_user_token,
};

  const subscription = await Sdk.payload.createAndSubscribe(
    request,
    (event) => {
      console.log("New payload event:", event.data);
      if (event.data.signed === true) {
        return event.data;
      }
      if (event.data.signed === false) {
        return false;
      }
    }
  );
  const resolveData: any = await subscription.resolved;
  if (resolveData.signed === false) {
    console.log("The sign request was rejected :(");
  }
  if (resolveData.signed === true) {
    console.log("Woohoo! The sign request was signed :)");
  }

the error im getting
Error: Payload encoding error: checksum_invalid