@antseed/protocol

中文文档
0.1.15发布于 2026/11/04TypeScriptES Module近 30 天下载 9638

AntSeed wire protocol: message types, frame/HTTP/payment codecs, and EIP-712 payment signatures. Portable — no Node-only dependencies

原始使用文档

@antseed/protocol

The AntSeed wire protocol as a standalone, dependency-light package (ethers only, no Node-specific APIs). Extracted from @antseed/node, which re-exports everything from its original paths, so existing consumers are unaffected.

Contents, one module per concern (each also available as a subpath export):

ModuleContents
messagesMessageType, frame constants, all payment/verification/sweep payload interfaces, capability constants
framing9-byte frame header codec (encodeFrame, decodeFrame, FrameDecoder, MessageMux)
httpSerialized HTTP types, streaming/upload header names, upload thresholds
request-codecBinary HTTP request/response/chunk payload codec
payment-codecJSON codecs for the 0x50–0x5F payment messages
json-codecBounded JSON parsing helpers
signaturesEIP-712 SpendingAuth/ReserveAuth/EIP-3009 types + signing, metadata v2 encoding, computeChannelId, domains
connection-authSigned intro/hello envelope wire format
signingEIP-191 domain-tagged signing (signData, signUtf8, …) and hex utils
peer-idPeerId branded type and helpers
billingPortable unit-billing metadata, usage reports, validation, and cost evaluation
peer-metadata, capability, service-api, peer-pricingSigned discovery metadata types
connection-stateConnectionState and connection config types

Note: both signatures (SpendingAuth metadata, 2n) and peer-metadata (discovery records, 10) define METADATA_VERSION. The root export resolves to the payments constant, matching @antseed/node's public API; use the ./peer-metadata subpath for the discovery one.

版本与发布记录

@antseed/protocol 共发布 15 个版本,首次发布于 2026/08/12;过去 12 个月发布了 15 个版本。

版本发布日期距今
0.1.15latest2026/11/042 天前
0.1.142026/11/015 天前
0.1.132026/10/315 天前
0.1.122026/10/316 天前
0.1.112026/10/2610 天前
0.1.102026/10/1819 天前

关于 @antseed/protocol 的常见问题

@antseed/protocol 是什么?

AntSeed wire protocol: message types, frame/HTTP/payment codecs, and EIP-712 payment signatures. Portable — no Node-only dependencies

如何安装 @antseed/protocol?

在项目目录运行 npm install @antseed/protocol,或使用 pnpm add / yarn add / bun add。

@antseed/protocol 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@antseed/protocol 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@antseed/protocol 可以商用吗?

@antseed/protocol 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@antseed/protocol 的下载量有多少?

根据 npm 官方下载统计,@antseed/protocol 在 2026/10/06 – 2026/11/04 这 30 天内被下载 9,638 次,日均约 321 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@antseed/protocol 还在维护吗?

最新版本 0.1.15 发布于 2026/11/04(2 天前);至今共发布 15 个版本,其中过去 12 个月发布了 15 个;首次发布于 2026/08/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。