@mattrglobal/verifier-sdk-web 1.1.1-unstable.160 → 1.1.1-unstable.161
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/lib/verifier-js-no-deps.cjs.js +2 -22
- package/dist/lib/verifier-js-no-deps.cjs.js.map +1 -1
- package/dist/lib/verifier-js.cjs.js +2 -22
- package/dist/lib/verifier-js.cjs.js.map +1 -1
- package/dist/typings/verifier/types/credential-presentation.d.ts +0 -27
- package/dist/verifier-js.development.js +2 -19
- package/dist/verifier-js.development.js.map +1 -1
- package/dist/verifier-js.production.esm.js +1 -1
- package/dist/verifier-js.production.esm.js.map +1 -1
- package/dist/verifier-js.production.js +1 -1
- package/dist/verifier-js.production.js.map +1 -1
- package/package.json +2 -2
|
@@ -283,33 +283,6 @@ export type PresentationHiddenResult = {
|
|
|
283
283
|
sessionId: string;
|
|
284
284
|
};
|
|
285
285
|
export type PresentationSessionResult = PresentationSuccessResult | PresentationFailureResult;
|
|
286
|
-
export declare const PresentationSessionResultValidator: v.UnionSchema<[v.ObjectSchema<{
|
|
287
|
-
readonly sessionId: v.StringSchema<undefined>;
|
|
288
|
-
readonly challenge: v.StringSchema<undefined>;
|
|
289
|
-
readonly credentialQuery: v.ArraySchema<v.ObjectSchema<{
|
|
290
|
-
readonly profile: v.PicklistSchema<[OpenidPresentationCredentialProfileSupported], undefined>;
|
|
291
|
-
readonly docType: v.StringSchema<undefined>;
|
|
292
|
-
readonly nameSpaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
293
|
-
readonly intentToRetain: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
294
|
-
}, undefined>, undefined>, undefined>;
|
|
295
|
-
}, undefined>, undefined>;
|
|
296
|
-
readonly credentials: v.OptionalSchema<v.ArraySchema<v.AnySchema, undefined>, never>;
|
|
297
|
-
readonly credentialErrors: v.OptionalSchema<v.ArraySchema<v.AnySchema, undefined>, never>;
|
|
298
|
-
}, undefined>, v.ObjectSchema<{
|
|
299
|
-
readonly sessionId: v.StringSchema<undefined>;
|
|
300
|
-
readonly challenge: v.StringSchema<undefined>;
|
|
301
|
-
readonly credentialQuery: v.ArraySchema<v.ObjectSchema<{
|
|
302
|
-
readonly profile: v.PicklistSchema<[OpenidPresentationCredentialProfileSupported], undefined>;
|
|
303
|
-
readonly docType: v.StringSchema<undefined>;
|
|
304
|
-
readonly nameSpaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
305
|
-
readonly intentToRetain: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
306
|
-
}, undefined>, undefined>, undefined>;
|
|
307
|
-
}, undefined>, undefined>;
|
|
308
|
-
readonly error: v.ObjectSchema<{
|
|
309
|
-
readonly type: v.PicklistSchema<PresentationErrorType[], undefined>;
|
|
310
|
-
readonly message: v.StringSchema<undefined>;
|
|
311
|
-
}, undefined>;
|
|
312
|
-
}, undefined>], undefined>;
|
|
313
286
|
export type ExchangeSessionResultParams = {
|
|
314
287
|
readonly sessionId: string;
|
|
315
288
|
};
|
|
@@ -1324,13 +1324,6 @@
|
|
|
1324
1324
|
PresentationErrorType["WalletUnavailable"] = "WalletUnavailable";
|
|
1325
1325
|
PresentationErrorType["Unknown"] = "Unknown";
|
|
1326
1326
|
})(PresentationErrorType || (PresentationErrorType = {}));
|
|
1327
|
-
const PresentationSuccessResultValidator = object({
|
|
1328
|
-
sessionId: string(),
|
|
1329
|
-
challenge: string(),
|
|
1330
|
-
credentialQuery: array(CredentialQueryValidator),
|
|
1331
|
-
credentials: optional(array(any())),
|
|
1332
|
-
credentialErrors: optional(array(any()))
|
|
1333
|
-
});
|
|
1334
1327
|
const PresentationResultRelaxValidator = object({
|
|
1335
1328
|
sessionId: string(),
|
|
1336
1329
|
challenge: optional(string()),
|
|
@@ -1339,16 +1332,6 @@
|
|
|
1339
1332
|
credentialErrors: optional(unknown()),
|
|
1340
1333
|
error: optional(unknown())
|
|
1341
1334
|
});
|
|
1342
|
-
const PresentationFailureResultValidator = object({
|
|
1343
|
-
sessionId: string(),
|
|
1344
|
-
challenge: string(),
|
|
1345
|
-
credentialQuery: array(CredentialQueryValidator),
|
|
1346
|
-
error: object({
|
|
1347
|
-
type: picklist(Object.values(PresentationErrorType)),
|
|
1348
|
-
message: string()
|
|
1349
|
-
})
|
|
1350
|
-
});
|
|
1351
|
-
const PresentationSessionResultValidator = union([ PresentationSuccessResultValidator, PresentationFailureResultValidator ]);
|
|
1352
1335
|
exports.Mode = void 0;
|
|
1353
1336
|
(function(Mode) {
|
|
1354
1337
|
Mode["SameDevice"] = "sameDevice";
|
|
@@ -1731,7 +1714,7 @@
|
|
|
1731
1714
|
return;
|
|
1732
1715
|
}
|
|
1733
1716
|
onComplete({
|
|
1734
|
-
result:
|
|
1717
|
+
result: "challenge" in result.value ? result.value : undefined,
|
|
1735
1718
|
sessionId: result.value.sessionId,
|
|
1736
1719
|
sessionCompletedInRedirect: false
|
|
1737
1720
|
});
|
|
@@ -1870,7 +1853,7 @@
|
|
|
1870
1853
|
}
|
|
1871
1854
|
const verificationResult = credentialVerificationResult.value;
|
|
1872
1855
|
return ok({
|
|
1873
|
-
result:
|
|
1856
|
+
result: "challenge" in verificationResult ? verificationResult : undefined,
|
|
1874
1857
|
sessionId: sessionId
|
|
1875
1858
|
});
|
|
1876
1859
|
};
|