npm / @sd-jwt/core
@sd-jwt/core
What changed in @sd-jwt/core 0.20 to 0.25, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
30 breaking2 security3 new APIs and options9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@sd-jwt/core 0.2522 changes
Breaking changes 22
Renamed to DecodedSdJwt.
Jwt.decodeJWT is renamed to Jwt.decodeJwt.
SdJwt.decodeSDJwt is renamed to SdJwt.decodeSdJwt.
The static property is renamed to defaultHashAlg on SDJwtInstance and SDJwtGeneralJSONInstance.
SdJwt.encodeSDJwt is renamed to SdJwt.encodeSdJwt.
Renamed to FlattenJson.
Error classes use the FooError naming convention; *Exception names are renamed to *Error and error names change accordingly.
KbJwt.fromKBEncode is renamed to KbJwt.fromKbEncode.
Renamed to GeneralJson.
Renamed to getSdAlgAndPayload.
The type is renamed to KbJwtHeader.
Renamed to KbJwt.
Renamed to KbOptions.
The type is renamed to KbJwtPayload.
The export is renamed from SDJwt to SdJwt to write abbreviations as words.
Renamed to SdJwtCompact.
Renamed to SdJwtConfig.
Renamed to SdJwtError; the renamed error's name changes as well.
Renamed to toFlattenJson.
Renamed to toGeneralJson.
KbJwt.verifyKB is renamed to KbJwt.verifyKb.
Zod schemas use the zFoo naming convention instead of FooSchema or fooSchema.
@sd-jwt/core 0.242 changes
Breaking changes 2
Verification rejects issuer-signed JWTs and Key Binding JWTs with a crit header the verifier does not understand, as RFC 7515 requires.
Verification rejects SD-JWT VCs where a protected claim arrives in a Disclosure.
@sd-jwt/core 0.231 changes
Breaking changes 1
The CommonJS build is dropped; only ESM is published, avoiding dual-package hazards that caused instanceof checks to fail in some runtimes.
@sd-jwt/core 0.229 changes
Breaking changes 4
This check now applies to the issuer-signed SD-JWT payload rather than the Key Binding JWT or Status List Token.
Use this option to constrain the Key Binding JWT audience; credential expectedAudience no longer applies to it.
Time-claim failures now throw this SDJWTException subclass with structured details and error codes.
The constructor now takes an options object with details, code, and cause instead of positional arguments.
Security 1
Adds a verifier option to restrict Key Binding JWT algorithms; allowedIssuerAlgorithms applies only to issuer-signed JWTs.
New APIs and options 1
Provides structured time-check details, including the claim, its value, current time, allowed clock skew, and maximum age when applicable.
Fixes and other changes 3
Issuer algorithm restrictions apply to issuer-signed JWTs, not Key Binding JWTs or Status List Tokens; status-list signatures remain verified by the configured status verifier.
Time-check failures identify the Key Binding JWT and use dedicated expired, not-yet-valid, and too-old error codes.
Uses the code on SDJWTException rather than matching message substrings; errors without a code are reported as UNKNOWN_ERROR.
@sd-jwt/core 0.219 changes
Breaking changes 1
The CommonJS entrypoint is now dist/index.cjs instead of dist/index.js.
New APIs and options 2
Adds the standard RFC 7519 aud and jti claims to the payload type.
Type declarations are now exposed through the types export condition.
Fixes and other changes 6
Propagates the ExtendedPayload generic through getClaims, improving payload typing.
Propagates the ExtendedPayload generic through keys, improving payload typing.
Propagates the ExtendedPayload generic through presentableKeys, improving payload typing.
Propagates the ExtendedPayload generic through decode, improving payload typing.
Nested disclosure values are cloned before recursive unpacking, preventing mutation during unpack.
Decoding now uses @owf/identity-common; invalid UTF-8 is rejected, and errors remain SDJWTException with the same messages.
@sd-jwt/core 0.201 changes
Security 1
SD JWT JS: Tampered disclosures silently dropped instead of rejected