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.
Installation
[]
= "0.11.1"
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:
= { = "0.11.1", = false }
Quick Start
use ;
// `mxe_program_id` is your Anchor program's `Pubkey`; `cluster_offset` comes from your environment.
let mxe_account = mxe_acc;
let comp_def = computation_definition_acc;
let mempool = mempool_acc;
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. |