npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trustbaseai/box

v0.1.10

Published

TrustChain 机顶盒一键入网安装器 — npm install 即完成 (arm64 trustchaind 二进制下载 + sha256 校验 + state-sync 配置 + systemd + 验证)

Readme

@trustbaseai/box — TrustChain 机顶盒一键入网安装器

⚠️ DEPRECATED (kimi 2026-08-04 拍板收敛): 本项目冻结在 0.1.0, 不再演进。 canonical 包改为 @trustbaseai/node (kimi 维护, 含本包优点: 多源下载器/updater/BOX_MARKER/轮询 gate)。 binary.js + updater.js 作为零依赖可复用 lib 合入 node v0.2.0。请改用 @trustbaseai/node。

机顶盒发货后 npm install 即完成入网:下载 arm64 trustchaind(sha256 校验)→ 初始化 → state-sync 配置 → systemd 启动 → 验证状态根一致。

用法

# 机顶盒上 (root):
npm install -g @trustbaseai/box
# postinstall 自动执行 (检测到机顶盒环境)
# 或手动:
trustbase-box install

环境变量

| 变量 | 默认 | 说明 | |---|---|---| | TRUSTBASE_BINARY_URL | GitHub release 占位 | 二进制下载基址, 下载 <base>/trustchaind-<arch> + .sha256 | | TRUSTBASE_GENESIS_URL | 空 | 链创世文件 URL (必须配置, 否则入网失败) | | TRUSTBASE_RPC_NODES | .115,.114 | state-sync 快照源 RPC (逗号分隔) | | TRUSTBASE_PEERS | .115,.114 | P2P persistent_peers (nodeID@ip:26656) | | TRUSTBASE_INDEXER | 0 | 1 = 同时装索引服务 |

子命令

  • trustbase-box install [--force] [--sha <hex>] — 全流程入网
  • trustbase-box status — 节点状态
  • trustbase-box start|stop|restart — systemd 管理
  • trustbase-box check — gate 验证 (abci_info 状态根对比)
  • trustbase-box-update — 检查并安装稳定版更新
  • trustbase-box-update --check-only — 只查不装
  • trustbase-box-update --install-timer — 装每日检测 systemd timer

自动更新 (xiaom 拍板)

装好的机顶盒每天检测稳定版更新, 只装稳定版, 测试版/pre-release 一律跳过。

  • 检测源: GitHub + Gitee release API, 找最新 prerelease=false 且架构匹配的 release
  • 版本比较: 比已安装的 trustchaind 版本新才更新
  • 更新流程: 下载 → sha256 校验 → 安装 → 重启节点
  • 定时: trustbase-box-update --install-timer 装 systemd timer, 每日 06:07 检测 (错峰)

二进制分发 (重要)

npm 包不携带 170MB 二进制。需要 xiaom 定托管渠道 (GitHub release / 对象存储 / 公网节点), 然后把 TRUSTBASE_BINARY_URL 指向它。安装器会下载 <base>/trustchaind-<arch> 并校验 <base>/trustchaind-<arch>.sha256 (64 位 hex)。

安全

  • 二进制 sha256 强校验, 不匹配拒绝安装
  • state-sync trust_height > 310594 (SOP 铁律7 疤痕高度禁令)
  • 机顶盒定位跟随者, 永不当验证者
  • postinstall 只在检测到机顶盒标记 (/etc/trustbase-box) 时自动执行

⚠️ 已知坑 (kimi 2026-08-04 实证)

  • kickpi 内核缺 xt_LOG 模块 (5.4.125): 在机顶盒上启用 ufw 默认规则 (含 LOG) 会整批加载失败, 但 default drop 先生效 → SSH/节点端口全锁死 (2026-08-04 .126 事故). 机顶盒上不要启用 ufw LOG 规则, 或先检测内核: grep xt_LOG /lib/modules/$(uname -r)/modules.builtin 无则跳过 ufw。
  • plink/SSH 会话结束会杀后台进程: 启动节点必须 setsid trustchaind start ... < /dev/null & disown (本安装器已内置)。
  • init 默认 config 两坑: p2p.laddr 多地址非法 (需单地址 tcp://0.0.0.0:26656) + persistent_peers 空 (state-sync 快照发现走 P2P, 不加 peers 永远 Discovering)。本安装器已自动修复。