decentralized-identity / decentralized-identity/didwebvh-ts
A verification method can only hold one purpose, and createVMID is not exported
- Dominant language
- TypeScript
- Stars
- 20
- Forks
- 25
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 16
Description
`VerificationMethod.purpose` is a single `DataIntegrityProofPurpose`, and `normalizeVMs` pushes each method into exactly one relationship. There is no way to express one key that is both `authentication` and `assertionMethod` — the common shape for a DID with a single key.
The workaround is passing explicit `authentication: [...]` / `assertionMethod: [...]` arrays, but those need the verification method's id. `createVMID` derives it as `${did}#${publicKeyMultibase.slice(-8)}`, and at create time the caller doesn't know the DID yet (the SCID isn't derived). `createVMID` also isn't re-exported from `src/index.ts`, so callers either re-implement the fragment derivation or pass a relative `#` reference and hope the derivation doesn't change.
credo-ts does the latter: openwallet-foundation/credo-ts#2928
Suggestion: accept `purpose` as an array (or add `purposes`), so one method can land in several relationships without the caller needing to construct its id.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.