hyperledger-identus / hyperledger-identus/sdk-rust

identus-did-resolver-http: adopt neoprism's W3C DID Resolution axum binding as the Layer 1 HTTP port

Open
#10 7 comments 0 reactions 0 assignees View on GitHub
crystallization enhancement
Dominant language
Rust
Stars
0
Forks
0
Avg merge
39m
Merged PRs (30d)
153

Description

Spec is crystallized (the unit exists, is small, and is chain-agnostic); component issue per the program rule. Tracking epic: MediaNoxLabs/midnight-identity#20. Depends on #5 (the reconciled identus-did-core); coordinates with MediaNoxLabs/midnight-identity#16 and #43.

## Spec (crystallized)

**Seed**: neoprism's `lib/did-resolver-http` (crate `identus-did-resolver-http`, ~182 LOC, dependencies: identus-did-core + axum only). It is the single most liftable unit in the estate: a chain-agnostic W3C DID Resolution HTTP binding that serves **any** `DidResolver` implementation, with:

- Spec-correct content negotiation: `application/did`, `application/did-resolution`, `application/json`.
- Typed error-URI to HTTP status mapping: invalidDid/invalidDidUrl/invalidOptions -> 400, notFound -> 404, deactivated -> 410, representationNotSupported -> 406, methodNotSupported/unsupportedPublicKeyType -> 501, else 500.
- An optional `openapi` (utoipa) feature that yields the documented API surface for free.

**Why Layer 1**: three independent resolution-envelope implementations exist across the estate (this crate; midnight-identity's hand-rolled resolver service envelope; the portal's client-side re-parse). Adopting this binding collapses the server side to one implementation: the midnight read-path resolver mounts it unchanged once `identus-did-core`'s reconciled `DidResolver` trait lands (that swap is tracked in MediaNoxLabs/midnight-identity#16).

## Tasks

- [ ] Adopt the crate into the sdk-rust workspace against the reconciled #5 types (the reconciliation must preserve the envelope constructors and error taxonomy this binding consumes).
- [ ] Keep the seed's behavior byte-compatible: port neoprism's binding tests; add negative-negotiation cases.
- [ ] Publish under the reserved name; neoprism repoints (MediaNoxLabs/midnight-identity#43); midnight resolver adoption follows in MediaNoxLabs/midnight-identity#16.

## Acceptance

- Published; consumed by neoprism-node and mountable by the midnight read-path resolver with no envelope changes; OpenAPI feature verified.

Contributor guide

Open the contributing guide

Research direction

Start with neoprism's lib/did-resolver-http and its identus-did-resolver-http crate, then review the reconciled identus-did-core types from #5 and the integration tracked in #16. Port the binding and its tests, add negative content-negotiation cases, and verify publication, OpenAPI behavior, and consumption by neoprism-node without envelope changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.