@xyo-network/event-kit-schemas

中文文档
2.3.4发布于 2026/11/03LGPL-3.0-onlyTypeScriptES Module零依赖

Wake envelope, grant object, and JWT profile schema constants for XL1 Event Kit

原始使用文档

@xyo-network/event-kit-schemas

Canonical schema constants and Zod guards for XL1 Event Kit:

  • wake Payload (network.xyo.event.wake.envelope)
  • wake grant object with a required random grantId (network.xyo.event.wake.grant)
  • wake JWT payload schema (network.xyo.event.wake.jwt)
  • publisher service and dedicated encryption-key descriptors
  • encrypted subscriptions and their clear HPKE routing envelope
  • endpoint challenge requests/responses and publisher acceptances
  • exact lifecycle revocations for services, keys, subscriptions, and acceptances

The D-002 schema tranche treats the wake object as a strict XYO Payload, requires a 16-byte lowercase-hex wakeId, and limits Payload/JWT numeric fields to nonnegative JSON safe integers. Strict wallet-JWT header and payload schemas validate the exact initial encodings before protocol code applies cryptographic, time-relative, address-equality, audience-equality, and replay checks.

Event Kit has one source-aware contract with unversioned schema identifiers. Strict parsers reject version suffixes and the head-only envelope shape. D-005 handshake guards enforce exclusive block expiries, linear revision links, canonical base64url sizes, and the supported delivery/challenge/HPKE profiles.

WakeSourceZod and WakeEnvelopeZod support finalized XL1, finalized Ethereum, and named UTC interval schedules. Ethereum identity includes its decimal chain ID and genesis hash; interval identity includes schedule ID, anchor, and duration. authorizationChainId identifies the independent XL1 authority chain; fromPosition and toPosition are inclusive source positions. The helper completedUtcIntervalPosition returns no head before the first interval ends. Publisher services advertise exact sources, and encrypted subscription filters bind the source, first position, and maximum range.

See D-001, the D-002 wallet profile, the D-005 handshake profile, and the Yellow Paper.

版本与发布记录

@xyo-network/event-kit-schemas 共发布 22 个版本,首次发布于 2026/08/21;过去 12 个月发布了 22 个版本。

版本发布日期距今
2.3.4latest2026/11/03今天
2.3.32026/11/03今天
2.3.22026/10/313 天前
2.3.12026/10/303 天前
2.3.02026/10/295 天前
2.2.32026/10/286 天前

关于 @xyo-network/event-kit-schemas 的常见问题

@xyo-network/event-kit-schemas 是什么?

为XL1 Event Kit唤醒信封、授权对象和JWT配置文件模式常量

如何安装 @xyo-network/event-kit-schemas?

在项目目录运行 npm install @xyo-network/event-kit-schemas,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:zod(^4.6)、@ariestools/sdk(^9.0)、@xyo-network/sdk(^8.1)、@opentelemetry/api(^1.10)、@xyo-network/sdk-protocol(^8.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@xyo-network/event-kit-schemas 支持 TypeScript 吗?

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

@xyo-network/event-kit-schemas 支持 ESM 还是 CommonJS?

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

@xyo-network/event-kit-schemas 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=26。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@xyo-network/event-kit-schemas 可以商用吗?

@xyo-network/event-kit-schemas 使用 LGPL-3.0-only 许可。弱 Copyleft:作为库被调用时通常不要求开源你自己的代码,但修改库本身需以 LGPL 开源;前端打包合并后的适用边界存在不同理解。以上为概括,不构成法律意见,请以许可原文为准。

@xyo-network/event-kit-schemas 还在维护吗?

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