在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:juliancwirko/nft-art-maker开源软件地址:https://github.com/juliancwirko/nft-art-maker开源编程语言:TypeScript 94.0%开源软件介绍:NFT art maker v5The primary task of this tool is to generate a randomized set of images from provided PNG layers and pack them into .car files. Then you can upload them to IPFS using nft.storage or other tools. Please test it before using it for the real stuff. It can always be buggy.
For older versions (check changelog):Based on:
The random assets generation is a customized and simplified version of the HashLips art engine logic. If you need more options and functionality, please use HashLips. The tool offers two different outputs:
nft-art-maker tool doesn't assume any way of uploading to ipfs, but I would recommend nft.storage where you can upload whole .car file. They offer free pinning service and Filecoin storage. So even if you delete it there or nft.storage stops working for some reason, the data will persist. Of course, learn about it first. They have a friendly UI, but you can also use the CLI tool for that. Table of Contents
How to use it:
You can always install it globally by Updating: when using npx, make sure that it takes the new version. You can always install it globally using Additionally you can:
Configuration optionsYou should use the config file at least for layers configuration. But there are also other configuration options. Whole config example: {
"description": "Your collection name",
"svgBase64DataOnly": true,
"layerConfigurations": [
{
"growEditionSizeTo": 100,
"layersOrder": [
{
"name": "face"
},
{
"name": "head"
},
{
"name": "eyes"
}
]
},
{
"growEditionSizeTo": 110,
"layersOrder": [
{
"name": "pinkyFace"
},
{
"name": "head"
},
{
"name": "eyes"
}
]
}
],
"shuffleLayerConfigurations": false,
"format": {
"width": 20,
"height": 20
},
"metadataSchemaMapper": {
"name": "name",
"description": "description",
"edition": "edition",
"attributes": "attributes",
"base64SvgDataUri": "base64SvgDataUri",
"image.href": "image.href",
"image.hash": "image.hash",
"image.ipfsUri": "image.ipfsUri",
"image.ipfsCid": "image.ipfsCid",
"image.fileName": "image.fileName"
},
"rarityDelimiter": "#",
"uniqueDnaTorrance": 10000,
"layersDirName": "layers",
"outputDirName": "output",
"outputJsonDirName": "json",
"outputImagesDirName": "images",
"outputJsonFileName": "metadata.json",
"outputImagesCarFileName": "images.car",
"outputMetadataCarFileName": "metadata.car",
"outputMetadataFileExtension": ".json",
"editionNameFormat": "#",
"tags": "tag1,tag2,tag3",
"preview": {
"thumbPerRow": 20,
"thumbWidth": 60,
"imageRatio": 1,
"imageName": "preview.png"
},
"nftStorageApiToken": "Your nft.storage API token",
"overwriteImageCID": "Your image CID after upload to your IPFS storage."
} layers configurationEvery subdirectory in your shuffleLayerConfigurationsEnabled by default, but you can always enable it to shuffle items from different Output types configurationYou can decide if you want to have encoded SVGs or standard PNGs files. Use The example of output {
"editions": [
{
"name": "",
"description": "",
"edition": 0,
"attributes": [
{
"trait_type": "",
"value": ""
}
],
"base64SvgDataUri": "",
"image": {
"href": "",
"hash": "",
"ipfsUri": "",
"ipfsCid": "",
"fileName": ""
}
}
],
"provenanceHash": "",
"metadataFilesIpfsBaseCid": ""
}
The example of a single output metadata file (for example 1.json): {
"name": "",
"description": "",
"edition": 0,
"attributes": [
{
"trait_type": "",
"value": ""
}
],
"base64SvgDataUri": "",
"image": {
"href": "",
"hash": "",
"ipfsUri": "",
"ipfsCid": "",
"fileName": ""
}
} Output metadata schema configurationFrom v5.2.0, you can modify the structure of the final metadata files. For now, if you would like to do that, you should configure all fields. Here is the default configuration (check how to use it in the .nftartmakerrc config file above): {
"metadataSchemaMapper": {
"name": "name",
"description": "description",
"edition": "edition",
"attributes": "attributes",
"base64SvgDataUri": "base64SvgDataUri",
"image.href": "image.href",
"image.hash": "image.hash",
"image.ipfsUri": "image.ipfsUri",
"image.ipfsCid": "image.ipfsCid",
"image.fileName": "image.fileName"
}
} As you can see here, we have a So, for example, let's change the structure to match the OpenSea requirements. Because not all fields are required by OpenSea, we will put them in a separate key. OpenSea metadata mapper proposition example: {
"metadataSchemaMapper": {
"name": "name",
"description": "description",
"edition": "edition",
"attributes": "attributes",
"base64SvgDataUri": "base64SvgDataUri",
"image.href": "external_url",
"image.hash": "image_additional_info.hash",
"image.ipfsUri": "image",
"image.ipfsCid": "image_additional_info.ipfsCid",
"image.fileName": "image_additional_info.fileName"
}
} We changed the OpenSea final metadata form example: {
"name": "",
"description": "",
"edition": 1,
"attributes": [
{
"trait_type": "",
"value": ""
}
],
"external_url": "",
"image_additional_info": {
"hash": "",
"ipfsCid": "",
"fileName": ""
},
"image": ""
} Deployed example: https://bafybeih6ii5v2hmeqsiwzkvqqw7oearegyysr6ibgpzfgmlf3ancjtghku.ipfs.nftstorage.link/111.json Important!
Some of the The example of an actual single metadata file: https://ipfs.io/ipfs/bafybeied5z3gndksdmbeaqxgbxryax6xp27nqfj3wy7c5x3usrol4sngam/149.json (the image is just for tests, poor quality, but also generated using the tool, there is a whole collection of 200 pieces so that you can change numbers to preview them). Layers directory structure (example)Here is an example of the layers/
├── eyes
│ ├── eyes1#100.png
│ ├── eyes2#100.png
│ ├── eyes3#100.png
│ ├── eyes4#100.png
│ ├── eyes5#100.png
│ └── eyes6#100.png
├── face
│ ├── face1#100.png
│ ├── face2#100.png
│ ├── face3#100.png
│ ├── face4#100.png
│ └── face5#100.png
└── head
├── head1#100.png
├── head2#100.png
├── head3#100.png
├── head4#100.png
├── head5#100.png
├── head6#100.png
├── head7#100.png
└── head8#100.png Upload packed car files to nft.storageThis package has a small helper to upload the packed car files to nft.storage. To archive the only requirement is addition in the .nftartmakerrc config file: Update images base CIDThis is useful when you want to upload image folder with NFT UP or Pinata (or any other 3rd party IPFS storage provider.) In case you are dealing with a very large collection and the ipfs upload failed for some reasons you can first upload the images to an IPFS provider. After you received the CID of the image location following steps are required:
Try the example
LicenseMIT Contact |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论