I want mint nft with many metadata?
1 Answer
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,
);