@sphereon/ssi-sdk.oid4vci-holder 0.34.1-fix.103 → 0.34.1-fix.109
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/dist/index.cjs +33 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +34 -28
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/agent/OID4VCIHolder.ts +9 -2
- package/src/types/FirstPartyMachine.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -156,18 +156,18 @@ var import_i18n_js = __toESM(require("i18n-js"), 1);
|
|
|
156
156
|
var import_lodash = __toESM(require("lodash.memoize"), 1);
|
|
157
157
|
|
|
158
158
|
// src/types/IOID4VCIHolder.ts
|
|
159
|
-
var OID4VCIHolderEvent = /* @__PURE__ */ function(OID4VCIHolderEvent2) {
|
|
159
|
+
var OID4VCIHolderEvent = /* @__PURE__ */ (function(OID4VCIHolderEvent2) {
|
|
160
160
|
OID4VCIHolderEvent2["CONTACT_IDENTITY_CREATED"] = "contact_identity_created";
|
|
161
161
|
OID4VCIHolderEvent2["CREDENTIAL_STORED"] = "credential_stored";
|
|
162
162
|
OID4VCIHolderEvent2["IDENTIFIER_CREATED"] = "identifier_created";
|
|
163
163
|
return OID4VCIHolderEvent2;
|
|
164
|
-
}({});
|
|
165
|
-
var SupportedLanguage = /* @__PURE__ */ function(SupportedLanguage2) {
|
|
164
|
+
})({});
|
|
165
|
+
var SupportedLanguage = /* @__PURE__ */ (function(SupportedLanguage2) {
|
|
166
166
|
SupportedLanguage2["ENGLISH"] = "en";
|
|
167
167
|
SupportedLanguage2["DUTCH"] = "nl";
|
|
168
168
|
return SupportedLanguage2;
|
|
169
|
-
}({});
|
|
170
|
-
var OID4VCIMachineStates = /* @__PURE__ */ function(OID4VCIMachineStates2) {
|
|
169
|
+
})({});
|
|
170
|
+
var OID4VCIMachineStates = /* @__PURE__ */ (function(OID4VCIMachineStates2) {
|
|
171
171
|
OID4VCIMachineStates2["start"] = "start";
|
|
172
172
|
OID4VCIMachineStates2["createCredentialsToSelectFrom"] = "createCredentialsToSelectFrom";
|
|
173
173
|
OID4VCIMachineStates2["getContact"] = "getContact";
|
|
@@ -198,18 +198,18 @@ var OID4VCIMachineStates = /* @__PURE__ */ function(OID4VCIMachineStates2) {
|
|
|
198
198
|
OID4VCIMachineStates2["error"] = "error";
|
|
199
199
|
OID4VCIMachineStates2["done"] = "done";
|
|
200
200
|
return OID4VCIMachineStates2;
|
|
201
|
-
}({});
|
|
202
|
-
var OID4VCIMachineAddContactStates = /* @__PURE__ */ function(OID4VCIMachineAddContactStates2) {
|
|
201
|
+
})({});
|
|
202
|
+
var OID4VCIMachineAddContactStates = /* @__PURE__ */ (function(OID4VCIMachineAddContactStates2) {
|
|
203
203
|
OID4VCIMachineAddContactStates2["idle"] = "idle";
|
|
204
204
|
OID4VCIMachineAddContactStates2["next"] = "next";
|
|
205
205
|
return OID4VCIMachineAddContactStates2;
|
|
206
|
-
}({});
|
|
207
|
-
var OID4VCIMachineVerifyPinStates = /* @__PURE__ */ function(OID4VCIMachineVerifyPinStates2) {
|
|
206
|
+
})({});
|
|
207
|
+
var OID4VCIMachineVerifyPinStates = /* @__PURE__ */ (function(OID4VCIMachineVerifyPinStates2) {
|
|
208
208
|
OID4VCIMachineVerifyPinStates2["idle"] = "idle";
|
|
209
209
|
OID4VCIMachineVerifyPinStates2["next"] = "next";
|
|
210
210
|
return OID4VCIMachineVerifyPinStates2;
|
|
211
|
-
}({});
|
|
212
|
-
var OID4VCIMachineEvents = /* @__PURE__ */ function(OID4VCIMachineEvents2) {
|
|
211
|
+
})({});
|
|
212
|
+
var OID4VCIMachineEvents = /* @__PURE__ */ (function(OID4VCIMachineEvents2) {
|
|
213
213
|
OID4VCIMachineEvents2["NEXT"] = "NEXT";
|
|
214
214
|
OID4VCIMachineEvents2["PREVIOUS"] = "PREVIOUS";
|
|
215
215
|
OID4VCIMachineEvents2["DECLINE"] = "DECLINE";
|
|
@@ -222,8 +222,8 @@ var OID4VCIMachineEvents = /* @__PURE__ */ function(OID4VCIMachineEvents2) {
|
|
|
222
222
|
OID4VCIMachineEvents2["INVOKED_AUTHORIZATION_CODE_REQUEST"] = "INVOKED_AUTHORIZATION_CODE_REQUEST";
|
|
223
223
|
OID4VCIMachineEvents2["PROVIDE_AUTHORIZATION_CODE_RESPONSE"] = "PROVIDE_AUTHORIZATION_CODE_RESPONSE";
|
|
224
224
|
return OID4VCIMachineEvents2;
|
|
225
|
-
}({});
|
|
226
|
-
var OID4VCIMachineGuards = /* @__PURE__ */ function(OID4VCIMachineGuards2) {
|
|
225
|
+
})({});
|
|
226
|
+
var OID4VCIMachineGuards = /* @__PURE__ */ (function(OID4VCIMachineGuards2) {
|
|
227
227
|
OID4VCIMachineGuards2["hasContactGuard"] = "oid4vciHasContactGuard";
|
|
228
228
|
OID4VCIMachineGuards2["hasNoContactGuard"] = "oid4vciHasNoContactGuard";
|
|
229
229
|
OID4VCIMachineGuards2["credentialsToSelectRequiredGuard"] = "oid4vciCredentialsToSelectRequiredGuard";
|
|
@@ -240,8 +240,8 @@ var OID4VCIMachineGuards = /* @__PURE__ */ function(OID4VCIMachineGuards2) {
|
|
|
240
240
|
OID4VCIMachineGuards2["contactHasLowTrustGuard"] = "oid4vciContactHasLowTrustGuard";
|
|
241
241
|
OID4VCIMachineGuards2["isFirstPartyApplication"] = "oid4vciIsFirstPartyApplication";
|
|
242
242
|
return OID4VCIMachineGuards2;
|
|
243
|
-
}({});
|
|
244
|
-
var OID4VCIMachineServices = /* @__PURE__ */ function(OID4VCIMachineServices2) {
|
|
243
|
+
})({});
|
|
244
|
+
var OID4VCIMachineServices = /* @__PURE__ */ (function(OID4VCIMachineServices2) {
|
|
245
245
|
OID4VCIMachineServices2["start"] = "start";
|
|
246
246
|
OID4VCIMachineServices2["getContact"] = "getContact";
|
|
247
247
|
OID4VCIMachineServices2["getFederationTrust"] = "getFederationTrust";
|
|
@@ -256,17 +256,17 @@ var OID4VCIMachineServices = /* @__PURE__ */ function(OID4VCIMachineServices2) {
|
|
|
256
256
|
OID4VCIMachineServices2["storeCredentials"] = "storeCredentials";
|
|
257
257
|
OID4VCIMachineServices2["startFirstPartApplicationFlow"] = "startFirstPartApplicationFlow";
|
|
258
258
|
return OID4VCIMachineServices2;
|
|
259
|
-
}({});
|
|
260
|
-
var RequestType = /* @__PURE__ */ function(RequestType2) {
|
|
259
|
+
})({});
|
|
260
|
+
var RequestType = /* @__PURE__ */ (function(RequestType2) {
|
|
261
261
|
RequestType2["OPENID_INITIATE_ISSUANCE"] = "openid-initiate-issuance";
|
|
262
262
|
RequestType2["OPENID_CREDENTIAL_OFFER"] = "openid-credential-offer";
|
|
263
263
|
RequestType2["URL"] = "URL";
|
|
264
264
|
return RequestType2;
|
|
265
|
-
}({});
|
|
266
|
-
var IdentifierAliasEnum = /* @__PURE__ */ function(IdentifierAliasEnum2) {
|
|
265
|
+
})({});
|
|
266
|
+
var IdentifierAliasEnum = /* @__PURE__ */ (function(IdentifierAliasEnum2) {
|
|
267
267
|
IdentifierAliasEnum2["PRIMARY"] = "primary";
|
|
268
268
|
return IdentifierAliasEnum2;
|
|
269
|
-
}({});
|
|
269
|
+
})({});
|
|
270
270
|
|
|
271
271
|
// src/localization/Localization.ts
|
|
272
272
|
var Localization = class Localization2 {
|
|
@@ -308,7 +308,7 @@ var Localization = class Localization2 {
|
|
|
308
308
|
var translate = Localization.translate;
|
|
309
309
|
|
|
310
310
|
// src/types/FirstPartyMachine.ts
|
|
311
|
-
var FirstPartyMachineStateTypes = /* @__PURE__ */ function(FirstPartyMachineStateTypes2) {
|
|
311
|
+
var FirstPartyMachineStateTypes = /* @__PURE__ */ (function(FirstPartyMachineStateTypes2) {
|
|
312
312
|
FirstPartyMachineStateTypes2["sendAuthorizationChallengeRequest"] = "sendAuthorizationChallengeRequest";
|
|
313
313
|
FirstPartyMachineStateTypes2["sendAuthorizationResponse"] = "sendAuthorizationResponse";
|
|
314
314
|
FirstPartyMachineStateTypes2["selectCredentials"] = "selectCredentials";
|
|
@@ -319,21 +319,21 @@ var FirstPartyMachineStateTypes = /* @__PURE__ */ function(FirstPartyMachineStat
|
|
|
319
319
|
FirstPartyMachineStateTypes2["aborted"] = "aborted";
|
|
320
320
|
FirstPartyMachineStateTypes2["declined"] = "declined";
|
|
321
321
|
return FirstPartyMachineStateTypes2;
|
|
322
|
-
}({});
|
|
323
|
-
var FirstPartyMachineServices = /* @__PURE__ */ function(FirstPartyMachineServices2) {
|
|
322
|
+
})({});
|
|
323
|
+
var FirstPartyMachineServices = /* @__PURE__ */ (function(FirstPartyMachineServices2) {
|
|
324
324
|
FirstPartyMachineServices2["sendAuthorizationChallengeRequest"] = "sendAuthorizationChallengeRequest";
|
|
325
325
|
FirstPartyMachineServices2["sendAuthorizationResponse"] = "sendAuthorizationResponse";
|
|
326
326
|
FirstPartyMachineServices2["createConfig"] = "createConfig";
|
|
327
327
|
FirstPartyMachineServices2["getSiopRequest"] = "getSiopRequest";
|
|
328
328
|
return FirstPartyMachineServices2;
|
|
329
|
-
}({});
|
|
330
|
-
var FirstPartyMachineEvents = /* @__PURE__ */ function(FirstPartyMachineEvents2) {
|
|
329
|
+
})({});
|
|
330
|
+
var FirstPartyMachineEvents = /* @__PURE__ */ (function(FirstPartyMachineEvents2) {
|
|
331
331
|
FirstPartyMachineEvents2["NEXT"] = "NEXT";
|
|
332
332
|
FirstPartyMachineEvents2["PREVIOUS"] = "PREVIOUS";
|
|
333
333
|
FirstPartyMachineEvents2["DECLINE"] = "DECLINE";
|
|
334
334
|
FirstPartyMachineEvents2["SET_SELECTED_CREDENTIALS"] = "SET_SELECTED_CREDENTIALS";
|
|
335
335
|
return FirstPartyMachineEvents2;
|
|
336
|
-
}({});
|
|
336
|
+
})({});
|
|
337
337
|
|
|
338
338
|
// src/machines/oid4vciMachine.ts
|
|
339
339
|
var oid4vciHasNoContactGuard = /* @__PURE__ */ __name((_ctx, _event) => {
|
|
@@ -2404,7 +2404,13 @@ var OID4VCIHolder = class _OID4VCIHolder {
|
|
|
2404
2404
|
}
|
|
2405
2405
|
}
|
|
2406
2406
|
if (offer) {
|
|
2407
|
-
|
|
2407
|
+
const credentialsSupported2 = offer.original_credential_offer.credential_configuration_ids.flatMap((configId) => {
|
|
2408
|
+
const config = oid4vciClient.endpointMetadata.credentialIssuerMetadata?.credential_configurations_supported[configId];
|
|
2409
|
+
return config ? [
|
|
2410
|
+
config
|
|
2411
|
+
] : [];
|
|
2412
|
+
});
|
|
2413
|
+
types = credentialsSupported2.map((credentialSupported) => (0, import_oid4vci_common4.getTypesFromCredentialSupported)(credentialSupported));
|
|
2408
2414
|
} else {
|
|
2409
2415
|
types = (0, import_utils2.asArray)(authorizationRequestOpts.authorizationDetails).map((authReqOpts) => (0, import_oid4vci_common4.getTypesFromAuthorizationDetails)(authReqOpts) ?? []).filter((inner) => inner.length > 0);
|
|
2410
2416
|
}
|