arcium-macros
Helper macros for developing Solana programs that integrate with the Arcium network. Reduces boilerplate and enforces correct account structures for encrypted computations.
Available Macros
#[arcium_program]
This attribute is the primary macro for an Arcium-integrated program. It should be used on the module containing your instruction handlers. It wraps Anchor's #[program] attribute and injects additional definitions required by Arcium.
#[queue_computation_accounts]
Use this attribute on an Accounts struct for instructions that queue an MPC computation. It validates the struct and implements the QueueCompAccs trait from arcium_anchor.
#[arcium_callback]
This attribute marks a function as the callback handler for a MPC computation. It validates the function name and signature. The function must be named <encrypted_ix>_callback and take a SignedComputationOutputs<T> argument (in addition to the Context arg).
#[callback_accounts]
Apply this attribute to an Accounts struct used by a callback instruction. It validates that the struct has the necessary accounts for processing a computation's results.
#[init_computation_definition_accounts]
This attribute validates an Accounts struct used to initialize a new ComputationDefinitionAccount on-chain. It also implements the InitCompDefAccs trait from arcium_anchor.