// ----------------------------------------------------------------------------- // IDsseSigningAdapter.cs // Sprint: SPRINT_1227_0001_0001_LB_binary_vex_generator // Task: T5 - DSSE signing integration // ----------------------------------------------------------------------------- namespace StellaOps.BinaryIndex.VexBridge; /// /// Adapter interface for DSSE signing operations. /// Abstracts the Attestor signing service for VexBridge use. /// public interface IDsseSigningAdapter { /// /// Sign a payload and return a DSSE envelope. /// /// The payload bytes to sign. /// The DSSE payload type URI. /// Cancellation token. /// DSSE envelope as JSON bytes. Task SignAsync(byte[] payload, string payloadType, CancellationToken ct = default); /// /// Verify a DSSE envelope signature. /// /// The DSSE envelope bytes. /// Cancellation token. /// True if signature is valid. Task VerifyAsync(byte[] envelope, CancellationToken ct = default); /// /// Get the key ID used for signing. /// string SigningKeyId { get; } /// /// Check if signing is available. /// bool IsAvailable { get; } } /// /// DSSE envelope result with metadata. /// public sealed record DsseEnvelopeResult { /// The DSSE envelope as JSON string. public required string Envelope { get; init; } /// The signing key ID used. public required string KeyId { get; init; } /// SHA-256 hash of the envelope. public required string EnvelopeHash { get; init; } /// Timestamp when signed. public required DateTimeOffset SignedAt { get; init; } }