-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·400 lines (397 loc) · 18.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=UTF-8 name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi">
<meta name="description"
content="Helium community app built to check the HNT rewards of any miner of the Helium Blockchain using a predefined time period or a custom one.">
<title>Helium (HNT) Rewards Checker</title>
<link rel="canonical" href="https://hntrewards.xyz/" />
<link rel="shortcut icon" href="javascript:;">
<script src="https://kit.fontawesome.com/6fe454c34b.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css">
<script type="module" src="script.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-BK9BPH2W48"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag () { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-BK9BPH2W48');
</script>
</head>
<body>
<!--
Flash Of Unstyled Content (FOUC) fix: <script>0</script> at body's top and
domReady() trick.
Source:
https://primative.net/blog/how-to-get-rid-of-the-flash-of-unstyled-content
Warning message: "Layout was forced before the page was fully loaded. If
stylesheets are not yet loaded this may cause a flash of unstyled content."
-->
<script>0</script>
<div id="about-btn" class="floating-div" title="Go to the About section">
<i id="about-icon" class="floating-icon fa-solid fa-circle-info"></i>
</div>
<div id="theme-toggler" class="floating-div" title="Toggle light/dark theme">
<i id="theme-toggler-icon" class="floating-icon fa-solid fa-moon"></i>
</div>
<div id="totop-btn" class="floating-div hide" title="Go back to the rewards checker">
<i id="totop-icon" class="floating-icon fa-solid fa-arrow-turn-up"></i>
</div>
<div id="container">
<h1>
<h3><span class="accent" title=" Helium (HNT) Rewards Checker">Helium</span> Rewards <span
class="accent">Checker</span>
</h3>
</h1>
<div
title="Donate HNT, MOBILE, IOT, DC, or SOL to keep this app alive (cover costs, keep it ad and annoyances free, etc.)">
<div class="row flex">
<div class="flex-col">
<div class="fa-solid fa-circle-dollar-to-slot top-dollar"></div>
<div class="fa-solid fa-hand-holding-dollar fa-flip-horizontal bottom-dollar">
</div>
</div>
<div>
<div class="center-align"><b>DONATE</b></div>
<div class="QRcode-frame tooltip">
<span class="tooltiptext">Donate to this address using the Helium Wallet app</span>
<div id="qrcode"></div>
</div>
<div class="center-align"><b>PLEASE</b></div>
</div>
<div class="flex-col">
<div class="fa-solid fa-solid fa-circle-dollar-to-slot top-dollar"></div>
<div class="fa-solid fa-hand-holding-dollar bottom-dollar"></div>
</div>
</div>
</div>
<form id=" currency-form" autocomplete="off">
<div>
<label for="fiat-select">Fiat currency</label>
<select id="fiat-select" autocomplete="off" dir="rtl">
<option value="aud">AUD</option>
<option value="brl">BRL</option>
<option value="cad">CAD</option>
<option value="chf">CHF</option>
<option value="cny">CNY</option>
<option value="eur">EUR</option>
<option value="gbp">GBP</option>
<option value="hkd">HKD</option>
<option value="idr">IDR</option>
<option value="ils">ILS</option>
<option value="inr">INR</option>
<option value="jpy">JPY</option>
<option value="krw">KRW</option>
<option value="mxn">MXN</option>
<option value="rub">RUB</option>
<option value="sar">SAR</option>
<option value="sgd">SGD</option>
<option value="thb">THB</option>
<option value="twd">TWD</option>
<option value="usd" selected>USD</option>
</select>
</div>
</form>
<details id="stats-details" open>
<summary title="Helium network (blockchain) stats">
<span class="left icon"><i id="stats-ico-left" class="fa-solid fa-minus"></i></span>
<span class="accent">HNT</span> stats
<span class="right icon"><i id="stats-ico-right" class="fa-solid fa-minus"></i></span>
</summary>
<table id="hnt-stats">
<tr>
<td>Price</td>
<td>Supply</td>
<td title="Rewards distributed last 24 hours">Rewards</td>
</tr>
<tr class="accent">
<td class="loading" id="hnt-price" title="USD"></td>
<td class="loading" id="hnt-supply" title="Token supply"></td>
<td class="loading" id="hnt-rewards" title="HNT"></td>
</tr>
<tr>
<td>Miners</td>
<td>Validators</td>
<td>OUIs</td>
</tr>
<tr class="accent">
<td class="loading" id="total-miners"></td>
<td class="loading" id="total-validators"></td>
<td class="loading" id="total-ouis"
title="Organizationally Unique Identifiers, each LoRaWAN Network Server (LNS)">
</td>
</tr>
<tr>
<td>Blocks</td>
<td>Transactions</td>
<td>Challenges</td>
</tr>
<tr class="accent">
<td class="loading" id="total-blocks" title="Total blocks on the blockchain"></td>
<td class="loading" id="total-transactions" title="Total transactions on the blockchain"></td>
<td class="loading" id="total-challenges"
title="Total challenges (Proof of Coverage or PoC) on the blockchain"></td>
</tr>
</table>
</details>
<form id="check-form" autocomplete="on">
<label id="miner-id-label" for="miner-name">Miner name</label>
<span class="tooltip">
<span id="no-miner-found" class="errortiptext hide">No miner was found with this name</span>
<input id="miner-name" type="text" placeholder="e.g. Happy Banana Woodpecker" maxlength="50"
pattern="^\s*[a-zA-Z]+( [a-zA-Z]+){2}\s*$" autocomplete="on" autofocus required>
</span>
<div>
<label id="mining-time" for="period-select">
<i class="flip" class="fa-solid fa-coins"></i>Mined
last</label>
<select id="period-select" dir="rtl" autocomplete="off" disabled>
<option value="1h">1h</option>
<option value="2h">2h</option>
<option value="3h">3h</option>
<option value="6h">6h</option>
<option value="12h">12h</option>
<option value="24h">24h</option>
<option value="2d">2d</option>
<option value="3d">3d</option>
<option value="7d">7d</option>
<option value="14d">14d</option>
<option value="30d">30d</option>
<option value="60d">60d</option>
<option value="90d">90d</option>
<option value="180d">180d</option>
<option value="1y">1y</option>
<option value="2y">2y</option>
<option value="max" selected>max</option>
</select>
</div>
<div class="left-align">
<input id="custom-check" type="checkbox" autocomplete="off">
<label id="custom-label" for="custom-check">Custom period: <span id="time-interval">1
day</span></label>
</div>
<div id="start-block">
<label class="dates-icons" title="Start datetime" for="date-start"><i
class="fa-solid fa-plane-departure"></i></label>
<input title="Start datetime" id="date-start" type="datetime-local" step="1" class="default-font" required
disabled>
<label class="dates-icons mirrored" title="Start datetime" for="date-start"><i
class="fa-solid fa-plane-departure"></i></label>
</div>
<div id="end-block">
<label class="dates-icons" title=" End datetime" for="date-end"><i
class="fa-solid fa-plane-arrival"></i></label>
<input title="End datetime" id="date-end" type="datetime-local" step="1" class="default-font" required disabled>
<label class="dates-icons mirrored" title=" End datetime" for="date-end"><i
class="fa-solid fa-plane-arrival"></i></label>
</div>
<button id="check" type="submit">Check</button>
</form>
<div id="loader"></div>
<div id="results" class="remove">
<table id="rewards-table">
<tr>
<th><i class="fa-solid fa-sack-dollar"></i></th>
<th>Total</th>
<th>Per day</th>
<th>Per hour</th>
</tr>
<tr class="accent">
<td><b>HNT</b></td>
<td id="rewards"></td>
<td id="rewards-day"></td>
<td id="rewards-hour"></td>
</tr>
<tr>
<td id="rewards-fiat-lbl"><b>USD</b></td>
<td id="rewards-fiat"></td>
<td id="rewards-fiat-day"></td>
<td id="rewards-fiat-hour"></td>
</tr>
</table>
<details id="miner-details" open>
<summary title="Helium network (blockchain) stats">
<span class="left icon"><i id="miner-ico-left" class="fa-solid fa-minus"></i></span>
<span id="info-th-left"><i class="fa-solid fa-tower-broadcast"></i></span>
<span>Miner info</span>
<span id="info-th-right"><i class="fa-solid fa-tower-broadcast"></i></span>
<span class="right icon"><i id="miner-ico-right" class="fa-solid fa-minus"></i></span>
</summary>
<table id="miner-info-content">
<tr>
<td title="Miner's address" id="id-icon"><i class="fa-solid fa-at"></i></td>
<td><a id="miner-id" title="See the miner on the Helium explorer" target="_blank" rel="noopener"></a>
</td>
<td id="copy-clip">
<span class="tooltip">
<span class="tooltiptext" id="miner-tooltip">Copy miner's address to clipboard</span>
<i class="fa-solid fa-clipboard-list"></i>
</span>
</td>
</tr>
<tr>
<td title="Owner's address" id="icon-owner"><i class="fa-solid fa-user"></i></td>
<td><a id="owner-id" title="See the owner on the Helium explorer" target="_blank" rel="noopener"></a>
</td>
<td id="copy-clip-owner">
<span class="tooltip">
<span class="tooltiptext" id="owner-tooltip">Copy owner's address to clipboard</span>
<i class="fa-solid fa-clipboard-list"></i>
</span>
</td>
</tr>
<tr title="Transmit scale">
<td><i class="fa-solid fa-scale-balanced"></i></td>
<td id="scale"></td>
<td><i class="fa-solid fa-scale-balanced"></i></td>
</tr>
<tr title="Hexagon miners">
<td class="flex-inline">
<div id="hexico-left" class="hexico-black"></div>
</td>
<td><a title="See the hexagon on the Helium explorer" target="_blank" id="hexagon" href="#"
rel="noopener"></a></td>
<td class="flex-inline">
<div id="hexico-right" class="hexico-black"></div>
</td>
</tr>
<tr title="Location">
<td><i class="fa-solid fa-location-dot"></i></td>
<td><a target="_blank" id="location" href="#" rel="noopener"></a></td>
<td><i class="fa-solid fa-location-dot"></i></td>
</tr>
<tr title="Added date">
<td><i class="fa-solid fa-cake-candles"></i></td>
<td id="added-date"></td>
<td><i class="fa-solid fa-cake-candles"></i></td>
</tr>
</table>
</details>
<details id="urls-details">
<summary title="API calls (URLS) used to retrieve this data">
<span class="left icon"><i id="queries-ico-left" class="fa-solid fa-plus"></i></span>
<span>Queries used</span>
<span class="right icon"><i id="queries-ico-right" class="fa-solid fa-plus"></i></span>
</summary>
<div id="api-urls">
</div>
</details>
</div>
</div>
<div id="about-container">
<h3 title="About this app">
About <span title="HNT" class="accent">Helium</span> Rewards <span class="accent">Checker</span>
</h3>
<div
title="Donate HNT, MOBILE, IOT, DC, or SOL to keep this app alive (cover costs, keep it ad and annoyances free, etc.)">
<div class="row flex">
<div class="flex-col">
<div class="fa-solid fa-circle-dollar-to-slot top-dollar"></div>
<div class="fa-solid fa-hand-holding-dollar fa-flip-horizontal bottom-dollar">
</div>
</div>
<div>
<div class="center-align"><b>PLEASE</b></div>
<div class="QRcode-frame tooltip">
<span class="tooltiptext">Donate to this address using the Helium Wallet app</span>
<div id="qrcode"></div>
</div>
<div class="center-align"><b>DONATE</b></div>
</div>
<div class="flex-col">
<div class="fa-solid fa-solid fa-circle-dollar-to-slot top-dollar"></div>
<div class="fa-solid fa-hand-holding-dollar bottom-dollar"></div>
</div>
</div>
</div>
<p>
<span title=" HNT" class="accent">Helium</span> Rewards <span class="accent">Checker</span>
was a Helium community app built to check the HNT rewards of any miner of the <a target="_blank" rel="noopener"
href="https://www.helium.com/">Helium Blockchain</a> using a predefined time period
or a custom one. This is written in the past tense since according to <a target="_blank" rel="noopener"
href="https://docs.helium.com/devblog/2023/07/19/legacy-api-shutdown/">this Helium's blog post</a>, from the
28th of July of 2023, the legacy API will be shut down. So chances are that if you are reading this, this app
does not work anymore. But anyway, feel free to check the demos and the source code on its repo:
<a target="_blank" rel="noopener"
href="https://github.com/mvidaldp/hntrewards">https://github.com/mvidaldp/hntrewards</a>
</p>
<p>
Also, unfortunalety for all Helium community developers like me, on the 18th of April 2023, <a target="_blank"
rel="noopener" href="https://docs.helium.com/solana/migration/">Helium migrated to the Solana
blockchain</a>, stopped rewarding HNT and started rewarding IOT, and also changed the former open and free <a
target="_blank" rel="noopener" href="https://docs.helium.com/blockchain/api">Helium's Blockchain API</a> for a
new one using <a target="_blank" rel="noopener" href="https://aws.amazon.com/">AWS</a>, so not for free anymore.
<br>
Until now I do not consider updating this web to query the IOT rewards since using AWS is not free. However, <a
target="_blank" rel="noopener" href=" https://docs.helium.com/oracles/oracle-data/ ">Helium is planning to
provide a decentralized option for data access in the future</a>.
And they are also planning to provide a CSV archive of the historical data. Hence, in the future, I could even
consider restoring the functionality of
this app and enhancing it including the possibility to query the after-migration data.
</p>
<p>
<span title=" HNT" class="accent">Helium</span> Rewards <span class="accent">Checker</span> allowed you to see the
value of the rewards in different fiat currencies and other relevant
information: miner's and owner's address, transmit scale, total miners in hexagon, location, date it was added,
total rewards since a miner was added, average rewards per day/hour within the selected period, etc.
<p>Another reason that brought me to develop this tool is to provide real-time and more customized or user-specified
information about the
HNT
rewards. The <a target="_blank" rel="noopener" href="https://explorer.helium.com/">Helium
Explorer</a> and the
Helium Hotspot App were
not only quite slow but also not flexible to query rewards for specific periods of time. They also did not give
you real-time information (at least not the most
up-to-date from its blockchain).
</p>
<p>
Essentially this web app used <a target="_blank" rel="noopener"
href="https://docs.helium.com/blockchain/api">Helium's Blockchain API</a> to
retrieve the
desired information directly from <a target="_blank" rel="noopener" href="https://www.helium.com/">Helium's
Blockchain</a>,
combined with the current <a target="_blank" rel="noopener" href="https://www.coingecko.com/en/coins/helium">HNT
fiat
value</a> via <a target="_blank" rel="noopener"
href="https://www.coingecko.com/en/api/documentation">Coingecko's
API</a>. In case you have any suggestions or found any bugs, please write me at <span
class="accent">soacmaster[at]proton.me</span>
</p>
<p>
Last but not least, this app was free (and it wanted to stay as such: no ads, no
annoyances). That was the reason I set the donation QR codes here. And I would like to thank all the donors for
supporting it. Donating is still possible via the Helium Wallet app, by adding a new contact using the QR code of
the Solana address and then selecting the contact for sending tokens (HNT, MOBILE, IOT, DC, or SOL). Donating via
Solana app should work as well.
<!-- The site was having around 1000 unique visits a month. If on average every
user would donate at least 0.1 HNT, I could not only cover the hosting, domain, developing and
mantaining
costs, but it would also allow me to improve it a lot and develop an Android and iOS app out of
it. -->
In a nutshell, if you think this app was and could be again useful, please use the QR code and donate to support
it.
</p>
</div>
<!-- Simple modal dialog containing a form -->
<dialog id="miner-dialog">
<form id="miner-selector" method="dialog">
<span id="miner-wildcard" class="accent">Bla Bla Bla</span><br>exists in different
locations.
<br>Please select the desired one.
<p><label>Location:
<select id="miner-locations">
<!-- automatically generated options
<option value="default">Choose…</option>
<option>City (Country)</option>
-->
</select>
</label></p>
<div>
<button id="confirm-btn" disabled>Confirm</button>
</div>
</form>
</dialog>
</body>
</html>