Skip to content

bug/resolve-demo - #3

Merged
jintekc merged 2 commits into
mainfrom
bug/resolve-demo
Jul 26, 2026
Merged

bug/resolve-demo#3
jintekc merged 2 commits into
mainfrom
bug/resolve-demo

Conversation

@jintekc

@jintekc jintekc commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator
  • fix x1 resolve demo
  • add pnpm-workspace file

jintekc added 2 commits July 20, 2026 11:46
… 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.
@jintekc
jintekc merged commit 093e072 into main Jul 26, 2026
1 check failed
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