arcium-client 0.11.0

A client-side library for interacting with the Arcium Solana program.
Documentation
<div align="center">
  <img src="https://raw.githubusercontent.com/arcium-hq/.github/refs/heads/main/profile/arcium.svg" alt="Arcium" width="200"/>

<h1>arcium-client</h1>

<p>Rust SDK for interacting with the Arcium program and its PDAs.</p>

[![Crates.io](https://img.shields.io/crates/v/arcium-client.svg)](https://crates.io/crates/arcium-client)
[![Docs.rs](https://docs.rs/arcium-client/badge.svg)](https://docs.rs/arcium-client)

**[Developer Docs](https://docs.arcium.com/developers/program)**

</div>

## When To Use

- Building off-chain Rust clients that interact with the Arcium program
- Deriving Arcium PDAs from MXE (MPC eXecution Environment) program IDs and cluster offsets
- Constructing instructions and transactions without Anchor

For Anchor programs, prefer [`arcium-anchor`](https://crates.io/crates/arcium-anchor).

## Installation

```toml
[dependencies]
arcium-client = "0.11.0"
```

## Feature Flags

| Feature | Default | Description |
|---------|---------|-------------|
| `transactions` | On | Enable instruction builders, state helpers, and transaction utilities. |
| `staking` | Off | Include staking-specific types and helpers. |
| `permissioned-mainnet` | Off | Enable permissioned-mainnet specific behavior. |

Disable transaction helpers if you only need IDL constants and PDA derivation:

```toml
arcium-client = { version = "0.11.0", default-features = false }
```

## Quick Start

```rust
use arcium_client::{
    ARCIUM_PROGRAM_ID,
    pda::{comp_def_offset, computation_definition_acc, mempool_acc, mxe_acc},
};

// `mxe_program_id` is your Anchor program's `Pubkey`; `cluster_offset` comes from your environment.
let mxe_account = mxe_acc(&mxe_program_id);
let comp_def = computation_definition_acc(
    &mxe_program_id,
    comp_def_offset("my_circuit"),
);
let mempool = mempool_acc(cluster_offset);
```

## Main Modules

| Module | Description |
|--------|-------------|
| `idl` | Generated Arcium program types and constants. |
| `pda` | PDA derivation helpers such as `mxe_acc`, `mempool_acc`, and `cluster_acc`. |
| `instruction` | Instruction builders when `transactions` is enabled. |
| `state` | Account state types when `transactions` is enabled. |
| `transactions` | Higher-level transaction assembly helpers when `transactions` is enabled. |
| `utils` | Shared helpers and small utilities. |

## See Also

- [`arcium-anchor`]https://crates.io/crates/arcium-anchor
- [`arcium-macros`]https://crates.io/crates/arcium-macros
- [Developer Docs]https://docs.arcium.com/developers/program