aegis-wallet · pipeline
Declared module signatures, types, configuration, and source documentation.
Source: aegis/aegis-wallet/src/pipeline.rs. SHA-256: 1f47e8f5e14516e501da3b8918bb652f9eb88ed911433066fbeff83b12a1fbea.
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.
pipeline::Transaction
A transaction to authorize and sign.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Transaction {
/// Unique transaction identifier.
pub tx_id: String,
/// DID of the sender.
pub from_did: String,
/// Destination address or DID.
pub to: String,
/// Target blockchain network.
pub chain: String,
/// Transaction payload (calldata, transfer encoding, etc.).
pub data: Vec<u8>,
/// Optional value being transferred (chain-native representation).
pub value: Option<String>
}Source line: 26.
pipeline::Transaction::new
Create a new transaction with an auto-generated UUIDv7 identifier.
pub fn new(from_did: String, to: String, chain: String, data: Vec<u8>) -> Self;Source line: 43.
pipeline::Transaction::with_value
Create a new transaction with an explicit value.
pub fn with_value(mut self, value: String) -> Self;Source line: 55.
pipeline::AuthorizedTransaction
The result of a fully authorized and signed transaction.
#[derive(Debug, Clone)]
pub struct AuthorizedTransaction {
/// The original transaction.
pub transaction: Transaction,
/// The cryptographic signature over the transaction data.
pub signature: Vec<u8>,
/// Obligations that were fulfilled during authorization.
pub fulfilled_obligations: Vec<String>
}Source line: 63.
pipeline::TransactionPipeline
The full transaction authorization pipeline per AEGIS Spec SS10.4.
Enforces a strict five-step process:
- Verify the caller's identity is valid (not expired).
- Check delegation scope for direct or delegated authorization.
- Evaluate policy decision (must be allowed).
- Fulfill all obligations (log obligations are recorded; others that cannot be fulfilled immediately cause failure).
- Sign the transaction data via the configured signing backend.
If any step fails, the pipeline returns an error and the transaction is NOT signed.
pub struct TransactionPipeline {
}Source line: 84.
pipeline::TransactionPipeline::new
Create a new transaction pipeline with the given signing backend.
pub fn new(signer: Arc<dyn SigningBackend>) -> Self;Source line: 91.
pipeline::TransactionPipeline::authorize_and_sign
Execute the full authorization pipeline for a single transaction.
Errors
Returns WalletError::AuthorizationFailed if identity verification
fails, WalletError::PolicyDenied if policy denies the transaction,
WalletError::ObligationFailed if an obligation cannot be fulfilled,
or WalletError::SigningFailed if the signing ceremony fails.
pub async fn authorize_and_sign(
&self,
tx: Transaction,
auth: &AuthContext,
policy_decision: &PolicyDecision,
) -> Result<AuthorizedTransaction, WalletError>;Source line: 103.