refactor: stronger typing across major components (DID, ResourceId, etc.)#7
Merged
refactor: stronger typing across major components (DID, ResourceId, etc.)#7
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… This ensures rustup installs the wasm target for the 1.93 toolchain automatically, both locally and in CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.