These files provide the building blocks to:
- Bulk create mock NFTs on a local network, no images required
- Generate NFT images from trait .pngs
- Upload files to IPFS (implementation in progress)
- And an e2e example of generating NFTs + metadata from traits, storing them in IPFS (in progres), and creating them on a parachain
Launch trappist parachain locally. Instructions found here
cd nft-creator
yarn
ts-node create-mock-nfts.ts
mock-nft-config.jsonexample config passed for mock NFTs. No images.trappist-nft-config.jsonconfig used for trappist NFTs with traitscreate-mock-nfts.tswill generate mock metadata, create collection, and populate each NFT on-chain with the mock metadata CID and attributes.create-trappist-nfts.tswill generate NFT images & metadata from thetrappist-nfts/traitsfolder. Populates the NFT metadata on-chain
The creation scripts include examples on implementing custom interfaces to provide to the NftGenerator and NftCreator classes.
nft-generator.tsis a reusable NFT generator class that will create NFT images from trait images and provide metadatanft-creator.tsis reusable class that will bulk populate NFT metadata and images on-chain. It is configurable to upload metadata & images on-chain based on theIpfsManagerimplementationinterfaces/config.tsthe interface that config files must followinterfaces/ipfs-manager.tsa simple interface for IPFS to allow configurability for IPFS connections & apisinterfaces/metadata-interface.tsthe metadata interface that the NFTs must use. Based on common metadata standards. Example hereinterfaces/name-and-description.tsinterfaces to implement custom NFT naming and description generation. Will be provided to theNftGeneratorclass.