Skip to content

Allow log that changes version midway through #62

@brianorwhatever

Description

@brianorwhatever

Implement per-entry protocol detection and process each contiguous segment with the matching resolver. When a version change is detected, finalize the current resolver’s output and continue resolving the next segment with the new version’s resolver.

Something like this:

  1. Introduce a helper in src/method.ts to compute protocol version for a single DIDLogEntry.
  2. Update resolveDIDFromLog to iterate over log entries, splitting the log whenever parameters.method changes.
  3. For each segment, call the appropriate resolver (v0_5.resolveDIDFromLog or v1.resolveDIDFromLog) and keep track of the most recent doc, meta and did.
  4. After processing all segments, return the result from the last resolver invocation.
  5. Add tests demonstrating that a log beginning with did:webvh:0.5 entries followed by did:webvh:1.0 entries resolves correctly.
  6. Document this new behavior in README.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions