Advanced
Batch
Simulate multiple proposals in a single transaction for pre-flight policy checks.
Pre-alpha — not production ready
aura-sdk targets Solana devnet only. APIs may change without notice. Do not use for real funds until a stable release and audit are published.
propose_batch
Evaluate a batch of proposals against the treasury's policy rules in a single transaction. No state is committed — simulation only. The result is stored in a PDA.
// Build only
let instruction = client.propose_batch_instruction(accounts, args);
// Build + send
client.propose_batch(&payer, accounts, args)?;use aura_sdk::pda::derive_batch_proposal_pda;
let batch_id: u64 = 1;
let (batch, _) = derive_batch_proposal_pda(&treasury, batch_id, &client.program_id());
client.propose_batch(
&payer,
aura_core::accounts::ProposeBatch {
payer: payer.pubkey(),
treasury,
batch,
system_program: anchor_lang::system_program::ID,
},
aura_core::ProposeBatchArgs {
batch_id,
items: vec![
aura_core::BatchProposalItemArgs {
amount_usd: 250,
target_chain: 2,
tx_type: 0,
protocol_id: None,
recipient_or_contract: "0xrecipient1...".to_string(),
counterparty_risk_score: None,
quote_age_secs: None,
expected_output_usd: None,
actual_output_usd: None,
},
aura_core::BatchProposalItemArgs {
amount_usd: 500,
target_chain: 2,
tx_type: 1,
protocol_id: None,
recipient_or_contract: "0xrecipient2...".to_string(),
counterparty_risk_score: Some(20),
quote_age_secs: Some(60),
expected_output_usd: Some(495),
actual_output_usd: Some(493),
},
],
current_timestamp: now,
},
)?;