@sd-jwt/core 0.10.1-next.1 → 0.11.0
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 +11 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/index.mjs +6 -0
- package/package.json +7 -7
- package/src/sdjwt.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.11.0](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v0.10.0...v0.11.0) (2025-06-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* SD JWT Instances VCT Metadata get separated from verify ([#285](https://github.com/openwallet-foundation-labs/sd-jwt-js/issues/285)) ([bc91fd7](https://github.com/openwallet-foundation-labs/sd-jwt-js/commit/bc91fd71f7d721298ad5c08d4379bc870903f65f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.10.0](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v0.9.2...v0.10.0) (2025-03-24)
|
|
7
18
|
|
|
8
19
|
|
package/dist/index.d.mts
CHANGED
|
@@ -57,6 +57,7 @@ declare class SDJwt<Header extends Record<string, unknown> = Record<string, unkn
|
|
|
57
57
|
disclosures: Array<Disclosure>;
|
|
58
58
|
kbJwt?: KBJwt<KBHeader, KBPayload>;
|
|
59
59
|
}>;
|
|
60
|
+
static extractJwt<Header extends Record<string, unknown> = Record<string, unknown>, Payload extends Record<string, unknown> = Record<string, unknown>>(encodedSdJwt: SDJWTCompact): Promise<Jwt<Header, Payload>>;
|
|
60
61
|
static fromEncode<Header extends Record<string, unknown> = Record<string, unknown>, Payload extends Record<string, unknown> = Record<string, unknown>, KBHeader extends kbHeader = kbHeader, KBPayload extends kbPayload = kbPayload>(encodedSdJwt: SDJWTCompact, hasher: Hasher): Promise<SDJwt<Header, Payload>>;
|
|
61
62
|
present<T extends Record<string, unknown>>(presentFrame: PresentationFrame<T> | undefined, hasher: Hasher): Promise<SDJWTCompact>;
|
|
62
63
|
getPresentDisclosures<T extends Record<string, unknown>>(presentFrame: PresentationFrame<T> | undefined, hasher: Hasher): Promise<Disclosure<unknown>[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare class SDJwt<Header extends Record<string, unknown> = Record<string, unkn
|
|
|
57
57
|
disclosures: Array<Disclosure>;
|
|
58
58
|
kbJwt?: KBJwt<KBHeader, KBPayload>;
|
|
59
59
|
}>;
|
|
60
|
+
static extractJwt<Header extends Record<string, unknown> = Record<string, unknown>, Payload extends Record<string, unknown> = Record<string, unknown>>(encodedSdJwt: SDJWTCompact): Promise<Jwt<Header, Payload>>;
|
|
60
61
|
static fromEncode<Header extends Record<string, unknown> = Record<string, unknown>, Payload extends Record<string, unknown> = Record<string, unknown>, KBHeader extends kbHeader = kbHeader, KBPayload extends kbPayload = kbPayload>(encodedSdJwt: SDJWTCompact, hasher: Hasher): Promise<SDJwt<Header, Payload>>;
|
|
61
62
|
present<T extends Record<string, unknown>>(presentFrame: PresentationFrame<T> | undefined, hasher: Hasher): Promise<SDJWTCompact>;
|
|
62
63
|
getPresentDisclosures<T extends Record<string, unknown>>(presentFrame: PresentationFrame<T> | undefined, hasher: Hasher): Promise<Disclosure<unknown>[]>;
|
package/dist/index.js
CHANGED
|
@@ -249,6 +249,12 @@ var SDJwt = class _SDJwt {
|
|
|
249
249
|
};
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
+
static extractJwt(encodedSdJwt) {
|
|
253
|
+
return __async(this, null, function* () {
|
|
254
|
+
const [encodedJwt, ..._encodedDisclosures] = encodedSdJwt.split(import_types2.SD_SEPARATOR);
|
|
255
|
+
return Jwt.fromEncode(encodedJwt);
|
|
256
|
+
});
|
|
257
|
+
}
|
|
252
258
|
static fromEncode(encodedSdJwt, hasher) {
|
|
253
259
|
return __async(this, null, function* () {
|
|
254
260
|
const { jwt, disclosures, kbJwt } = yield _SDJwt.decodeSDJwt(encodedSdJwt, hasher);
|
package/dist/index.mjs
CHANGED
|
@@ -231,6 +231,12 @@ var SDJwt = class _SDJwt {
|
|
|
231
231
|
};
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
|
+
static extractJwt(encodedSdJwt) {
|
|
235
|
+
return __async(this, null, function* () {
|
|
236
|
+
const [encodedJwt, ..._encodedDisclosures] = encodedSdJwt.split(SD_SEPARATOR);
|
|
237
|
+
return Jwt.fromEncode(encodedJwt);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
234
240
|
static fromEncode(encodedSdJwt, hasher) {
|
|
235
241
|
return __async(this, null, function* () {
|
|
236
242
|
const { jwt, disclosures, kbJwt } = yield _SDJwt.decodeSDJwt(encodedSdJwt, hasher);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-jwt/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "sd-jwt draft 7 implementation in typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@sd-jwt/crypto-nodejs": "0.
|
|
41
|
+
"@sd-jwt/crypto-nodejs": "0.11.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@sd-jwt/decode": "0.
|
|
45
|
-
"@sd-jwt/present": "0.
|
|
46
|
-
"@sd-jwt/types": "0.
|
|
47
|
-
"@sd-jwt/utils": "0.
|
|
44
|
+
"@sd-jwt/decode": "0.11.0",
|
|
45
|
+
"@sd-jwt/present": "0.11.0",
|
|
46
|
+
"@sd-jwt/types": "0.11.0",
|
|
47
|
+
"@sd-jwt/utils": "0.11.0"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"esm"
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "2e433e767dd162497f5d9ae93d22fe208e18d801"
|
|
66
66
|
}
|
package/src/sdjwt.ts
CHANGED
|
@@ -93,6 +93,16 @@ export class SDJwt<
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
public static async extractJwt<
|
|
97
|
+
Header extends Record<string, unknown> = Record<string, unknown>,
|
|
98
|
+
Payload extends Record<string, unknown> = Record<string, unknown>,
|
|
99
|
+
>(encodedSdJwt: SDJWTCompact): Promise<Jwt<Header, Payload>> {
|
|
100
|
+
const [encodedJwt, ..._encodedDisclosures] =
|
|
101
|
+
encodedSdJwt.split(SD_SEPARATOR);
|
|
102
|
+
|
|
103
|
+
return Jwt.fromEncode(encodedJwt);
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
public static async fromEncode<
|
|
97
107
|
Header extends Record<string, unknown> = Record<string, unknown>,
|
|
98
108
|
Payload extends Record<string, unknown> = Record<string, unknown>,
|