@xyo-network/event-kit-protocol

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

Wallet-JWT Payload verification and admission contracts for XL1 Event Kit

原始使用文档

@xyo-network/event-kit-protocol

Transport-neutral verification and admission orchestration for Event Kit wakes:

  1. Verify a real ES256K wallet JWT with the XYO SDK
  2. Bind JWT eventHash to the wake Payload data hash
  3. Bind the Payload to one immutable route, source identity, and authorization chain
  4. Require an exact active subscription and its live Statement Graph grant
  5. Resolve replay, logical idempotency, receipt creation, and durable enqueue through one atomic inbox boundary

The D-002 split now exists as pure verifyWakeRequest plus stateful admitAndEnqueue over explicit WakeGrantAuthorizer and AtomicWakeInbox ports. Protocol code owns no cloud or transport SDK. The stateful layer invokes injected I/O, while the inbox contract deliberately owns durable enqueue or a transactional outbox instead of exposing a split queue callback. See Yellow Paper §6 and §13.

D-002's target is a raw strict XYO Payload plus a real short-lived wallet JWT; there is no separate event signature.

D-005 adds a second, independent pure-protocol surface for the on-chain subscription handshake. It provides canonical RFC 8785 bytes, one fixed RFC 9180 Base-mode suite (X25519/HKDF-SHA256/AES-128-GCM), dedicated encryption-key generation, strict one-shot subscription encryption/decryption, HMAC-SHA256 endpoint challenge proof, and deterministic fail-closed service/key/ subscription lifecycle selection. Clear routing fields and the structural subscriber claim source are HPKE associated data. This package still performs no XL1, datalake, filesystem, HTTP, or cloud I/O.

See the normative on-chain handshake profile and the language-neutral fixture at ../../conformance/vectors/subscription-hpke.json.

createMemoryWakeInbox ships one conformant AtomicWakeInbox: it serializes the critical section, binds a fresh jti to an existing wake receipt, and hands the wake to its sink before consuming either identity, so a failing sink leaves the attempt retryable. It is single-process and loses state on restart — a durable adapter is available from @xyo-network/event-kit-node, but full resident-runtime and network qualification remain pending. The memory adapter is not production evidence.

Source binding and activation

verifyWakeRequest and admitAndEnqueue implement the one current source-aware contract. Routes pin the independent XL1 authorization chain, source, canonical filter hash, immutable subscription hash, source floor, and range bound. createStatementGraphWakeGrantAuthorizer requires a finalized activation reader in addition to the grant viewer. The production helper createActiveSourceWakeGrantAuthorizer in event-kit-statement-graph supplies the exact active D-005 lifecycle binding and selects the exact accepted grant.

AtomicWakeInbox<TWake>, WakeQueue<TWake>, and drainQueue default to AdmittedWake. Use AdmittedWakeZod to validate repeated persisted fields and parseAdmittedWake to also recompute the event hash. Neither parser authenticates an arbitrary raw record or replaces the HTTP admission path.

The exact source/floor/range filter is encrypted and authenticated. Activation height on the authorization chain never substitutes for a source position. All public schemas and helpers describe this contract; versioned Event Kit schemas and alternative plaintext readers are rejected.

版本与发布记录

@xyo-network/event-kit-protocol 共发布 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-protocol 的常见问题

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

钱包- jwt有效负载验证和XL1事件套件的许可合同

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

在项目目录运行 npm install @xyo-network/event-kit-protocol,或使用 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-protocol 支持 TypeScript 吗?

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

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

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

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

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

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

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

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

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