@eth-optimism/atst

中文文档
0.2.0发布于 2023/03/17MITTypeScriptESM + CJS近 30 天下载 2259


Optimism

@eth-optimism/atst

The officia
原始使用文档
文档目录7 节
  1. @eth-optimism/atst
  2. Getting started
  3. atst typescript/javascript sdk
  4. atst cli
  5. React API
  6. Contributing
  7. Getting help


Optimism

@eth-optimism/atst

The official SDK and cli for Optimism's attestation Station

atst

atst is a typescript / javascript sdk and cli around AttestationStation

Visit Docs for general documentation on AttestationStation.

Getting started

Install

npm install @eth-optimism/atst wagmi @wagmi/core [email protected]

atst typescript/javascript sdk

The typescript sdk provides a clean wagmi based interface for reading and writing to AttestationStation.

See sdk docs for usage instructions.

atst cli

The cli provides a convenient cli for interacting with the AttestationStation contract

preview

See cli docs for usage instructions.

React API

For react hooks we recomend using the wagmi cli with the etherscan plugin and react plugin to automatically generate react hooks around AttestationStation.

Use createKey and createValue to convert your raw keys and values into bytes that can be used in AttestationStation contract calls

Use parseString, parseBool, parseAddress and parseNumber to convert values returned by AttestationStation to their correct data type.

For convenience we also export the hooks here:

  • useAttestationStationAttestation - Reads attestations with useContractRead
  • useAttestationStationVersion - Reads attestation version
  • useAttestationStationAttest - Wraps useContractWrite with AttestationStation abi calling attest
  • usePrepareAttestationStationAttest - Wraps usePrepare with AttestationStation abi calling attest
  • useAttestationStationAttestationCreatedEvent - Wraps useContractEvents for Created events

Also some more hooks exported by the cli but these are likely the only ones you need.

Contributing

Please see our contributing.md. No contribution is too small.

Having your contribution denied feels bad. Please consider opening an issue before adding any new features or apis.

Getting help

If you have any problems, these resources could help you:

版本与发布记录

@eth-optimism/atst 共发布 18 个版本,首次发布于 2023/02/25;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.2.0latest2023/03/173 年前
0.0.0-20230313235858canary2023/03/143 年前
0.0.0-202303091533402023/03/093 年前
0.0.0-202303062128522023/03/073 年前
0.0.0-202303062005112023/03/073 年前
0.0.0-202303030419562023/03/033 年前

关于 @eth-optimism/atst 的常见问题

@eth-optimism/atst 是什么?

@eth-optimism/atst The officia

如何安装 @eth-optimism/atst?

在项目目录运行 npm install @eth-optimism/atst,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:wagmi(>0.11.0)、ethers(^5.0.0)、@wagmi/core(>0.9.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 atst,可以用 npx atst 直接运行。

@eth-optimism/atst 支持 TypeScript 吗?

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

@eth-optimism/atst 支持 ESM 还是 CommonJS?

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

@eth-optimism/atst 可以商用吗?

@eth-optimism/atst 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@eth-optimism/atst 的下载量有多少?

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

@eth-optimism/atst 还在维护吗?

最新版本 0.2.0 发布于 2023/03/17(3 年前);至今共发布 18 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/02/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。