@sd-jwt/core 0.1.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.
Files changed (109) hide show
  1. package/build/base64url.d.ts +28 -0
  2. package/build/base64url.js +40 -0
  3. package/build/base64url.js.map +1 -0
  4. package/build/hasherAlgorithm.d.ts +70 -0
  5. package/build/hasherAlgorithm.js +75 -0
  6. package/build/hasherAlgorithm.js.map +1 -0
  7. package/build/index.d.ts +11 -0
  8. package/build/index.js +20 -0
  9. package/build/index.js.map +1 -0
  10. package/build/jwt/compact.d.ts +6 -0
  11. package/build/jwt/compact.js +27 -0
  12. package/build/jwt/compact.js.map +1 -0
  13. package/build/jwt/error.d.ts +2 -0
  14. package/build/jwt/error.js +7 -0
  15. package/build/jwt/error.js.map +1 -0
  16. package/build/jwt/index.d.ts +3 -0
  17. package/build/jwt/index.js +20 -0
  18. package/build/jwt/index.js.map +1 -0
  19. package/build/jwt/jwt.d.ts +204 -0
  20. package/build/jwt/jwt.js +324 -0
  21. package/build/jwt/jwt.js.map +1 -0
  22. package/build/keyBinding/index.d.ts +1 -0
  23. package/build/keyBinding/index.js +18 -0
  24. package/build/keyBinding/index.js.map +1 -0
  25. package/build/keyBinding/keyBinding.d.ts +56 -0
  26. package/build/keyBinding/keyBinding.js +99 -0
  27. package/build/keyBinding/keyBinding.js.map +1 -0
  28. package/build/sdJwt/compact.d.ts +8 -0
  29. package/build/sdJwt/compact.js +39 -0
  30. package/build/sdJwt/compact.js.map +1 -0
  31. package/build/sdJwt/decoys.d.ts +2 -0
  32. package/build/sdJwt/decoys.js +35 -0
  33. package/build/sdJwt/decoys.js.map +1 -0
  34. package/build/sdJwt/disclosureFrame.d.ts +7 -0
  35. package/build/sdJwt/disclosureFrame.js +89 -0
  36. package/build/sdJwt/disclosureFrame.js.map +1 -0
  37. package/build/sdJwt/disclosureMapping.d.ts +44 -0
  38. package/build/sdJwt/disclosureMapping.js +289 -0
  39. package/build/sdJwt/disclosureMapping.js.map +1 -0
  40. package/build/sdJwt/disclosures.d.ts +14 -0
  41. package/build/sdJwt/disclosures.js +59 -0
  42. package/build/sdJwt/disclosures.js.map +1 -0
  43. package/build/sdJwt/error.d.ts +2 -0
  44. package/build/sdJwt/error.js +7 -0
  45. package/build/sdJwt/error.js.map +1 -0
  46. package/build/sdJwt/index.d.ts +7 -0
  47. package/build/sdJwt/index.js +24 -0
  48. package/build/sdJwt/index.js.map +1 -0
  49. package/build/sdJwt/presentationFrame.d.ts +4 -0
  50. package/build/sdJwt/presentationFrame.js +73 -0
  51. package/build/sdJwt/presentationFrame.js.map +1 -0
  52. package/build/sdJwt/sdJwt.d.ts +204 -0
  53. package/build/sdJwt/sdJwt.js +383 -0
  54. package/build/sdJwt/sdJwt.js.map +1 -0
  55. package/build/sdJwt/swapClaim.d.ts +3 -0
  56. package/build/sdJwt/swapClaim.js +90 -0
  57. package/build/sdJwt/swapClaim.js.map +1 -0
  58. package/build/sdJwt/types.d.ts +5 -0
  59. package/build/sdJwt/types.js +3 -0
  60. package/build/sdJwt/types.js.map +1 -0
  61. package/build/sdJwtVc/error.d.ts +2 -0
  62. package/build/sdJwtVc/error.js +7 -0
  63. package/build/sdJwtVc/error.js.map +1 -0
  64. package/build/sdJwtVc/index.d.ts +2 -0
  65. package/build/sdJwtVc/index.js +19 -0
  66. package/build/sdJwtVc/index.js.map +1 -0
  67. package/build/sdJwtVc/sdJwtVc.d.ts +47 -0
  68. package/build/sdJwtVc/sdJwtVc.js +125 -0
  69. package/build/sdJwtVc/sdJwtVc.js.map +1 -0
  70. package/build/signatureAndEncryptionAlgorithm.d.ts +105 -0
  71. package/build/signatureAndEncryptionAlgorithm.js +110 -0
  72. package/build/signatureAndEncryptionAlgorithm.js.map +1 -0
  73. package/build/types/disclosure.d.ts +5 -0
  74. package/build/types/disclosure.js +3 -0
  75. package/build/types/disclosure.js.map +1 -0
  76. package/build/types/frame.d.ts +5 -0
  77. package/build/types/frame.js +3 -0
  78. package/build/types/frame.js.map +1 -0
  79. package/build/types/hasher.d.ts +14 -0
  80. package/build/types/hasher.js +3 -0
  81. package/build/types/hasher.js.map +1 -0
  82. package/build/types/index.d.ts +6 -0
  83. package/build/types/index.js +23 -0
  84. package/build/types/index.js.map +1 -0
  85. package/build/types/present.d.ts +2 -0
  86. package/build/types/present.js +3 -0
  87. package/build/types/present.js.map +1 -0
  88. package/build/types/saltGenerator.d.ts +17 -0
  89. package/build/types/saltGenerator.js +3 -0
  90. package/build/types/saltGenerator.js.map +1 -0
  91. package/build/types/signer.d.ts +2 -0
  92. package/build/types/signer.js +3 -0
  93. package/build/types/signer.js.map +1 -0
  94. package/build/types/utils.d.ts +5 -0
  95. package/build/types/utils.js +3 -0
  96. package/build/types/utils.js.map +1 -0
  97. package/build/types/verifier.d.ts +14 -0
  98. package/build/types/verifier.js +3 -0
  99. package/build/types/verifier.js.map +1 -0
  100. package/build/utils/index.d.ts +2 -0
  101. package/build/utils/index.js +19 -0
  102. package/build/utils/index.js.map +1 -0
  103. package/build/utils/traverse.d.ts +8 -0
  104. package/build/utils/traverse.js +29 -0
  105. package/build/utils/traverse.js.map +1 -0
  106. package/build/utils/utils.d.ts +7 -0
  107. package/build/utils/utils.js +109 -0
  108. package/build/utils/utils.js.map +1 -0
  109. package/package.json +50 -0
