Releases: interop-alliance/did-method-webvh
Releases · interop-alliance/did-method-webvh
Release list
v5.8.0
Changed
- Port upstream decentralized-identity#170 and controlled-DID hook.
v5.7.0
Changed
requestedDidis no longer part of the publicResolutionOptions; it is
set internally byresolveDID. Ported from upstream 7533576 (PR decentralized-identity#170).
v5.6.1
Fixed
canonicalizeStrict(and so entry hashing) no longer rejects an input that
reaches the same object or array from two places -- one instance referenced
twice, not two equal copies. The circular-reference check tracked every
value ever visited rather than the current recursion path, so an ordinary
acyclic graph -- a signed zcap whose proof carries the same@contextarray
instance as the document, embedded in a log entry -- threw
Canonicalization input contains circular references. Such an input now
hashes as its JSON round trip does; a value that genuinely contains itself
still throws.
v5.6.0
Added
- Resolution meta now includes
versionTime(the resolved entry's timestamp)
andttl(the spec's cache-lifetime parameter).ttlis typed on
DIDLogEntry.parameters, carried forward across entries likewatchers,
and reported as a number of seconds; when the log never sets it (or sets it
tonull), the spec default of 3600 is reported. Ports upstream79d37f1
(plus its tests7392e53,751d647), with the type corrected from
upstream's string coercion to the spec's unsigned integer.
Fixed
- Resolving a deactivated DID with a historical selector (
versionId,
versionTime, orversionNumber) now returns the historical document with
deactivated: truein the meta. Deactivation is DID-global state, so it
previously readfalseat historical versions. Ports upstream708e67f.
v5.5.1
Changed
json-canonicalizebumped from the pinned 2.0.0 to 3.0.0 (the intact
release after the broken 2.0.1 publish).
v5.5.0
Changed
- Ed25519 multikey decoding (
decodeEd25519Multikey, the witness DID key
check) now delegates todecodeMultikeyfrom
@interop/data-integrity-core/multihashinstead of comparing the
0xed 0x01header by hand. Two deliberate tightenings follow: the key must
now be exactly 32 bytes (previously unchecked), and a multikey must be
base58btc (z) multibase --ubase64url is no longer accepted. The
refusal message is now the shared codec's (Unexpected multikey codec: ...)
rather thanmultiKey doesn't include ed25519 header (0xed01); the witness
check keeps its ownWitness DID key type must be Ed25519 (multicodec 0xed01): ...message. decodeMultikeyandMultikeyCodecare re-exported from
src/utils/multiformats.tsalongside the multihash codec.- Bumped
@interop/data-integrity-coreto^8.7.1, which is where
decodeMultikeyandMultikeyCodecship.
Removed
- The internal
isEd25519Multikeyhelper; it had no callers left and was not
part of the package's export surface.
v5.4.1
Changed
- Pin
json-canonicalizeto exactly 2.0.0: the 2.0.1 publish is broken (its
dist files are missing), and the pin keeps consumers resolving through this
package from picking it up.
v5.4.0
Added
BASE_CONTEXTis now exported from the package index.- New additive
additionalContextoption oncreateDID/updateDID: an array
of context entries appended afterBASE_CONTEXTon create (or after the
supplieddidDocument's own@context), and after the carried-forward
@contexton update, deduplicated (strings by value, objects by JSON
serialization). It is mutually exclusive withcontext, which remains the
full-override escape hatch; passing both throws. No document bytes change:
the result matches whatcontext: [...BASE_CONTEXT, extra]already produced.
Changed
- Documented the
contextoption's semantics on both interfaces: it replaces
the document's@contextwholesale, andupdateDIDwithout it preserves the
prior entry's context, falling back toBASE_CONTEXTonly when the document
never had one.
v5.3.0
Changed
- The multihash codec (
MultihashAlgorithm,createMultihash,
decodeMultihash) now comes from@interop/data-integrity-core/multihash
(^8.6.0) and is re-exported fromsrc/utils/multiformats.ts; the local
implementation is gone. Byte behavior is unchanged; varint decoding is
stricter (overlong and oversized varints are rejected) and decoding refuses
trailing bytes after the digest.
Removed
DIGEST_LENGTHSis no longer exported (it had no consumers outside the
module; the shared codec keeps it internal).
v5.2.0
Changed
- BREAKING:
documentStateIsValidnow takes an options object
(documentStateIsValid(entry, { updateKeys, verifier, resolveVM })) and does
entry-proof verification only. Thewitnessargument and the
skipWitnessVerificationflag are gone; witness-parameter validation lives
with the callers that own it. - BREAKING:
countVerifiedWitnessApprovalsis now
countVerifiedWitnessApprovals(witnessProofs, witness, { verifier, resolveVM, threshold?, proofVerificationCache? }); the unused log-entry argument was
dropped. It can stop counting atthresholdand memoize identical
(versionId, proofValue)verifications across checks. - BREAKING: The default verification-method resolver
resolveVMmoved out
ofutilsinto its own method-layer module and is now exported from the
package root (along with acreateResolveVMfactory);documentStateIsValid
and witness verification receive it via the newresolveVMresolution option
(defaulted automatically byresolveDID/resolveDIDFromLogand the write
operations). Repeateddid:webvhverification-method resolutions are
memoized within a single resolution; nothing is cached across resolutions,
so key rotations are always picked up. - BREAKING:
validateWitnessParameterno-ops on an absent or empty witness
parameter instead of throwingWitness list cannot be empty; callers no
longer guard it. - BREAKING: Removed the legacy
witnesses/witnessThresholdentry
parameter wire format (a v0.5 shape; this fork only supports v1.0). A log
entry carrying the legacy shape is now rejected during resolution (fail
closed) rather than resolving with its witness requirement silently ignored.
Removed theWitnessParameterResolutiontype and
normalizeWitnessThreshold;resolveWitnessParameternormalizes
thresholdto a number at the parse boundary, so
DIDResolutionMeta.witnessis a plainWitnessParameter. - BREAKING:
updateDIDgenerates the paralleldid:webdocument only when
the newalsoKnownAsWeb: trueoption is passed (it also appends the
did:webalias), instead of sniffingdid:web:aliases in the document.
When the updated document carries the paralleldid:webalias but
alsoKnownAsWebwas not passed,updateDIDwarns that nowebDocwas
generated, so publishers migrating from the sniffing behavior notice instead
of silently serving a staledid:webdocument. - BREAKING: Removed
countWitnessApprovals(unverified-proof counter),
createSCID(identity function),createHashHex,readLogFromDisk,
encodeMultihashWithMultibase(alias ofmultibaseEncode), the
previousLogEntryHashandlatestVersionIdresolution-meta fields, the
SignDIDDocInterfacetype, and theMETHOD_PARAMETER_KEYSconstant. - BREAKING: Public operations no longer write DID logs to
./test/logs/
whenNODE_ENV=test;src/config.tsand thetest:logscript were removed. - A witness threshold failure is now signaled by a typed, exported
WitnessThresholdErrorinstead of an internal callback-set flag, and
resolution no longer writes fetched witness proofs back into the caller's
options object. - Resolution-selector validation is centralized in the new exported
validateResolutionSelectors, applied identically toresolveDIDand the
in-memoryresolveDIDFromLogpath (verificationMethod+versionTime
remains a supported combined selector). - A genesis entry missing
scidorupdateKeys, and a pre-rotation entry
missingupdateKeys, are now rejected with explicit validation errors
instead of flowingundefinedinto resolution state. - A genesis entry's
witnessparameter is now validated during resolution
(threshold bounds, did:key Ed25519 witness ids, no duplicates), the same
checks previously applied only to subsequent entries; a log whose first
entry declares an invalid witness parameter no longer resolves. - The write path (create/update/deactivate) and the resolver now derive
resolution meta through one shared reducer, so both report identical values
for the same log. - Duplicate identifier parsing, the localhost-http exception, alias appending,
the eddsa-jcs-2022 signing-input construction, the Ed25519 multikey decode,
the proof-shape check, and the prerotation predicate each collapsed to a
single shared implementation. The witness verify path now validates the
Ed25519 multikey prefix (previously only a 34-byte length check). - Two conflicting-selector / fragment-guard error messages changed wording:
did:webvh identifier must not include query or fragment componentsis now
Address input must not include query or fragment components, and
version-prefix messages render the numeric version. newKeysAreInNextKeysresolves tovoidinstead oftrue.UpdateDIDInterface/DeactivateDIDInterface/ResolutionOptionsnow declare
all accepted options (services,address,paths,updateKeys,
witnessProofs, ...);CreateDIDInterfacedeclaresmethod.
CreateDIDResult/UpdateDIDResultshare oneDIDOperationResultshape.createDIDDocis synchronous and returns the document directly (previously
Promise<{ doc }>);prepareGenesisEntry/prepareUpdateEntry/
prepareDeactivationEntryreturn the entry directly.
Fixed
updateDIDno longer ignores explicitcapabilityDelegation/
capabilityInvocationoverrides (the other three relationship overrides
already applied; all five now apply uniformly).
Added
priorMetaoption onupdateDID/deactivateDID: opt-in trusted prior
state that skips the full log re-resolution (previously O(n^2) signature
verifications over a DID's lifetime); full re-resolution stays the default.selfVerify: falseoption on create/update/deactivate to skip the post-sign
self-verification (default remains on).parseDidWebvhIdentifieris exported from the package root.
Performance
- Removed redundant work throughout the hot paths: single-traversal strict
canonicalization, one cache-key serialization perderiveHash, one
structuredCloneof the resolved document per resolution (previously one
per log entry), memoized + threshold-bounded + concurrent witness proof
verification, and per-resolution memoization of verification-method
resolutions.