Skip to content

refactor: stronger typing across major components (DID, ResourceId, etc.)#7

Merged
bordumb merged 18 commits intomainfrom
dev-typing
Mar 3, 2026
Merged

refactor: stronger typing across major components (DID, ResourceId, etc.)#7
bordumb merged 18 commits intomainfrom
dev-typing

Conversation

@bordumb
Copy link
Contributor

@bordumb bordumb commented Mar 3, 2026

No description provided.

bordumb added 10 commits March 3, 2026 04:16
Replace stringly-typed rid (String) with ResourceId newtype and
role (Option<String>) with Option<Role> enum across the entire workspace.

ResourceId: transparent serde, Deref<Target=str>, PartialEq<str/&str/String>.
Role: Admin/Member/Readonly with serde rename_all lowercase, as_str(),
default_capabilities(), Display, FromStr.

Delete duplicate SDK Role enum; re-export from auths-verifier.
CanonicalAttestationData fields unchanged (still &str) for signature stability.
All 27 files updated, workspace + WASM compile clean.
…ipt fields (fn-7.4)

- SealType enum replaces String in Seal, used across anchor.rs
- KeriSequence(u64) newtype with hex serde, Event::sequence() now infallible
- GitRef/BlobName newtypes for StorageLayoutConfig fields with Deref<Target=str>
- WitnessConfig.witness_urls changed from Vec<String> to Vec<url::Url>
- ReceiptVerificationResult Duplicity/InvalidSignature use Said/DeviceDID
- Updated all cross-crate callers (CLI, SDK, storage, test-utils)
Replace bare String fields in BridgeError with struct variants carrying typed
IdentityDID/DeviceDID fields. Replace VerifyResult reason strings with typed
enums: VerifyReason, RejectReason, WarnReason, QuarantineReason. All reason
enums are #[non_exhaustive] with Display impls for readable logging.
…d, Vec<Capability>

Replace stringly-typed fields in SDK result and config types:
- SetupResult, CiSetupResult: identity_did → IdentityDID, device_did → DeviceDID
- AgentSetupResult: agent_did/parent_did → IdentityDID, capabilities → Vec<Capability>
- DeviceLinkResult: device_did → DeviceDID, attestation_id → ResourceId
- RotationResult: controller_did → IdentityDID
- DeviceExtensionResult: device_did → DeviceDID
- AgentSetupConfig/DeviceLinkConfig: capabilities → Vec<Capability>

Fix leftover KeriSequence string literals in rotation tests (fn-7.4 follow-up).
…to enum

Absorb DidMethod::Key and DidMethod::Keri variants into ResolvedDid and
ResolvedIdentity enums directly, eliminating the intermediate DidMethod
type. Add accessor methods (did(), public_key(), is_key(), is_keri())
for convenient field access. Fix remaining KeriSequence leftovers in
auths-id tests.
- StoredIdentityData.controller_did: String → IdentityDID
- AgentIdentityBundle.agent_did: String → IdentityDID
- MemberInvalidReason fields: String → DeviceDID/IdentityDID
- MemberView: role → Role, capabilities → Vec<Capability>, issuer → IdentityDID, rid → ResourceId
- MemberFilter: roles_any → HashSet<Role>, capabilities_any/all → HashSet<Capability>
- OrgMemberEntry.org: String → IdentityDID
- Add Base64UrlEncoded newtype for pairing types
- CreateSessionRequest.ephemeral_pubkey → Base64UrlEncoded
- SubmitResponseRequest fields → Base64UrlEncoded/DeviceDID
- Update all construction/access sites in backend, adapter, CLI, SDK
@bordumb bordumb self-assigned this Mar 3, 2026
@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auths Ready Ready Preview, Comment Mar 3, 2026 8:10pm

bordumb added 2 commits March 3, 2026 19:43
… This ensures rustup installs the wasm target for the 1.93 toolchain automatically, both locally and in CI
@bordumb bordumb merged commit 4de6da6 into main Mar 3, 2026
8 of 10 checks passed
@bordumb bordumb deleted the dev-typing branch March 3, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant