TapeKit 工具栈The TapeKit toolchain
开源工具栈的全貌:四个名字怎么区分、仓库各自职责、内核 API 与状态码、多节点一致与钉住实现、路线图与已知问题。the open-source toolchain: four names to keep apart, what each repository does, kernel API and status codes, quorum reads and pinned implementations, roadmap and open issues.
TapeKit 是读取 tape:// 地址的那一层工具,由 TapeOut Labs 维护,仓库地址 TapeOutProtocol/TapeKit。代码 MIT,规范文本 CC0——任何人都可以架自己的网关、写自己的内核实现、做自己的浏览器。
四个名字
| 名字 | 指什么 |
|---|---|
| TapeOut | 协议本身:晶体管、处理器、电路容器,链上那一层 |
| tape:// | 网址格式与规范,用户在地址栏输入的东西 |
| TapeKit | 开源工具:内核、网关、扩展、查看器、命令行与未来的桌面应用 |
| HashPort | 由 HashPort 团队运营的商业托管服务 |
仓库结构
| 目录 | 内容 |
|---|---|
kernel/ | @tapekit/kernel:零依赖 ES 模块,负责名字解析、多节点一致、钉住区块与实现、逐文件 SHA-256 校验、缓存 |
sw-gateway/ | Service Worker 网关:普通浏览器不装任何东西即可打开链上网站,每个网站一个独立来源 |
extension/ | Chrome MV3 扩展:地址栏关键词 tape,可核对当前 https 页面是否与链上字节一致 |
viewer/ | 网页查看器(预览模式):沙箱 iframe,无扩展与网关时的兜底 |
send/ | TapeSend 与 TAP-10 的合约、模块与设计文档 |
SPEC.zh.md / SPEC.md | tape:// 规范 v0.2(中英文) |
GUIDE.md | 中文技术说明:各组件的运行、测试、部署与已知限制 |
内核 API
const kernel = createKernel(); // 默认 4 个公共节点,2 个必须一致
const res = await kernel.resolve('4246.0.tape');
const site = await kernel.openSite(res); // 只读文件清单
const html = await site.get('index.html'); // 字节已与链上 SHA-256 核对resolve 返回的状态码直接对应失败原因:
| 状态 | 含义 |
|---|---|
ok | 已开通 |
unpaid | 未开通或已到期 |
not-opened | 电路还没开容器 |
no-such-cpu | 处理器不存在 |
no-such-token | 电路编号不存在 |
not-tapeout | 不是本协议的地址 |
blocked | 被客户端名单屏蔽 |
store-changed | 仓库合约实现与钉住的版本不符,拒绝读取 |
一致性与钉住
| 机制 | 规则 |
|---|---|
| 多节点一致 | 所有读取结果必须来自至少 2 家不同运营方的节点且完全一致,不取多数 |
| 钉住区块 | 打开一个网站时,其全部文件在同一区块高度读取 |
| 钉住实现 | 仓库与付费合约的「内芯」可能被管理员替换,客户端先核对 ERC-1967 实现槽,不认识就不读 |
| 网站隔离 | 每个网站独立来源,站点代码不在有特权的位置运行,网络请求与弹窗受限 |
| 纯链上标记 | 静态扫描与运行时检查都干净,才显示「100% 链上」标记 |
网关
官方网关域名 tapekit.org,另有副本绑定 info.tapekit.org(即 tape://157.1)。打开方式为 https://<编号>-<处理器>.tapekit.org/。
TAP 标准族
TAP 是协议提案编号体系,按 EIP-1 的方式编号,以 CC0 发布。目前已知的编号:
| 编号 | 内容 | 状态 |
|---|---|---|
| TAP-10 | TapeSend:容器间端到端加密消息 | 规范正在重写,尚无独立标准稿 |
路线图
- 公共后缀列表让网关域名进入 Public Suffix List,避免站点之间的 cookie 与来源混淆。
- 发布内核把
@tapekit/kernel发布到 npm,补齐 API 参考与类型定义。 - 开源合约与命令行公开合约源码,发布命令行工具。
- 桌面应用注册 tape:// 协议,让系统级链接可直接打开。
- web3:// 适配对 ERC-4804 / ERC-6860 做只读适配。
- 站长手册编写正式的站长文档(可用 HashPort 上传,或直接调用合约)。
已知问题(2026-09-25)
| 编号 | 问题 |
|---|---|
| #4 | 验证 DeWEB 中枢合约,解决钱包对 publishKey 操作的警告 |
| #5 | 直接通过 ERC-6551 注册表创建的容器会静默变成「只收不发」 |
| #6 | X Layer 上的网站仓库与名字绑定合约地址与 BNB Chain 不同,内核查询问题仍在讨论 |
| #7 | tape:// 站点请求/响应与 WebMCP 工具发现的标准化提案 |
Four names, do not mix them up
| Layer | Name | What it covers |
|---|---|---|
| Protocol | TapeOut | the on-chain layer: transistors, processors, circuit containers |
| URLs and spec | tape:// | what you type in the address bar; the spec is the "tape:// spec" |
| Open-source tools | TapeKit | everything that reads tape://: kernel, gateway, extension, CLI, desktop app |
| Commercial service | HashPort | the hosted console, domain binding and fees run by the HashPort team |
The code is MIT-licensed and the spec is CC0, so anyone can build their own gateway, kernel or browser — the official one is just a reference implementation.
What is in the TapeKit toolbox
The repo github.com/TapeOutProtocol/TapeKit (maintained by TapeOut Labs) is the master index of the open stack:
| Directory | What it is |
|---|---|
| kernel/ | Kernel @tapekit/kernel: a zero-dependency ES module handling name resolution, multi-node agreement, pinned block, pinned implementation, per-file SHA-256 checks and caching |
| sw-gateway/ | Service Worker gateway: open on-chain sites in an ordinary browser with nothing installed, one origin per site |
| extension/ | Browser extension (Chrome MV3): the tape address-bar keyword; also checks whether the current https page matches the on-chain bytes |
| viewer/ | Web viewer (preview mode): a sandboxed iframe fallback when there is no extension or gateway |
| send/ | TapeSend · DeWEB messaging layer: contracts, modules and design docs |
| apps/tapesend/ | TapeSend client: web, desktop (Electron with a built-in tape:// browser), iOS / Android |
| SPEC.md | tape:// spec v0.2 (Chinese and English) |
| GUIDE.md | Chinese technical notes: how to run, test and deploy each part, plus known limits |
Using the kernel in your own code takes a few lines:
import { createKernel } from './kernel/src/index.js';
const kernel = createKernel(); // 4 public nodes by default, 2 must agree
const res = await kernel.resolve('4246.0.tape'); // res.status === 'ok' | 'unpaid' | …
const site = await kernel.openSite(res); // read-only file manifest
const file = await site.get('index.html'); // bytes already checked against on-chain SHA-256resolve status codes: ok (activated), unpaid (not activated or expired), not-opened (the circuit has no container yet), no-such-cpu, no-such-token, not-tapeout, blocked, and store-changed (the repository implementation does not match the pinned one, so reads are refused).
What does "pinned implementation" mean? The "core" of the SiteRegistry repository contract and the DomainBinding payment contract can be swapped by an admin, so each client first checks whether the core is the version it knows (kept in a fixed slot, the ERC-1967 implementation slot). If not, it reads nothing until the client updates its list. If a contract core is quietly swapped, your browser will not silently follow the new logic.
What is not finished yet
The TapeKit README "status and roadmap" lists the next steps (2026-09):
- get the gateway domain into the Public Suffix List;
- publish
@tapekit/kernelto npm and fill in the API reference and types; - open-source the contracts and ship CLI tools;
- a desktop app that registers the tape:// protocol;
- read-only web3:// (ERC-4804 / ERC-6860) adapters.
Open GitHub issues (checked 2026-09-25) show work in progress:
- #4: a mainnet blocker — verify the DeWEB Hub contract and fix the MetaMask warning on
publishKey. - #5: containers created directly through the ERC-6551 registry silently become "receive-only" and
open()can be bypassed — do not skip the official site and open containers via raw contracts. - #6: whether X Layer deploys SiteRegistry / DomainBinding. The asker looked up the BNB Chain addresses on X Layer and found no code; in fact the TapeKit kernel configures a different address set for X Layer, where code does exist.
- #7: standardizing tape:// request/response and WebMCP tool discovery — letting AI tools call on-chain site features automatically. The proposer, Alphana (@0xAlphana), demoed an AI finishing an on-chain tower-defense game through tools a page self-declares. The founder invited review on Sep 25 and offered 50 BEM to the proposer plus 5 BEM each for accepted suggestions.
The founder's "put the frontend on-chain" call (2026-09-25): citing the Bitget and Bybit hacks, he said the trouble mostly came from frontends of third-party tools or multisig systems being tampered with, and called on all DeFi and third-party tools to deploy their frontends to verifiable DeWEB (tape://), offering to personally fund the frontend-on-chain security of large tools such as the Safe multisig. Putting a frontend on-chain stops it being swapped, though it cannot stop a compromised backend.