@boostxyz/sdk

中文文档
8.2.1发布于 2026/10/23GPL-3.0-or-laterTypeScriptESM + CJS近 30 天下载 2943

Typescript devkit for interacting with the Boost V2 Protocol

原始使用文档
文档目录3 节
  1. Visit https://docs.boost.xyz/v2/boost-sdk/overview for docs…
  2. Event Actions
  3. Tuple Handling

Boost SDK

Typescript devkit for interacting with the Boost V2 Protocol

Documentation

Visit https://docs.boost.xyz/v2/boost-sdk/overview for docs, guides, API and more!

Event Actions

Tuple Handling

When a field is declared as TUPLE in the PrimitiveType of an EventAction, we unpack its bit-packed fieldIndex to drill down through each nested level of the tuple. Each sub-index occupies 6 bits (values 0–63), and a sub-index of 63 is treated as a terminator—signaling the end of further drilling. Once we locate the leaf in the nested structure, the code infers the final (non-tuple) PrimitiveType by reading the ABI definition (address, uint256, string, etc.) at that leaf node.

  1. We can store up to 5 sub-indexes (each 6 bits) in one fieldIndex.
  2. As we parse a TUPLE, we read those sub-indexes one by one, traversing each nested tuple parameter in the ABI.
  3. At the final, non-tuple component, we derive the actual PrimitiveType (e.g., ADDRESS, UINT, BYTES, or STRING) by inspecting that component’s type in the ABI definition.

版本与发布记录

@boostxyz/sdk 共发布 89 个版本,首次发布于 2024/09/11;过去 12 个月发布了 9 个版本。

版本发布日期距今
8.2.1latest2026/10/2316 天前
8.2.02026/09/012 个月前
8.1.02026/04/176 个月前
8.1.0-canary.2canary2026/03/287 个月前
8.1.0-canary.12026/01/239 个月前
8.1.0-canary.02026/01/239 个月前

其他发布通道:alpha → 0.0.0-alpha.2,canary → 8.1.0-canary.2。

关于 @boostxyz/sdk 的常见问题

@boostxyz/sdk 是什么?

Typescript devkit for interacting with the Boost V2 Protocol

如何安装 @boostxyz/sdk?

在项目目录运行 npm install @boostxyz/sdk,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:viem(2.x)、abitype(1)、@wagmi/core(2.x)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@boostxyz/sdk 支持 TypeScript 吗?

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

@boostxyz/sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@boostxyz/sdk 可以商用吗?

@boostxyz/sdk 使用 GPL-3.0-or-later 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以 GPL-3.0 兼容许可开源,并附带专利与反锁定条款。仅内部使用不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@boostxyz/sdk 的下载量有多少?

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

@boostxyz/sdk 还在维护吗?

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