juliancwirko / nft-art-maker

NFT Art Maker - generates images and metadata files, packs them into IPFS CAR files, and uploads them using nft.storage. All from provided PNG layers.
MIT License
98 stars 36 forks source link

A word about the provenance hash / image hash #15

Closed dohomi closed 2 years ago

dohomi commented 2 years ago

Hello

I'd love to see a little explanation about the governance hash and how this is being used internally / or how it would be used after pack and uploading the metadata to provide solution for unchanged order of the images.

Thanks!

juliancwirko commented 2 years ago

The provenance hash is perfectly explained here: https://medium.com/coinmonks/the-elegance-of-the-nft-provenance-hash-solution-823b39f99473.

It is a sha256 hash of all sha256 hashes of images in the order of generation (the order from the main metadata.json file, which corresponds to metadata files per asset). You can save it on contract and publish it before the mint is started or/and assets are revealed. It depends on minting functionality.

dohomi commented 2 years ago

@juliancwirko thanks thats a good explanation. How does the check of an image works with the governance hash? Is there some online tool which ensures the validation of the image hash? A quick example would be helpful in the README

juliancwirko commented 2 years ago

The image is, in the end, a byte code. So every converter image <> sha256 should work, for example https://codepen.io/dulldrums/pen/RqVrRr