@mattrglobal/verifier-sdk-web 2.0.0-preview-digital-credential-api.2 → 2.0.0-preview-digital-credential-api.3
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/README.md +6 -4
- package/dist/lib/verifier-js-no-deps.cjs.js +11 -8
- package/dist/lib/verifier-js-no-deps.cjs.js.map +1 -1
- package/dist/lib/verifier-js.cjs.js +11 -8
- package/dist/lib/verifier-js.cjs.js.map +1 -1
- package/dist/typings/verifier/types/verifier-web-sdk.d.ts +1 -0
- package/dist/typings/verifier/utils.d.ts +2 -1
- package/dist/verifier-js.development.js +11 -8
- package/dist/verifier-js.development.js.map +1 -1
- package/dist/verifier-js.production.esm.js +4 -4
- package/dist/verifier-js.production.esm.js.map +1 -1
- package/dist/verifier-js.production.js +4 -4
- package/dist/verifier-js.production.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2025 - MATTR Limited
|
|
3
3
|
* All rights reserved
|
|
4
4
|
* Confidential and proprietary
|
|
5
5
|
*
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Do Not Translate or Localize
|
|
8
8
|
*
|
|
9
9
|
* Bundle of @mattrglobal/verifier-sdk-web
|
|
10
|
-
* Generated:
|
|
11
|
-
* Version: 2.0.0-preview-digital-credential-api.
|
|
10
|
+
* Generated: 2025-02-18
|
|
11
|
+
* Version: 2.0.0-preview-digital-credential-api.3
|
|
12
12
|
* Dependencies:
|
|
13
13
|
*
|
|
14
14
|
* neverthrow -- 4.3.0
|
|
@@ -1643,11 +1643,13 @@ const isDigitalCredentialsApiSupported = () => {
|
|
|
1643
1643
|
}
|
|
1644
1644
|
};
|
|
1645
1645
|
|
|
1646
|
-
const createDigitalCredentialsApiSession = async ({credentialQuery: credentialQuery, challenge: challenge, apiBaseUrl: apiBaseUrl}) => {
|
|
1647
|
-
const postData = {
|
|
1646
|
+
const createDigitalCredentialsApiSession = async ({credentialQuery: credentialQuery, challenge: challenge, apiBaseUrl: apiBaseUrl, protocol: protocol}) => {
|
|
1647
|
+
const postData = Object.assign({
|
|
1648
1648
|
credentialQuery: credentialQuery,
|
|
1649
1649
|
challenge: challenge
|
|
1650
|
-
}
|
|
1650
|
+
}, protocol && {
|
|
1651
|
+
protocol: protocol
|
|
1652
|
+
});
|
|
1651
1653
|
const responseResult = await safeFetch(`${apiBaseUrl}/v2/presentations/sessions/browserApi/request`, {
|
|
1652
1654
|
method: "POST",
|
|
1653
1655
|
headers: {
|
|
@@ -1882,7 +1884,7 @@ var SameDeviceRequestCredentialsErrorMessage;
|
|
|
1882
1884
|
|
|
1883
1885
|
const requestCredentialsDigitalCredentialsApi = async options => {
|
|
1884
1886
|
const {challenge: challenge, credentialQuery: credentialQuery, initialiseOptions: initialiseOptions} = options;
|
|
1885
|
-
const {apiBaseUrl: apiBaseUrl} = initialiseOptions;
|
|
1887
|
+
const {apiBaseUrl: apiBaseUrl, digitalCredentialsApiProtocol: digitalCredentialsApiProtocol} = initialiseOptions;
|
|
1886
1888
|
window.localStorage.setItem(LocalStorageKey.challenge, challenge);
|
|
1887
1889
|
const storedChallenge = window.localStorage.getItem(LocalStorageKey.challenge);
|
|
1888
1890
|
if (!storedChallenge) {
|
|
@@ -1894,7 +1896,8 @@ const requestCredentialsDigitalCredentialsApi = async options => {
|
|
|
1894
1896
|
const createSessionResult = await createDigitalCredentialsApiSession({
|
|
1895
1897
|
credentialQuery: credentialQuery,
|
|
1896
1898
|
challenge: storedChallenge,
|
|
1897
|
-
apiBaseUrl: apiBaseUrl
|
|
1899
|
+
apiBaseUrl: apiBaseUrl,
|
|
1900
|
+
protocol: digitalCredentialsApiProtocol
|
|
1898
1901
|
});
|
|
1899
1902
|
if (createSessionResult.isErr()) {
|
|
1900
1903
|
return err({
|