@didis/client 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/dist/index.d.ts +20 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `@didis/client` are listed here. The format follows [Keep
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.2.2] - 2026-10-18
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `verifyCredential` option `requiredClaims` (`ClaimRequirement[]`): check conditions such as `{ path: "/age_over_18", equals: true }` without receiving claim values. The response field `requirements` (`RequirementsOutcome`) reports `met` and a per-path result; conditions are evaluated only for a `VALID` credential.
|
|
12
|
+
|
|
7
13
|
## [0.2.1] - 2026-10-14
|
|
8
14
|
|
|
9
15
|
### Added
|
|
@@ -40,7 +46,8 @@ All notable changes to `@didis/client` are listed here. The format follows [Keep
|
|
|
40
46
|
- `DidisError` carrying the RFC 9457 problem body and `Retry-After`.
|
|
41
47
|
- Webhook helpers `verifyWebhookSignature` and `verifyCustomerMonitorSignature`.
|
|
42
48
|
|
|
43
|
-
[Unreleased]: https://github.com/did-is/didis-js/compare/v0.2.
|
|
49
|
+
[Unreleased]: https://github.com/did-is/didis-js/compare/v0.2.2...HEAD
|
|
50
|
+
[0.2.2]: https://github.com/did-is/didis-js/compare/v0.2.1...v0.2.2
|
|
44
51
|
[0.2.1]: https://github.com/did-is/didis-js/compare/v0.2.0...v0.2.1
|
|
45
52
|
[0.2.0]: https://github.com/did-is/didis-js/compare/v0.1.0...v0.2.0
|
|
46
53
|
[0.1.0]: https://github.com/did-is/didis-js/releases/tag/v0.1.0
|
package/dist/index.d.ts
CHANGED
|
@@ -254,6 +254,24 @@ export interface CredentialVerifyOptions {
|
|
|
254
254
|
expectedNonce?: string;
|
|
255
255
|
/** Caller-chosen X.509 anchors (PEM or base64 DER) for SD-JWT VC `x5c`. Without them `x5c` is never VALID. */
|
|
256
256
|
trustedIssuerCertificates?: string[];
|
|
257
|
+
/**
|
|
258
|
+
* Conditions checked without returning claim values, e.g. `[{ path: "/age_over_18", equals: true }]`.
|
|
259
|
+
* Paths are JSON Pointers into the issuer-signed claims; `equals` is a boolean, integer or string.
|
|
260
|
+
* Evaluated only for a VALID credential; see `CredentialVerification.requirements`.
|
|
261
|
+
*/
|
|
262
|
+
requiredClaims?: ClaimRequirement[];
|
|
263
|
+
}
|
|
264
|
+
export interface ClaimRequirement {
|
|
265
|
+
path: string;
|
|
266
|
+
equals: boolean | number | string;
|
|
267
|
+
}
|
|
268
|
+
export interface RequirementsOutcome {
|
|
269
|
+
/** True only when the credential is VALID and every condition is SATISFIED. */
|
|
270
|
+
met: boolean;
|
|
271
|
+
results: {
|
|
272
|
+
path: string;
|
|
273
|
+
result: "SATISFIED" | "NOT_SATISFIED" | "NOT_DISCLOSED" | "NOT_EVALUATED";
|
|
274
|
+
}[];
|
|
257
275
|
}
|
|
258
276
|
export interface CredentialVerification {
|
|
259
277
|
status: string;
|
|
@@ -304,6 +322,8 @@ export interface CredentialVerification {
|
|
|
304
322
|
issuerTrust?: IssuerTrust;
|
|
305
323
|
/** SD-JWT VC only. No disclosed claim values are ever returned. */
|
|
306
324
|
sdJwt?: SdJwtEvidence;
|
|
325
|
+
/** Present only when `requiredClaims` was sent. Never contains claim values. */
|
|
326
|
+
requirements?: RequirementsOutcome;
|
|
307
327
|
/** For SD-JWT VC: disclosed claim paths and digests only, never values. */
|
|
308
328
|
claims: unknown;
|
|
309
329
|
credential: unknown;
|
package/dist/index.js
CHANGED
|
@@ -137,6 +137,7 @@ export class DidisClient {
|
|
|
137
137
|
expectedAudience: options.expectedAudience,
|
|
138
138
|
expectedNonce: options.expectedNonce,
|
|
139
139
|
trustedIssuerCertificates: options.trustedIssuerCertificates,
|
|
140
|
+
requiredClaims: options.requiredClaims,
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
143
|
evaluatePolicy(did, policy, credential) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@didis/client",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Official TypeScript/JavaScript SDK for the DID.is public API: DID resolution with evidence, credentials, policies and agent trust",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|