A lightweight Windows tray app that shows your Kryptex account balance, daily/monthly earnings, hashrate and online worker status on a semi-transparent desktop overlay.
- Tray menu with four items: current amount, overlay toggle, refresh, exit.
- Reads the logged-in Kryptex dashboard and hardware pages over HTTPS with a cookie you provide.
- Account balance in BTC plus the fiat estimate shown by Kryptex.
- Daily/monthly profitability, total hashrate per coin, and per-worker hashrate, earnings, share counts and miner version.
- Online workers only: offline workers disappear from the list and the panel shrinks automatically.
- Semi-transparent black overlay (background alpha 220) with fully opaque text.
- Non-topmost, click-through, never steals focus. Source Han Sans (思源黑体) with an automatic fallback chain.
- Windows 10 or Windows 11.
- Visual Studio 2022 with Desktop development with C++ (MSVC + Windows SDK).
- A Kryptex account. Mine with your Kryptex account username (
krx...) so the earnings land in the account balance read by this app.
build.batThe executable is written to build\KryptexTray.exe. There are no third-party dependencies; the app uses WinHTTP, GDI and the Win32 API only.
- Copy
.env.exampleto.envin the project root (next tobuild.bat). - Open
https://www.kryptex.com/site/dashboardin Chrome while logged in. - Press
F12→ Network → reload the page → click the dashboard request → Request Headers → copy the value afterCookie:. - Paste it as
KRYPTEX_COOKIE=...in.env.
Optional keys:
KRYPTEX_COOKIE=...
KRYPTEX_URL=https://www.kryptex.com/site/dashboard
REFRESH_SECONDS=60The app looks for .env next to the executable, then in the parent directory, then in the current working directory. It re-reads .env before every refresh, so you can replace an expired cookie without restarting.
Run build\KryptexTray.exe and right-click the tray icon:
- Current amount
- Show overlay / Hide overlay
- Refresh
- Exit
The overlay is positioned at the top-right of the primary work area, is click-through, and stays below normal windows. To add it to startup, create a shortcut to the executable in shell:startup.
GET /site/dashboardreturns server-rendered HTML; the balance and fiat estimate are extracted with regular expressions.GET /site/hardwareembeds aworkerDatasetJSON script with every worker's coin, online flag, 30-minute/24-hour hashrate, daily/monthly profit, share counts and miner version. Totals are summed from that dataset.- The overlay is a layered window with per-pixel alpha, rendered into a 32-bit DIB and committed with
UpdateLayeredWindow. - Background pixels are black at alpha 220; text, dividers and status dots use alpha 255.
The app prefers 思源黑体 (Source Han Sans), then falls back in this order:
Source Han Sans SC → Source Han Sans CN → Source Han Sans → Noto Sans SC → Noto Sans CJK SC → Microsoft YaHei UI → Microsoft YaHei → Segoe UI
All overlay text is 9 px. The selected face is logged to build\font.log at startup for diagnostics.
.envcontains a login cookie. It is ignored by.gitignore; never commit or share it.- The app does not read cookies from your browser. You paste the cookie manually.
- The app never logs the cookie or response bodies.
font.logonly contains font names. - Anyone with the cookie can access your Kryptex account. Replace it after logging out of all sessions if it leaks.
MIT. See LICENSE.
一个轻量的 Windows 托盘小工具,在桌面浮窗里显示 Kryptex 账户余额、日/月收益、算力和在线 worker 状态,背景半透明。
- 托盘菜单四项:当前金额、显示/关闭浮窗、刷新、退出。
- 用你提供的 Cookie 通过 HTTPS 读取已登录的 Kryptex 后台账户页和硬件页。
- 显示 BTC 余额和 Kryptex 给出的人民币估值。
- 显示日/月盈利能力、各币种总算力,以及每个 worker 的算力、收益、份额和矿工版本。
- 只显示在线 worker:离线 worker 不占列表空间,浮窗高度自动收缩。
- 黑色半透明背景(alpha 220),文字完全不透明。
- 不置顶、鼠标穿透、不抢焦点。字体优先思源黑体,并带自动降级链。
- Windows 10 / Windows 11。
- Visual Studio 2022,安装 使用 C++ 的桌面开发 工作负载(MSVC + Windows SDK)。
- Kryptex 账户。请用账户名(
krx...)挖矿,收益才会进入本程序读取的账户余额。
build.bat产物为 build\KryptexTray.exe。没有第三方依赖,只使用 WinHTTP、GDI 和 Win32 API。
- 把
.env.example复制成项目根目录的.env(和build.bat同级)。 - 在 Chrome 里登录并打开
https://www.kryptex.com/site/dashboard。 - 按
F12→ Network → 刷新页面 → 点开 dashboard 请求 → Request Headers → 复制Cookie:后面的整串值。 - 粘贴到
.env的KRYPTEX_COOKIE=...。
可选配置:
KRYPTEX_COOKIE=...
KRYPTEX_URL=https://www.kryptex.com/site/dashboard
REFRESH_SECONDS=60.env 的查找顺序:exe 同目录 → 上一级目录 → 当前工作目录。程序每次刷新前都会重新读取 .env,Cookie 过期后直接覆盖保存,再点「刷新」即可,不用重启。
运行 build\KryptexTray.exe,右键托盘图标:
- 当前金额
- 浮窗展示 / 关闭浮窗
- 刷新
- 退出
浮窗位于主屏工作区右上角,鼠标可穿透,层级低于普通窗口。想开机自启,给 exe 建一个快捷方式放进 shell:startup。
GET /site/dashboard返回服务端渲染的 HTML,用正则提取 BTC 余额和人民币估值。GET /site/hardware里嵌有一段workerDatasetJSON,包含每个 worker 的币种、在线状态、30 分钟/24 小时算力、日/月收益、有效/过期/无效份额和矿工版本。汇总数据由这段 JSON 计算。- 浮窗是带逐像素 alpha 的 layered window,先绘制到 32 位 DIB,再通过
UpdateLayeredWindow提交。 - 背景为黑色、alpha 220;文字、分隔线和状态点为 255。
优先 思源黑体,找不到时依次降级:
Source Han Sans SC → Source Han Sans CN → Source Han Sans → Noto Sans SC → Noto Sans CJK SC → Microsoft YaHei UI → Microsoft YaHei → Segoe UI
浮窗文字统一 9px。启动时会把选中的字体名写入 build\font.log 方便排查。
.env里是登录 Cookie,已被.gitignore排除,不要提交或分享。- 程序不会读取浏览器 Cookie,需要你手动粘贴。
- 程序不会记录 Cookie 或响应正文;
font.log只包含字体名。 - 拿到 Cookie 就能访问你的 Kryptex 账户;如果泄露,请在 Kryptex 退出所有会话后更换。
MIT,详见 LICENSE。