@@ -0,0 +1,3 @@
1
+ import { Disclosure } from './disclosures';
2
+ import { Hasher } from '../types';
3
+ export declare const swapClaims: (hasher: Hasher, payload: Record<string, unknown>, disclosures: Array<Disclosure>, newPayload?: Record<string, unknown>) => Promise<Record<string, unknown>>;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.swapClaims = void 0;
13
+ const shouldInsertDisclosure = (hasher, key, value, disclosures) => __awaiter(void 0, void 0, void 0, function* () {
14
+ if (key !== '_sd')
15
+ return [];
16
+ if (!Array.isArray(value))
17
+ return [];
18
+ const filteredDisclosures = [];
19
+ for (const d of disclosures) {
20
+ const digest = yield d.digest(hasher);
21
+ if (value.includes(digest)) {
22
+ filteredDisclosures.push(d);
23
+ }
24
+ }
25
+ return filteredDisclosures;
26
+ });
27
+ const shouldIncludeCleartextClaim = (key, value) => key !== '_sd' && key !== '_sd_alg' && typeof value !== 'object';
28
+ const swapClaims = (hasher, payload, disclosures, newPayload = {}) => __awaiter(void 0, void 0, void 0, function* () {
29
+ const entries = Object.entries(payload);
30
+ // Loop over de payload
31
+ for (let i = 0; i < entries.length; i++) {
32
+ const [key, value] = entries[i];
33
+ // See whether we have an `_sd` key with an array of disclosures.
34
+ const foundDisclosures = yield shouldInsertDisclosure(hasher, key, value, disclosures);
35
+ // Add the disclosed items to the pretty payload
36
+ foundDisclosures.forEach((d) => {
37
+ const [, disclosureKey, disclosureValue] = d.decoded;
38
+ newPayload[disclosureKey] = disclosureValue;
39
+ });
40
+ // Skip the rest as `_sd` is a special case
41
+ if (key === '_sd') {
42
+ continue;
43
+ }
44
+ // Include all the primitive claims into the new payload
45
+ if (shouldIncludeCleartextClaim(key, value)) {
46
+ newPayload[key] = value;
47
+ continue;
48
+ }
49
+ if (typeof value === 'object' && Array.isArray(value)) {
50
+ newPayload[key] = yield swapClaimsInsideArray(hasher, value, disclosures);
51
+ continue;
52
+ }
53
+ if (typeof value === 'object' &&
54
+ value !== null &&
55
+ !Array.isArray(value)) {
56
+ newPayload[key] = yield (0, exports.swapClaims)(hasher, value, disclosures);
57
+ }
58
+ }
59
+ return newPayload;
60
+ });
61
+ exports.swapClaims = swapClaims;
62
+ const swapClaimsInsideArray = (hasher, array, disclosures) => __awaiter(void 0, void 0, void 0, function* () {
63
+ const processedArray = [];
64
+ for (const el of array) {
65
+ if (typeof el === 'object' && el !== null && '...' in el) {
66
+ const hash = el['...'];
67
+ let disclosureFound = false;
68
+ let disclosureValue;
69
+ for (const d of disclosures) {
70
+ const digest = yield d.digest(hasher);
71
+ if (digest === hash && d.decoded[2] === undefined) {
72
+ disclosureValue = d.decoded[1];
73
+ disclosureFound = true;
74
+ break;
75
+ }
76
+ }
77
+ if (disclosureFound) {
78
+ processedArray.push(disclosureValue);
79
+ }
80
+ else {
81
+ processedArray.push(el);
82
+ }
83
+ }
84
+ else {
85
+ processedArray.push(el);
86
+ }
87
+ }
88
+ return processedArray;
89
+ });
90
+ //# sourceMappingURL=swapClaim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swapClaim.js","sourceRoot":"","sources":["../../src/sdJwt/swapClaim.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,MAAM,sBAAsB,GAAG,CAC3B,MAAc,EACd,GAAW,EACX,KAAc,EACd,WAA8B,EAChC,EAAE;IACA,IAAI,GAAG,KAAK,KAAK;QAAE,OAAO,EAAE,CAAA;IAC5B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IAEpC,MAAM,mBAAmB,GAAG,EAAE,CAAA;IAE9B,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAC/B,CAAC;IACL,CAAC;IAED,OAAO,mBAAmB,CAAA;AAC9B,CAAC,CAAA,CAAA;AAED,MAAM,2BAA2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,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC3B,CAAC;IACL,CAAC;IAED,OAAO,cAAc,CAAA;AACzB,CAAC,CAAA,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { MakePropertyRequired } from '../types';
2
+ import { SdJwt } from './sdJwt';
3
+ export type ReturnSdJwtWithHeaderAndPayload<H extends Record<string, unknown>, P extends Record<string, unknown>, T extends SdJwt<H, P>> = MakePropertyRequired<T, 'header' | 'payload'>;
4
+ export type ReturnSdJwtWithPayload<H extends Record<string, unknown>, P extends Record<string, unknown>, T extends SdJwt<H, P>> = MakePropertyRequired<T, 'payload'>;
5
+ export type ReturnSdJwtWithKeyBinding<H extends Record<string, unknown>, P extends Record<string, unknown>, T extends SdJwt<H, P>> = MakePropertyRequired<T, 'keyBinding'>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/sdJwt/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare class SdJwtVcError extends Error {
2
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SdJwtVcError = void 0;
4
+ class SdJwtVcError extends Error {
5
+ }
6
+ exports.SdJwtVcError = SdJwtVcError;
7
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/sdJwtVc/error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;CAAG;AAA1C,oCAA0C"}
@@ -0,0 +1,2 @@
1
+ export * from './sdJwtVc';
2
+ export * from './error';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./sdJwtVc"), exports);
18
+ __exportStar(require("./error"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdJwtVc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,0CAAuB"}
@@ -0,0 +1,47 @@
1
+ import { ReturnSdJwtWithHeaderAndPayload } from '../sdJwt';
2
+ import { SdJwt, SdJwtVerificationResult } from '../sdJwt';
3
+ import { Verifier } from '../types';
4
+ export type SdJwtVcVerificationResult = SdJwtVerificationResult & {
5
+ containsExpectedKeyBinding: boolean;
6
+ containsRequiredVcProperties: boolean;
7
+ };
8
+ export declare class SdJwtVc<Header extends Record<string, unknown> = Record<string, unknown>, Payload extends Record<string, unknown> = Record<string, unknown>> extends SdJwt<Header, Payload> {
9
+ assertNonSelectivelyDisclosableClaims(): void;
10
+ private validateSdJwtVc;
11
+ /**
12
+ *
13
+ * Instantiate a sd-jwt-vc from a compact format.
14
+ *
15
+ * @throws when the compact sd-jwt-vc is not a valid sd-jwt-vc
16
+ *
17
+ */
18
+ static fromCompact<Header extends Record<string, unknown> = Record<string, unknown>, Payload extends Record<string, unknown> = Record<string, unknown>>(compact: string): ReturnSdJwtWithHeaderAndPayload<Header, Payload, SdJwtVc<Header, Payload>>;
19
+ /**
20
+ *
21
+ * Verify the sd-jwt-vc.
22
+ *
23
+ * It validates the following properties:
24
+ * - sd-jwt issuer signature
25
+ * - Optionally, the required claims
26
+ * - The `nbf` and `exp` claims
27
+ * - Whether the key binding is valid
28
+ * - Whether the expected key binding is used
29
+ * - Whether the required sd-jwt-vc properties are included
30
+ *
31
+ */
32
+ verify(verifier: Verifier<Header>, requiredClaimKeys?: Array<keyof Payload | string>, expectedCnfClaim?: Record<string, unknown>): Promise<SdJwtVcVerificationResult>;
33
+ /**
34
+ *
35
+ * Create a compact format of the sd-jwt-vc.
36
+ *
37
+ * This will
38
+ * - Apply the disclosure frame
39
+ * - Add a signature if there is none
40
+ *
41
+ * @throws when the sd-jwt-vc is not conformant to the specification
42
+ * @throws When the signature and signer are not defined
43
+ * @throws When a claim is requested to be selectively disclosable, but it was not found in the payload
44
+ *
45
+ */
46
+ toCompact(): Promise<string>;
47
+ }
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SdJwtVc = void 0;
13
+ const sdJwt_1 = require("../sdJwt");
14
+ const sdJwt_2 = require("../sdJwt");
15
+ const jwt_1 = require("../jwt");
16
+ class SdJwtVc extends sdJwt_2.SdJwt {
17
+ assertNonSelectivelyDisclosableClaims() {
18
+ if (!this.disclosureFrame)
19
+ return;
20
+ ['iss', 'vct', 'iat', 'cnf'].forEach(this.assertNonSelectivelyDisclosableClaim);
21
+ }
22
+ validateSdJwtVc(expectedCnfClaim) {
23
+ try {
24
+ this.assertNonSelectivelyDisclosableClaims();
25
+ this.assertHeader();
26
+ this.assertPayload();
27
+ this.assertClaimInHeader('typ', 'vc+sd-jwt');
28
+ this.assertClaimInHeader('alg');
29
+ this.assertClaimInPayload('iss');
30
+ this.assertClaimInPayload('vct');
31
+ this.assertClaimInPayload('iat');
32
+ this.assertClaimInPayload('cnf', expectedCnfClaim);
33
+ }
34
+ catch (e) {
35
+ if (e instanceof Error) {
36
+ e.message = `jwt is not valid for usage with sd-jwt-vc. Error: ${e.message}`;
37
+ }
38
+ throw e;
39
+ }
40
+ }
41
+ /**
42
+ *
43
+ * Instantiate a sd-jwt-vc from a compact format.
44
+ *
45
+ * @throws when the compact sd-jwt-vc is not a valid sd-jwt-vc
46
+ *
47
+ */
48
+ static fromCompact(compact) {
49
+ const { disclosures, keyBinding, signature, payload, header } = (0, sdJwt_1.sdJwtFromCompact)(compact);
50
+ const sdJwtVc = new SdJwtVc({
51
+ header,
52
+ payload,
53
+ signature,
54
+ disclosures,
55
+ keyBinding
56
+ });
57
+ sdJwtVc.validateSdJwtVc();
58
+ return sdJwtVc;
59
+ }
60
+ /**
61
+ *
62
+ * Verify the sd-jwt-vc.
63
+ *
64
+ * It validates the following properties:
65
+ * - sd-jwt issuer signature
66
+ * - Optionally, the required claims
67
+ * - The `nbf` and `exp` claims
68
+ * - Whether the key binding is valid
69
+ * - Whether the expected key binding is used
70
+ * - Whether the required sd-jwt-vc properties are included
71
+ *
72
+ */
73
+ verify(verifier, requiredClaimKeys, expectedCnfClaim) {
74
+ const _super = Object.create(null, {
75
+ verify: { get: () => super.verify }
76
+ });
77
+ var _a, _b;
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ const publicKeyJwk = (_b = (_a = this.payload) === null || _a === void 0 ? void 0 : _a.cnf) === null || _b === void 0 ? void 0 : _b.jwk;
80
+ const sdJwtVerificationResult = (yield _super.verify.call(this, verifier, requiredClaimKeys, publicKeyJwk));
81
+ try {
82
+ sdJwtVerificationResult.containsRequiredVcProperties = true;
83
+ this.validateSdJwtVc(expectedCnfClaim);
84
+ if (expectedCnfClaim) {
85
+ sdJwtVerificationResult.containsExpectedKeyBinding = true;
86
+ }
87
+ }
88
+ catch (e) {
89
+ if (e instanceof jwt_1.JwtError &&
90
+ e.message ==
91
+ "jwt is not valid for usage with sd-jwt-vc. Error: Claim key 'cnf' was found, but values did not match within the payload") {
92
+ sdJwtVerificationResult.containsExpectedKeyBinding = false;
93
+ }
94
+ else {
95
+ sdJwtVerificationResult.containsRequiredVcProperties = false;
96
+ }
97
+ }
98
+ return sdJwtVerificationResult;
99
+ });
100
+ }
101
+ /**
102
+ *
103
+ * Create a compact format of the sd-jwt-vc.
104
+ *
105
+ * This will
106
+ * - Apply the disclosure frame
107
+ * - Add a signature if there is none
108
+ *
109
+ * @throws when the sd-jwt-vc is not conformant to the specification
110
+ * @throws When the signature and signer are not defined
111
+ * @throws When a claim is requested to be selectively disclosable, but it was not found in the payload
112
+ *
113
+ */
114
+ toCompact() {
115
+ const _super = Object.create(null, {
116
+ toCompact: { get: () => super.toCompact }
117
+ });
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ this.validateSdJwtVc();
120
+ return yield _super.toCompact.call(this);
121
+ });
122
+ }
123
+ }
124
+ exports.SdJwtVc = SdJwtVc;
125
+ //# sourceMappingURL=sdJwtVc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdJwtVc.js","sourceRoot":"","sources":["../../src/sdJwtVc/sdJwtVc.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAA4E;AAC5E,oCAAyD;AACzD,gCAAiC;AAQjC,MAAa,OAGX,SAAQ,aAAsB;IACrB,qCAAqC;QACxC,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE,OAC1B;QAAA,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,OA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B,MAAA,IAAI,CAAC,OAAO,0CAAE,GACjB,0CAAE,GAA0C,CAAA;YAE7C,MAAM,uBAAuB,GAAG,CAAC,MAAM,OAAM,MAAM,YAC/C,QAAQ,EACR,iBAAiB,EACjB,YAAY,CACf,CAA8B,CAAA;YAE/B,IAAI,CAAC;gBACD,uBAAuB,CAAC,4BAA4B,GAAG,IAAI,CAAA;gBAC3D,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAA;gBAEtC,IAAI,gBAAgB,EAAE,CAAC;oBACnB,uBAAuB,CAAC,0BAA0B,GAAG,IAAI,CAAA;gBAC7D,CAAC;YACL,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACT,IACI,CAAC,YAAY,cAAQ;oBACrB,CAAC,CAAC,OAAO;wBACL,0HAA0H,EAChI,CAAC;oBACC,uBAAuB,CAAC,0BAA0B,GAAG,KAAK,CAAA;gBAC9D,CAAC;qBAAM,CAAC;oBACJ,uBAAuB,CAAC,4BAA4B,GAAG,KAAK,CAAA;gBAChE,CAAC;YACL,CAAC;YAED,OAAO,uBAAuB,CAAA;;KACjC;IAED;;;;;;;;;;;;OAYG;IACY,SAAS;;;;;YACpB,IAAI,CAAC,eAAe,EAAE,CAAA;YACtB,OAAO,MAAM,OAAM,SAAS,WAAE,CAAA;QAClC,CAAC;KAAA;CACJ;AAnID,0BAmIC"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Enumeration representing various JSON Web Token (JWT) algorithms for digital signatures and encryption.
3
+ */
4
+ export declare enum SignatureAndEncryptionAlgorithm {
5
+ /**
6
+ * RSASSA-PKCS1-v1_5 using SHA-256
7
+ */
8
+ RS256 = "RS256",
9
+ /**
10
+ * RSASSA-PKCS1-v1_5 using SHA-384
11
+ */
12
+ RS384 = "RS384",
13
+ /**
14
+ * RSASSA-PKCS1-v1_5 using SHA-512
15
+ */
16
+ RS512 = "RS512",
17
+ /**
18
+ * ECDSA using P-256 and SHA-256
19
+ */
20
+ ES256 = "ES256",
21
+ /**
22
+ * ECDSA using P-384 and SHA-384
23
+ */
24
+ ES384 = "ES384",
25
+ /**
26
+ * ECDSA using P-521 and SHA-512
27
+ */
28
+ ES512 = "ES512",
29
+ /**
30
+ * RSA-PSS using SHA-256
31
+ */
32
+ PS256 = "PS256",
33
+ /**
34
+ * RSA-PSS using SHA-384
35
+ */
36
+ PS384 = "PS384",
37
+ /**
38
+ * RSA-PSS using SHA-512
39
+ */
40
+ PS512 = "PS512",
41
+ /**
42
+ * No digital signature or MAC performed
43
+ */
44
+ none = "none",
45
+ /**
46
+ * RSAES-PKCS1-v1_5
47
+ */
48
+ RSA1_5 = "RSA1_5",
49
+ /**
50
+ * RSAES OAEP
51
+ */
52
+ RSA_OAEP = "RSA-OAEP",
53
+ /**
54
+ * RSAES OAEP using SHA-256
55
+ */
56
+ RSA_OAEP_256 = "RSA-OAEP-256",
57
+ /**
58
+ * AES Key Wrap using 128-bit key
59
+ */
60
+ A128KW = "A128KW",
61
+ /**
62
+ * AES Key Wrap using 192-bit key
63
+ */
64
+ A192KW = "A192KW",
65
+ /**
66
+ * AES Key Wrap using 256-bit key
67
+ */
68
+ A256KW = "A256KW",
69
+ /**
70
+ * Direct use of a shared symmetric key
71
+ */
72
+ dir = "dir",
73
+ /**
74
+ * ECDH-ES using Concat KDF
75
+ */
76
+ ECDH_ES = "ECDH-ES",
77
+ /**
78
+ * EdDSA signature algorithms
79
+ */
80
+ EdDSA = "EdDSA",
81
+ /**
82
+ * ECDH-ES using Concat KDF and "A128KW" wrapping
83
+ */
84
+ ECDH_ES_A128KW = "ECDH-ES+A128KW",
85
+ /**
86
+ * ECDH-ES using Concat KDF and "A192KW" wrapping
87
+ */
88
+ ECDH_ES_A192KW = "ECDH-ES+A192KW",
89
+ /**
90
+ * ECDH-ES using Concat KDF and "A256KW" wrapping
91
+ */
92
+ ECDH_ES_A256KW = "ECDH-ES+A256KW",
93
+ /**
94
+ * Key wrapping with AES GCM using 128-bit key
95
+ */
96
+ A128GCMKW = "A128GCMKW",
97
+ /**
98
+ * Key wrapping with AES GCM using 192-bit key
99
+ */
100
+ A192GCMKW = "A192GCMKW",
101
+ /**
102
+ * Key wrapping with AES GCM using 256-bit key
103
+ */
104
+ A256GCMKW = "A256GCMKW"
105
+ }
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignatureAndEncryptionAlgorithm = void 0;
4
+ /**
5
+ * Enumeration representing various JSON Web Token (JWT) algorithms for digital signatures and encryption.
6
+ */
7
+ var SignatureAndEncryptionAlgorithm;
8
+ (function (SignatureAndEncryptionAlgorithm) {
9
+ /**
10
+ * RSASSA-PKCS1-v1_5 using SHA-256
11
+ */
12
+ SignatureAndEncryptionAlgorithm["RS256"] = "RS256";
13
+ /**
14
+ * RSASSA-PKCS1-v1_5 using SHA-384
15
+ */
16
+ SignatureAndEncryptionAlgorithm["RS384"] = "RS384";
17
+ /**
18
+ * RSASSA-PKCS1-v1_5 using SHA-512
19
+ */
20
+ SignatureAndEncryptionAlgorithm["RS512"] = "RS512";
21
+ /**
22
+ * ECDSA using P-256 and SHA-256
23
+ */
24
+ SignatureAndEncryptionAlgorithm["ES256"] = "ES256";
25
+ /**
26
+ * ECDSA using P-384 and SHA-384
27
+ */
28
+ SignatureAndEncryptionAlgorithm["ES384"] = "ES384";
29
+ /**
30
+ * ECDSA using P-521 and SHA-512
31
+ */
32
+ SignatureAndEncryptionAlgorithm["ES512"] = "ES512";
33
+ /**
34
+ * RSA-PSS using SHA-256
35
+ */
36
+ SignatureAndEncryptionAlgorithm["PS256"] = "PS256";
37
+ /**
38
+ * RSA-PSS using SHA-384
39
+ */
40
+ SignatureAndEncryptionAlgorithm["PS384"] = "PS384";
41
+ /**
42
+ * RSA-PSS using SHA-512
43
+ */
44
+ SignatureAndEncryptionAlgorithm["PS512"] = "PS512";
45
+ /**
46
+ * No digital signature or MAC performed
47
+ */
48
+ SignatureAndEncryptionAlgorithm["none"] = "none";
49
+ /**
50
+ * RSAES-PKCS1-v1_5
51
+ */
52
+ SignatureAndEncryptionAlgorithm["RSA1_5"] = "RSA1_5";
53
+ /**
54
+ * RSAES OAEP
55
+ */
56
+ SignatureAndEncryptionAlgorithm["RSA_OAEP"] = "RSA-OAEP";
57
+ /**
58
+ * RSAES OAEP using SHA-256
59
+ */
60
+ SignatureAndEncryptionAlgorithm["RSA_OAEP_256"] = "RSA-OAEP-256";
61
+ /**
62
+ * AES Key Wrap using 128-bit key
63
+ */
64
+ SignatureAndEncryptionAlgorithm["A128KW"] = "A128KW";
65
+ /**
66
+ * AES Key Wrap using 192-bit key
67
+ */
68
+ SignatureAndEncryptionAlgorithm["A192KW"] = "A192KW";
69
+ /**
70
+ * AES Key Wrap using 256-bit key
71
+ */
72
+ SignatureAndEncryptionAlgorithm["A256KW"] = "A256KW";
73
+ /**
74
+ * Direct use of a shared symmetric key
75
+ */
76
+ SignatureAndEncryptionAlgorithm["dir"] = "dir";
77
+ /**
78
+ * ECDH-ES using Concat KDF
79
+ */
80
+ SignatureAndEncryptionAlgorithm["ECDH_ES"] = "ECDH-ES";
81
+ /**
82
+ * EdDSA signature algorithms
83
+ */
84
+ SignatureAndEncryptionAlgorithm["EdDSA"] = "EdDSA";
85
+ /**
86
+ * ECDH-ES using Concat KDF and "A128KW" wrapping
87
+ */
88
+ SignatureAndEncryptionAlgorithm["ECDH_ES_A128KW"] = "ECDH-ES+A128KW";
89
+ /**
90
+ * ECDH-ES using Concat KDF and "A192KW" wrapping
91
+ */
92
+ SignatureAndEncryptionAlgorithm["ECDH_ES_A192KW"] = "ECDH-ES+A192KW";
93
+ /**
94
+ * ECDH-ES using Concat KDF and "A256KW" wrapping
95
+ */
96
+ SignatureAndEncryptionAlgorithm["ECDH_ES_A256KW"] = "ECDH-ES+A256KW";
97
+ /**
98
+ * Key wrapping with AES GCM using 128-bit key
99
+ */
100
+ SignatureAndEncryptionAlgorithm["A128GCMKW"] = "A128GCMKW";
101
+ /**
102
+ * Key wrapping with AES GCM using 192-bit key
103
+ */
104
+ SignatureAndEncryptionAlgorithm["A192GCMKW"] = "A192GCMKW";
105
+ /**
106
+ * Key wrapping with AES GCM using 256-bit key
107
+ */
108
+ SignatureAndEncryptionAlgorithm["A256GCMKW"] = "A256GCMKW";
109
+ })(SignatureAndEncryptionAlgorithm || (exports.SignatureAndEncryptionAlgorithm = SignatureAndEncryptionAlgorithm = {}));
110
+ //# sourceMappingURL=signatureAndEncryptionAlgorithm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signatureAndEncryptionAlgorithm.js","sourceRoot":"","sources":["../src/signatureAndEncryptionAlgorithm.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,+BA6HX;AA7HD,WAAY,+BAA+B;IACvC;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,gDAAa,CAAA;IAEb;;OAEG;IACH,oDAAiB,CAAA;IAEjB;;OAEG;IACH,wDAAqB,CAAA;IAErB;;OAEG;IACH,gEAA6B,CAAA;IAE7B;;OAEG;IACH,oDAAiB,CAAA;IAEjB;;OAEG;IACH,oDAAiB,CAAA;IAEjB;;OAEG;IACH,oDAAiB,CAAA;IAEjB;;OAEG;IACH,8CAAW,CAAA;IAEX;;OAEG;IACH,sDAAmB,CAAA;IAEnB;;OAEG;IACH,kDAAe,CAAA;IAEf;;OAEG;IACH,oEAAiC,CAAA;IAEjC;;OAEG;IACH,oEAAiC,CAAA;IAEjC;;OAEG;IACH,oEAAiC,CAAA;IAEjC;;OAEG;IACH,0DAAuB,CAAA;IAEvB;;OAEG;IACH,0DAAuB,CAAA;IAEvB;;OAEG;IACH,0DAAuB,CAAA;AAC3B,CAAC,EA7HW,+BAA+B,+CAA/B,+BAA+B,QA6H1C"}
@@ -0,0 +1,5 @@
1
+ import { BaseFrame } from './frame';
2
+ export type DisclosureItem = [string, string, unknown] | [string, unknown];
3
+ export type DisclosureFrame<T> = BaseFrame<T, {
4
+ __decoyCount?: number;
5
+ }>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=disclosure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.js","sourceRoot":"","sources":["../../src/types/disclosure.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export type BaseFrame<Payload, ExtraProperties> = Payload extends Array<unknown> ? {
2
+ [K in keyof Payload]?: Payload[K] extends Record<string | number, unknown> ? BaseFrame<Payload[K], ExtraProperties> | boolean : boolean;
3
+ } : Payload extends Record<string, unknown> ? {
4
+ [K in keyof Payload]?: Payload[K] extends Array<unknown> ? BaseFrame<Payload[K], ExtraProperties> | boolean : Payload[K] extends Record<string, unknown> ? (ExtraProperties & BaseFrame<Payload[K], ExtraProperties>) | boolean : boolean;
5
+ } & ExtraProperties & Record<string, unknown> : boolean;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.js","sourceRoot":"","sources":["../../src/types/frame.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { OrPromise } from './utils';
2
+ import { HasherAlgorithm } from '../hasherAlgorithm';
3
+ /**
4
+ * A simple hash function that takes the base64url encoded variant of the disclosure and returns the digest as a byte array
5
+ */
6
+ export type Hasher = (input: string) => OrPromise<Uint8Array>;
7
+ /**
8
+ * hasher: A simple hash function that takes the base64url encoded variant of the disclosure and returns the digest as a byte array
9
+ * algorithm: IANA defined string for the hashing algorithm used
10
+ */
11
+ export type HasherAndAlgorithm = {
12
+ hasher: Hasher;
13
+ algorithm: string | HasherAlgorithm;
14
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=hasher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasher.js","sourceRoot":"","sources":["../../src/types/hasher.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './utils';
2
+ export * from './hasher';
3
+ export * from './signer';
4
+ export * from './verifier';
5
+ export * from './disclosure';
6
+ export * from './saltGenerator';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./utils"), exports);
18
+ __exportStar(require("./hasher"), exports);
19
+ __exportStar(require("./signer"), exports);
20
+ __exportStar(require("./verifier"), exports);
21
+ __exportStar(require("./disclosure"), exports);
22
+ __exportStar(require("./saltGenerator"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,2CAAwB;AACxB,2CAAwB;AACxB,6CAA0B;AAC1B,+CAA4B;AAC5B,kDAA+B"}
@@ -0,0 +1,2 @@
1
+ import { BaseFrame } from './frame';
2
+ export type PresentationFrame<T> = BaseFrame<T, {}>;