@mattrglobal/verifier-sdk-web 2.2.1-unstable.4 → 2.2.1-unstable.41
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 +21 -22
- package/dist/lib/verifier-js-no-deps.cjs.js +2 -2
- package/dist/lib/verifier-js-no-deps.cjs.js.map +1 -1
- package/dist/lib/verifier-js.cjs.js +2 -2
- package/dist/lib/verifier-js.cjs.js.map +1 -1
- package/dist/verifier-js.development.js +2 -2
- package/dist/verifier-js.development.js.map +1 -1
- package/dist/verifier-js.production.esm.js +2 -2
- package/dist/verifier-js.production.esm.js.map +1 -1
- package/dist/verifier-js.production.js +2 -2
- package/dist/verifier-js.production.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,12 +39,10 @@ Request or download the
|
|
|
39
39
|
## Overview
|
|
40
40
|
|
|
41
41
|
The Verifier Web SDK is a powerful tool for integrating online credential verification capabilities into your web
|
|
42
|
-
applications. It enables secure and efficient verification of [mDocs](https://learn.mattr.global/docs/mdocs),
|
|
43
|
-
both [same-device](https://learn.mattr.global/docs/verification/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
verification workflows. The SDK leverages the MATTR VII platform to handle credential presentation and verification
|
|
47
|
-
processes.
|
|
42
|
+
applications. It enables secure and efficient verification of [mDocs](https://learn.mattr.global/docs/concepts/mdocs),
|
|
43
|
+
supporting both [same-device](https://learn.mattr.global/docs/verification/remote-overview#verification-flows) and
|
|
44
|
+
[cross-device](https://learn.mattr.global/docs/verification/remote-overview#verification-flows) verification workflows.
|
|
45
|
+
The SDK leverages the MATTR VII platform to handle credential presentation and verification processes.
|
|
48
46
|
|
|
49
47
|
## Features
|
|
50
48
|
|
|
@@ -60,8 +58,8 @@ processes.
|
|
|
60
58
|
|
|
61
59
|
## How to get access to the MATTR Pi Verifier Web SDK
|
|
62
60
|
|
|
63
|
-
Refer to our [SDK Docs landing page](https://learn.mattr.global/
|
|
64
|
-
gain access to any of our SDKs.
|
|
61
|
+
Refer to our [SDK Docs landing page](https://learn.mattr.global/docs/resources/get-started) for step-by-step
|
|
62
|
+
instructions to gain access to any of our SDKs.
|
|
65
63
|
|
|
66
64
|
> Please [reach out](mailto:dev-support@mattr.global) if you need any assistance.
|
|
67
65
|
|
|
@@ -126,9 +124,9 @@ MATTRVerifierSDK.initialize({ apiBaseUrl, applicationId });
|
|
|
126
124
|
|
|
127
125
|
- `apiBaseUrl` (required): URL of the MATTR VII verifier tenant.
|
|
128
126
|
- `applicationId` (required): Unique identifier of the verifier application. This must match the
|
|
129
|
-
[`id`](https://learn.mattr.global/api-reference/
|
|
130
|
-
|
|
131
|
-
[creating a Verifier application](https://learn.mattr.global/api-reference/
|
|
127
|
+
[`id`](https://learn.mattr.global/docs/api-reference/platform/verifier-applications/postVerifierApplication) parameter
|
|
128
|
+
in the response returned when
|
|
129
|
+
[creating a Verifier application](https://learn.mattr.global/docs/api-reference/platform/verifier-applications/postVerifierApplication)
|
|
132
130
|
on the MATTR VII verifier tenant.
|
|
133
131
|
|
|
134
132
|
## Prepare a credential query
|
|
@@ -227,13 +225,13 @@ This behavior can be explicitly overridden by specifying the desired mode in the
|
|
|
227
225
|
|
|
228
226
|
You can define an identifier of a specific wallet you want to invoke with this verification request. The identifier
|
|
229
227
|
defined by the SDK in the credential request must match one of the identifiers of a
|
|
230
|
-
[wallet provider](https://learn.mattr.global/api-reference/
|
|
231
|
-
|
|
228
|
+
[wallet provider](https://learn.mattr.global/docs/api-reference/platform/wallet-providers/postWalletProvider) created on
|
|
229
|
+
the MATTR VII verifier tenant.
|
|
232
230
|
|
|
233
231
|
- If an identifier is provided and matches the `id` of one of the objects in the `walletProviders` array, the verifier
|
|
234
232
|
tenant will invoke that specific wallet using its corresponding
|
|
235
|
-
[`authorizationEndpoint`](https://learn.mattr.global/api-reference/
|
|
236
|
-
- If an identifier is provided and does not match the `id` of any of the objects in the `walletProviders array
|
|
233
|
+
[`authorizationEndpoint`](https://learn.mattr.global/docs/api-reference/platform/wallet-providers/postWalletProvider).
|
|
234
|
+
- If an identifier is provided and does not match the `id` of any of the objects in the `walletProviders` array, the
|
|
237
235
|
request will fail.
|
|
238
236
|
- If an identifier is not provided, the verifier tenant will use `mdoc-openid4vp://` (default OID4VP scheme) to invoke
|
|
239
237
|
any wallet.
|
|
@@ -243,7 +241,7 @@ created on the MATTR VII verifier tenant.
|
|
|
243
241
|
When using the same-device presentation flow, the SDK must define what URI to redirect the user to once they complete
|
|
244
242
|
the verification workflow in their wallet app. This can be any URI (including custom URI schemes), and must match one of
|
|
245
243
|
the values defined in the
|
|
246
|
-
[`redirectUris` array](https://learn.mattr.global/api-reference/
|
|
244
|
+
[`redirectUris` array](https://learn.mattr.global/docs/api-reference/platform/verifier-applications/postVerifierApplication)
|
|
247
245
|
when creating a verifier application.
|
|
248
246
|
|
|
249
247
|
## Correlate sessions with your own records using `state`
|
|
@@ -405,15 +403,16 @@ if (result.isErr()) {
|
|
|
405
403
|
}
|
|
406
404
|
```
|
|
407
405
|
|
|
408
|
-
- `apiBaseUrl
|
|
409
|
-
your MATTR VII verifier
|
|
406
|
+
- `apiBaseUrl`: Replace with the
|
|
407
|
+
[`tenant_url`](https://learn.mattr.global/docs/platform-management/management-api/overview) of your MATTR VII verifier
|
|
408
|
+
tenant.
|
|
410
409
|
- `credentialQuery`: The credential query to be used in the request.
|
|
411
410
|
- `challenge`: The challenge that will be passed to the MATTR VII tenant with the request to create a presentation
|
|
412
411
|
session. This example uses the SDK built-in method to generate the challenge, but you can replace it with a challenge
|
|
413
412
|
generated by your backend system.
|
|
414
413
|
- `walletProviderId`: Replace with a wallet identifier that matches one of the identifiers of a
|
|
415
|
-
[wallet provider](https://learn.mattr.global/api-reference/
|
|
416
|
-
|
|
414
|
+
[wallet provider](https://learn.mattr.global/docs/api-reference/platform/wallet-providers/postWalletProvider) created
|
|
415
|
+
on the MATTR VII verifier tenant.
|
|
417
416
|
- `state` (optional): Your own opaque correlation reference for this presentation session. Do not include personally
|
|
418
417
|
identifiable information (PII), credentials, or anything sensitive, as the value is transmitted in plain text on the
|
|
419
418
|
wallet-facing request URI and stored in session records. Returned in the response from `requestCredentials()`
|
|
@@ -421,8 +420,8 @@ if (result.isErr()) {
|
|
|
421
420
|
[Correlate sessions with your own records using state](#correlate-sessions-with-your-own-records-using-state).
|
|
422
421
|
- `mode`: When omitted, the SDK defaults to automatically selecting a flow based on the browser's user agent (set to
|
|
423
422
|
`undefined` in the example for clarity).
|
|
424
|
-
- `redirectUri
|
|
425
|
-
[`redirectUris` array](https://learn.mattr.global/api-reference/
|
|
423
|
+
- `redirectUri`: Replace with a URI that matches one of the values in the
|
|
424
|
+
[`redirectUris` array](https://learn.mattr.global/docs/api-reference/platform/verifier-applications/postVerifierApplication)
|
|
426
425
|
in the MATTR VII tenant's verifier application.
|
|
427
426
|
|
|
428
427
|
## Request credentials with explicit same-device flow
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Do Not Translate or Localize
|
|
8
8
|
*
|
|
9
9
|
* Bundle of @mattrglobal/verifier-sdk-web
|
|
10
|
-
* Generated: 2026-
|
|
10
|
+
* Generated: 2026-07-07
|
|
11
11
|
* Version: 2.2.0
|
|
12
12
|
* Dependencies:
|
|
13
13
|
*/
|
|
@@ -579,7 +579,7 @@ const exchangeSessionResult = async ({challenge: challenge, responseCode: respon
|
|
|
579
579
|
body: JSON.stringify(postData)
|
|
580
580
|
});
|
|
581
581
|
const responseResult = await withRetrySafeFetch(fetchResultFn, {
|
|
582
|
-
retries:
|
|
582
|
+
retries: 4,
|
|
583
583
|
retryHttpStatus: 404
|
|
584
584
|
});
|
|
585
585
|
if (responseResult.isErr()) {
|