0

I want mint nft with many metadata?

https://meshjs.dev/apis/transaction/minting

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – eddex
    May 10, 2023 at 13:57

1 Answer 1

0

Below is the example from the page you referenced, but with additional metadata fields attached. You can create your own custom metadata fields on the asset this way.

const assetMetadata: AssetMetadata = {
  "name": "Mesh Token",
  "image": "ipfs://QmRzicpReutwCkM6aotuKjErFCUD213DpwPq6ByuzMJaua",
  "mediaType": "image/jpg",
  "description": "This NFT is minted by Mesh (https://meshjs.dev/).",
  "custom1": "Your custom value 1",
  "custom2": "Your custom value 2"
};
const asset: Mint = {
  assetName: 'MeshToken',
  assetQuantity: '1',
  metadata: assetMetadata,
  label: '721',
  recipient: 'addr_test1vpvx0sacufuypa2k4sngk7q40zc5c4npl337uusdh64kv0c7e4cxr' 
};
tx.mintAsset(
  forgingScript,
  asset,
);

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.