This simple application performs the following tasks:
- Connect to a CSPR.cloud WebSocket stream and listen for delegations to a specific validator
- Upon detecting such delegation, call the OpenAI DALL-E API to create a unique image
- Call the FileBase API to upload the unique image to IPFS
- Create and mint a CEP-78 NFT to the delegator, using the unique image as its asset
- OpenAI Developer Account with API access
- FileBase Free Account with API access
- CSPR.cloud Account (free access should suffice, but doesn't provide replay of events in case of disconnects. For that, and higher throughput, contact MAKE for elevated access)
- An NFT collection owned by the account from which you'll mint. You can use CSPR.studio to create it
- Clone this repo from GitHub
npm install- Copy
.env.exampleinto.envand configure your environment - Provide a base image for your NFT assets
- Run this thing!
npm run start
I've provided a serviced template, so you can run this through systemctl on your server
If you enjoy this little app, feel free to delegate some $CSPR to my Validator, and you might end up getting a cool and certainly unique NFT automatically seconds later!