Skip to content

Isolate the seal provider behind a SealBackend trait #107

Description

@LKSNDRTMLKV

Continues the module split landed in #106. That PR moved the provider's config, wire types, prose and tests into crates/dpp-seal/src/eideasy/, but two files still name the provider and both need a structural change rather than a text edit.

Remaining, measured

File Mentions What they are
src/adapter.rs 19 Backend::Eideasy, QtspSealAdapter::eideasy(), use crate::eideasy::client::EideasyClient
src/error.rs 11 variants encoding provider behaviour: five-minute HMAC skew window, rate-limit wording, "host is not this provider"
src/lib.rs 2 pub mod eideasy; and its doc link — structural, and the intended end state
src/config.rs 4 the selector's match arm — also intended

Scope

  1. SealBackend trait, Box<dyn SealBackend> in QtspSealAdapter. Each backend module constructs its own; adapter.rs dispatches without naming any provider. Three implementors exist already — the hosted QTSP, local, and ghost — so the trait has real shape to answer to rather than being speculative.
  2. Provider error variants move to eideasy/error.rs. SealError keeps only what is provider-agnostic (Config, Unsupported, transport). Safe to move: this crate is not published.

Done when

grep -rniE 'eideasy|eid.?easy' crates/dpp-seal/src --exclude-dir=eideasy returns only the pub mod declaration, its doc link, and the selector's match arm.

Context

  • Design rationale and the option analysis: work/SEAL-ARCHITECTURE-2026-08.md in the docs repo
  • What feat(seal): selectable backends, a local sealer, and profile split #106 already did, and why the local backend resolves to the Ghost trust tier while still draining: the PR body
  • SealProvider is deliberately not #[non_exhaustive] — adding a backend must break every wiring site rather than fall into a _ arm

Not in scope

Passports recording which environment issued them. That is a field on a signed, retention-locked document in a published crate and needs its own design pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions