Expand description
Signing flow orchestration for the TxGate signing service.
This module provides the SigningService that orchestrates the complete
signing flow: parsing, policy checking, and signing.
§Flow Overview
The signing service performs the following steps:
- Parse - Transform raw transaction bytes into a
ParsedTx - Check - Evaluate the transaction against policy rules
- Sign - If allowed, sign the transaction hash
§Example
ⓘ
use txgate_core::signing::{SigningService, SigningResult};
use txgate_chain::Chain;
use txgate_policy::PolicyEngine;
use txgate_crypto::Signer;
// Create the service with your implementations
let service = SigningService::new(chain, policy, signer);
// Sign a transaction
let result = service.sign(&raw_tx_bytes)?;
// Or just check policy without signing (dry run)
let result = service.check(&raw_tx_bytes)?;§Thread Safety
SigningService is Send + Sync when all its components are,
allowing it to be shared across async tasks.
Structs§
- Signing
Result - Comprehensive result of a signing operation.
- Signing
Service - Orchestrates the signing flow: parsing, policy checking, and signing.
Enums§
- Policy
Check Result - Detailed result of a policy check operation.
- Signing
Error - Errors that can occur during the signing flow.
Traits§
- Chain
Parser - Trait for chain parsers.
- Policy
Engine Ext - Trait for policy engines.
- Signer
Ext - Trait for signers.
Type Aliases§
- Signature
Bytes - Signature as a 64-byte array (r || s without recovery ID).