OpenAgentID documentation
Source referencesRust module referenceaegis-wallet

aegis-wallet · batch

Declared module signatures, types, configuration, and source documentation.

Source: aegis/aegis-wallet/src/batch.rs. SHA-256: 96a13662307da6923a4bd7ad5e97ad451e8c2a5d47a6afea43f1b4b174cd4590.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

batch::BatchResult

Result of a batch signing operation.

#[derive(Debug)]
pub struct BatchResult {
/// The batch mode that was used.

pub mode: BatchMode,
/// Per-transaction results (Ok for signed, Err for failures).

pub results: Vec<Result<AuthorizedTransaction, WalletError>>,
/// Total number of transactions in the batch.

pub total: usize,
/// Number of transactions that were successfully signed.

pub succeeded: usize
}

Source line: 15.

batch::execute_batch

Execute batch transaction signing through the authorization pipeline.

Modes

  • AllOrNothing: Pre-validates all transactions first (dry-run). If any would fail, returns an error without signing any. If all pass validation, signs all of them.

  • BestEffort: Attempts each transaction independently. Failures are recorded in the results vec but do not prevent other transactions from being signed.

Errors

In AllOrNothing mode, returns WalletError::BatchPartialFailure if any transaction in the batch fails authorization or signing.

In BestEffort mode, the function itself only returns Err for catastrophic/infrastructure failures. Individual transaction failures are captured in BatchResult::results.

pub async fn execute_batch(
    pipeline: &TransactionPipeline,
    transactions: Vec<(Transaction, AuthContext, PolicyDecision)>,
    mode: BatchMode,
) -> Result<BatchResult, WalletError>;

Source line: 46.

On this page