bug/resolve-demo - #3
Merged
Merged
Conversation
jintekc
commented
Jul 20, 2026
Collaborator
- fix x1 resolve demo
- add pnpm-workspace file
… error causes
Resolving any external (x1) DID created by the Create demo failed for three
stacked reasons, verified against api 0.17.0 / method 0.54.1:
- The hand-rolled intermediate document had no beacon service, which method
0.54 validation rejects ("Invalid service: undefined"). Build it with
GenesisDocument.fromPublicKey instead (placeholder ids, Multikey VM, and a
SingletonBeacon with a network-specific address), and regenerate it on
network change unless the user edited the text.
- The Resolve demo suggested sidecar key "initialDocument", but the library
only reads sidecar.genesisDocument, and it must be the placeholder-form
document (the resolver hashes it as-is against the identifier's genesis
bytes). Fix the placeholder text, auto-wrap a bare pasted genesis document,
and have Create emit a ready-to-paste "Sidecar for Resolve" payload instead
of the substituted initial document.
- The api facade wraps failures as "Failed to resolve DID" with the real
error in err.cause, which err.stack/err.message never show. All demos now
print the cause chain via a shared formatError helper.
Also updates demo.md copy for genesis documents and x1 sidecar resolution.
Verified end-to-end in Node against mutinynet: create from the generated
genesis doc, then resolve via both sidecar forms.
pnpm 10 blocks dependency postinstall scripts by default and prompts to approve them; onlyBuiltDependencies silences the prompt for esbuild (the only dependency that needs one) for local installs and 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.