Skip to content

mssteuer/node-delegation-listener-with-reward

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-delegation-listener-with-reward

Introduction

This simple application performs the following tasks:

  1. Connect to a CSPR.cloud WebSocket stream and listen for delegations to a specific validator
  2. Upon detecting such delegation, call the OpenAI DALL-E API to create a unique image
  3. Call the FileBase API to upload the unique image to IPFS
  4. Create and mint a CEP-78 NFT to the delegator, using the unique image as its asset

Prerequisites

  1. OpenAI Developer Account with API access
  2. FileBase Free Account with API access
  3. 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)
  4. An NFT collection owned by the account from which you'll mint. You can use CSPR.studio to create it

Set Up

  1. Clone this repo from GitHub
  2. npm install
  3. Copy .env.example into .env and configure your environment
  4. Provide a base image for your NFT assets
  5. Run this thing! npm run start

Advanced

I've provided a serviced template, so you can run this through systemctl on your server

Like This? ❤️

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published