Image created by Ai.
Hey everyone! Since getting back into the swing of things on Hive, I had spent a lot of time watching how the devs here building tools that actually make our lives easier. It inspired me to stop just being a user and try my hand at some "lil coding steps." Iβm starting small, but I wanted to build something that felt useful for people who manage their accounts on the go.
Today I'm sharing delegations-managerv0.0.1.js. Itβs a slimmed-down terminal auditor designed specifically for Termux and mobile users.
If you've ever tried to run a terminal script on your phone, you know the struggle. Most of them are too wide, so the lines wrap around and make the data look like a mess. I wanted to create a "Slim Edition" that fits perfectly on a mobile screen without any of those extra characters or broken boxes.
I set the default audit account to @stayoutoftherzβmostly because heβs one of the devs who inspired me to start this journey, and his account has a lot of interesting delegation data to look at. But of course, you can enter any username you want to check.
The goal of this version is clarity. When you run the script, it gives you a clean breakdown of your resources. It doesn't just show you a percentage; it calculates your actual power in real-time.
| Feature | Description |
|---|---|
| HP Resource | Calculates Total HP vs. Available HP (after delegations). |
| RC Math | Converts your Resource Credits into HP Equivalent units. |
| HP Detail | Shows exactly which accounts you are supporting with HP. |
| Mobile UI | 45-character width to prevent line wrapping in Termux. |
If you want to run this auditor on your own device, just follow these steps:
pkg install nodejsβClone the project from GitHub:
git clone https://github.com/oneteacher365/rc-delegations.git
cd rc-delegations
npm install
npm start
Note: By using npm start, you don't have to worry about typing the long filenameβthe package.json handles it for you!
Note: You don't need a posting key to audit, as this only reads public blockchain data!
Iβll admit, I ran into some annoying bugs during the process. On mobile, the input prompt kept dividing the username while I was typing, which looked terrible. I finally fixed it so the input stays on its own line.
Optimization is a workout: I also realized that hitting
Ctrl+Con a tiny phone keyboard is a pain, so I made it so you can just type 'X' and hit enter to close the dashboard safely.
It took me way longer than it should have to get the borders to stay straight, but thatβs part of the learning process!
This is just a v0.0.1 "Alpha" release. Right now, it shows you exactly who you are delegating HP to, but it only shows the total RC you've sent out as a single number.
For v0.0.2, I want to try and list the individual RC slots too, so you can see exactly which accounts are using your resource credits. Iβm still learning the different API calls for that, but Iβm excited to keep improving this.
If youβre a Termux user or a fellow junior coder, Iβd love to hear what you think!
Note: Please excuse any typos! Writing this on a mobile screen after staring at code all day is a bit of a challenge for the eyes lol.
#Development #Programming #HiveDev #Termux #LearningToCode #MyJourney #Tech