@arcium-hq/reader
Read-only SDK for querying Arcium network state on Solana.
Key exports:
- getMXEAccInfo, getClusterAccInfo - Account getters
- subscribeComputations - Event monitoring
- Types for all Arcium accounts
Interfaces
| Interface | Description |
|---|---|
| MempoolPriorityFeeStats | Statistics about priority fees for computations in a mempool. |
Type Aliases
| Type Alias | Description |
|---|---|
| ArciumEvent | All events emitted by the Arcium program, keyed by event name. |
| ArciumEventData | Data structure for any Arcium event, as parsed from logs. |
| ArciumEventName | Capitalized event names, matching the format as emitted by the program. |
| ArciumInstructionName | Valid instruction names from the Arcium IDL. |
| ArciumTypes | Arcium IDL types derived from the Arcium program interface. |
| ArxNodeAccount | ArxNode account data structure for individual computation nodes. |
| CallbackComputationIx | Callback computation instruction type from the Arcium IDL. |
| ClusterAccount | Cluster account data structure containing node information. |
| ComputationAccount | Computation account data structure tracking computation state. |
| ComputationDefinitionAccount | Computation definition account containing circuit configuration. |
| ComputationEventData | Data structure for computation events (events that have computationOffset). |
| ComputationEventName | Computation event names that all have computationOffset field. |
| ComputationFee | Fee information for a computation, tagged by the source it was read from. |
| ComputationReference | Reference to a computation in a mempool or executing pool. |
| ComputationStatus | Status values for a computation, as defined by the Arcium protocol. |
| Connection | Solana Connection type alias for convenience. |
| FindInstruction | Finds an instruction type from the Arcium IDL by name, avoiding fragile hardcoded numeric indices. |
| MXEAccount | MXE (Multi-party eXecution Environment) account data structure. |
| MxeRecoveryAccount | MXE recovery account data structure tracking key recovery session state. |
| Program | Anchor Program type alias with generic IDL support. |
| PublicKey | Solana PublicKey type alias for convenience. |
| QueueComputationIx | Queue computation instruction type from the Arcium IDL. |
| RecoveryClusterAccount | Recovery cluster account data structure containing recovery peers information. |
Functions
| Function | Description |
|---|---|
| getArciumProgram | Return an Anchor program instance for the Arcium program. |
| getArciumSignerAccAddress | Derive the Arcium signer account address used by an MXE program when invoking the Arcium program. Unlike most other helpers in this module, this PDA is derived under the MXE program ID (the caller), not the Arcium program ID - Arcium verifies the seed via seeds::program = _mxe_program. |
| getArxNodeAccAddress | Derive the ArxNode account address for a given offset. |
| getArxNodeAccAddresses | Return all ArxNode account addresses. |
| getArxNodeAccInfo | Fetch and parse an ArxNode account. |
| getClockAccAddress | Derive the clock account address. |
| getClusterAccAddress | Derive the cluster account address for a given offset. |
| getClusterAccAddresses | Return all Cluster account addresses. |
| getClusterAccInfo | Fetch and parse a Cluster account. |
| getCompDefAccAddress | Derive the computation definition account address for a given MXE program ID and offset. |
| getCompDefAccInfo | Fetch and parse a ComputationDefinition account. |
| getComputationAccAddress | Derive the computation account address for a given cluster and computation offset. |
| getComputationAccInfo | Fetch and parse a Computation account. |
| getComputationFee | Fetch a live computation's on-chain fee by its offset. |
| getComputationFeeFromQueueTx | Decode a closed computation's raw fee inputs from its queue_computation transaction. |
| getComputationOffset | Get the computation offset from a transaction. |
| getComputationsInMempool | Return all computation references in the mempool for a given account. Only non-stake computations are included. |
| getExecutingPoolAccAddress | Derive the executing pool account address for a given cluster. |
| getFailureClaimAccAddress | Derive the failure claim account address for a given MXE program and computation offset. |
| getFeePoolAccAddress | Derive the fee pool account address. |
| getLookupTableAddress | Derive the address lookup table address for an MXE program. |
| getMempoolAccAddress | Derive the mempool account address for a given cluster. |
| getMempoolPriorityFeeStats | Calculate priority fee statistics for computations in a mempool. |
| getMXEAccAddress | Derive the MXE account address for a given MXE program ID. |
| getMXEAccAddresses | Return all MXE account addresses. |
| getMXEAccInfo | Fetch and parse an MXE account. |
| getMxeRecoveryAccAddress | Derive the MXE recovery account address for a key recovery session. |
| getMxeRecoveryAccInfo | Fetch and parse an MxeRecovery account. |
| getOperatorAccAddress | Derive the operator account address for a given operator signer. |
| getRawCircuitAccAddress | Derive the raw circuit account address for a given computation definition and index. |
| getRecoveryClusterAccAddress | Derive the recovery cluster account address for a given MXE program ID. |
| getRecoveryClusterAccInfo | Fetch and parse a recovery cluster account. |
| getRecoveryPeerAccAddress | Derive the recovery peer account address for a given recovery peer offset. |
| subscribeComputations | Subscribe to computation events for an MXE program. |
| unsubscribeComputations | Unsubscribe from computation events. |