0.11.2 • Published 3d ago
@arcium-hq/reader
Licence
GPL-3.0-only
Version
0.11.2
Deps
4
Size
114 kB
Vulns
0
Weekly
567
@arcium-hq/reader
Read-only TypeScript SDK for querying Arcium network state.
When To Use
- Listing MXE (MPC eXecution Environment), cluster, and Arx node accounts
- Fetching typed account state from the Arcium program
- Monitoring computation activity without writing transactions
Requirements
- Node.js
20.18+ @anchor-lang/core^1.0.2
Installation
npm install @arcium-hq/reader @anchor-lang/coreQuick Start
A wallet-less AnchorProvider is sufficient since this SDK never signs transactions.
import {
getArciumProgram,
getClusterAccAddresses,
getMXEAccAddresses,
getMXEAccInfo,
} from "@arcium-hq/reader";
// `provider` is an `AnchorProvider` you've already constructed.
const program = getArciumProgram(provider);
const mxes = await getMXEAccAddresses(provider.connection);
const clusters = await getClusterAccAddresses(provider.connection);
const firstMxe = await getMXEAccInfo(program, mxes[0]);Main Exports
| Area | Description |
|---|---|
| Account discovery | getMXEAccAddresses, getClusterAccAddresses, getArxNodeAccAddresses |
| Account fetching | getMXEAccInfo, getClusterAccInfo, getCompDefAccInfo, getComputationAccInfo |
| PDA helpers | Re-exported from @arcium-hq/client for convenient read flows |
| Types | Typed account models for Arcium state |
Notes
@arcium-hq/readeris read-only; use@arcium-hq/clientfor encryption and write flows.- The package re-exports several PDA helpers from the client SDK.