@arcium-hq/client

中文文档
0.16.0发布于 2026/10/23GPL-3.0-onlyTypeScriptESM + CJS近 30 天下载 2670

Client SDK for interacting with encrypted Solana programs

原始使用文档
文档目录6 节
  1. When To Use
  2. Requirements
  3. Installation
  4. Quick Start
  5. Main Exports
  6. See Also
Arcium

@arcium-hq/client

TypeScript SDK for encryption, PDA helpers, and Arcium computation flows.

npm

API Docs | Developer Docs

When To Use

  • Encrypting inputs for Arcium computations
  • Deriving Arcium PDAs from TypeScript
  • Waiting for computation finalization and interacting with Arcium account state

Requirements

  • Node.js >=20.18.0
  • @anchor-lang/core ^1.0.2

Installation

npm install @arcium-hq/client @anchor-lang/core

Quick Start

import * as anchor from "@anchor-lang/core";
import {
  getArciumEnv,
  getCompDefAccOffset,
  getComputationAccAddress,
  getMempoolAccAddress,
  getMXEAccAddress,
} from "@arcium-hq/client";

const env = getArciumEnv();
const computationAddress = getComputationAccAddress(
  env.arciumClusterOffset,
  new anchor.BN(1),
);

const compDefOffset = getCompDefAccOffset("my_circuit");
const mempool = getMempoolAccAddress(env.arciumClusterOffset);

// `mxeProgramId` is the PublicKey of your Anchor program that hosts the MXE.
const mxe = getMXEAccAddress(mxeProgramId);

Main Exports

AreaDescription
CryptographyRescue/AES helpers, hashing, and X25519 utilities.
createPacker()Pack and unpack circuit inputs and outputs.
PDA helpersDerive computation, mempool, MXE, cluster, and comp-def addresses.
awaitComputationFinalization()Poll for finalized computations.
IDL exportsGenerated Arcium program types and constants.

See Also

版本与发布记录

@arcium-hq/client 共发布 46 个版本,首次发布于 2025/05/01;过去 12 个月发布了 40 个版本。

版本发布日期距今
0.16.0latest2026/10/2315 天前
0.15.02026/09/201 个月前
0.14.12026/07/293 个月前
0.14.02026/07/293 个月前
0.13.22026/07/153 个月前
0.13.12026/07/103 个月前

关于 @arcium-hq/client 的常见问题

@arcium-hq/client 是什么?

Client SDK for interacting with encrypted Solana programs

如何安装 @arcium-hq/client?

在项目目录运行 npm install @arcium-hq/client,或使用 pnpm add / yarn add / bun add。

@arcium-hq/client 支持 TypeScript 吗?

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

@arcium-hq/client 支持 ESM 还是 CommonJS?

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

@arcium-hq/client 需要什么版本的 Node.js?

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

@arcium-hq/client 可以商用吗?

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

@arcium-hq/client 的下载量有多少?

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

@arcium-hq/client 还在维护吗?

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