@arcium-hq/reader
v0.10.3
Published
Reader SDK for fetching onchain data for Arcium network programs
Downloads
1,399
Maintainers
Readme
When To Use
- Listing MXE, 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.
