Skip to main content

Nft Tool

Generate zip

Nft tool is to generate metadata zip file through the image collection and command line tool

  • size: The total number of NFTs generated,maximum 5000, example value (100)
  • imageOrder: When generating NFT, the generation method. Available values: SEQUENTIAL,SEQUENTIAL_ALTERNATE,RANDOM,example value (RANDOM)
    tip

    SEQUENTIAL: Generate json files proportionally according to the number and size of pictures
    SEQUENTIAL_ALTERNATE: Polling to generate json according to the order of pictures
    RANDOM: Randomly use pictures to generate json

  • file: Picture zip package,that you want to generate nft pictures,size cannot exceed 100M,zip file cannot contain a directory. And the file name should adopt ASCII (Chinese not supported),example value(images.zip)
  • mapName(optional): When generating an NFT, the image name corresponds to the mapping of the NFT name. Dynamic variables are supported. Currently only {tokenId}. If not set, it is the file name of the picture, example value ( {picture name}|nftName{tokenId},{picture name}|nftName2)
  • mapDesc(optional): When generating an NFT, the image name corresponds to the mapping described by the NFT. Dynamic variables are supported. Currently only {tokenId}. If not set, it is empty, example value ({picture name}|nftDesc{tokenId}, {picture name}|nftDesc2)

type this command in command prompt

curl -X POST -H  "Accept:*/*" -H  "Content-Type:multipart/form-data" -F  "size=100" -F  "imageOrder=RANDOM" -F  "file=@images.zip" "https://www.niftyin.xyz/nifty-in-api/sys/image2metadataJson"  -o result.zip

When you execute the above command, you will get a zip file.The zip file contains "image.zip","json.zip" and token.csv. The modification time of the above three files is UTC time,token.csv describes the json file generation details. You can modify the information in the token.csv file, and then execute the following command to regenerate "json.zip"

curl -X POST -H  "Accept:*/*" -H  "Content-Type:multipart/form-data" -F  "file=@token.csv" "https://www.niftyin.xyz/nifty-in-api/sys/csv2metadataJson"  -o json.zip

After you execute the above command, you will get a zip package contains json file as described in the token.csv

tip

If your system does not have the curl tool,download the curl tool from here curl tool