Claim Reddish Pixels
This is an example on how to programatically claim pixels on the redish pixel game canvas by sending messages to the HCS (Hedera Consensus Services). Please be aware that dedicated canvases without user cooldown exist for botting.
- A Hedera account with at least 0.0001$ of Hbar
Run the following commands to get started
# create directory mkdir CanvasAutomation cd CanvasAutomation # Setup project files npm init -y # Install dependencies npm i @hashgraph/sdk dotenv typescript # Create necessary empty files touch .env touch index.ts # Setup typescript tsc --init
Copy the content of
env into the correct files and replace the missing values with your desired input.
You will need to provide:
- your hedera account id
- your private key
- the hcs topic id of the game you want to interact with (additionally location, description and color)
An index.js file should now appear alongside the index.ts file. (You can also run
tsc --watch) and the index.js file will automatically be regenerated each time you make changes to the typescript file.