@mattrglobal/verifier-sdk-web 1.1.1-unstable.16 → 1.1.1-unstable.160

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.
@@ -1,70 +1,37 @@
1
1
  import * as v from "valibot";
2
2
  import { BaseError } from "../../common";
3
- import { CrossDeviceCallbackError } from "../requestCredentialsCrossDevice";
4
- import { CredentialQuery, PresentationSessionResult } from "./credential-presentation";
3
+ import { CredentialQuery, Mode, PresentationSessionResult } from "./credential-presentation";
5
4
  export declare enum LocalStorageKey {
6
5
  challenge = "mattr_chg",
7
6
  sessionId = "mattr_sid"
8
7
  }
9
- /**
10
- * The mode in which the credentials are requested
11
- */
12
- export declare enum Mode {
13
- /**
14
- * The credentials are requested on the same device
15
- */
16
- sameDevice = "sameDevice",
17
- /**
18
- * The credentials are requested on a different device
19
- */
20
- crossDevice = "crossDevice"
21
- }
8
+ export declare const MATTR_SDK_VERSION_HEADER = "x-mattr-sdk-version";
9
+ export declare const MATTR_SDK_VERSION_VALUE = "2.0.0";
22
10
  export declare enum MessageEventDataType {
23
11
  PresentationCompleted = "PresentationCompleted",// { type: "PresentationCompleted", responseCode, sessionId }
24
12
  PresentationTimeout = "PresentationTimeout",// { type: "PresentationTimeout", sessionId }
25
13
  PresentationAbort = "PresentationAbort"
26
14
  }
27
15
  export type SameDeviceRequestCredentialsOptions = {
28
- credentialQuery: CredentialQuery[];
29
- redirectUri: string;
30
16
  challenge: string;
31
- mode: Mode.sameDevice;
32
- walletProviderId?: string;
33
- initialiseOptions: InitialiseOptions;
34
- };
35
- export type CrossDeviceCallbackOnCompleteResponse = {
36
- /**
37
- * Contains the result of the presentation session if result is configured to be available in the front channel
38
- */
39
- result: PresentationSessionResult | {
40
- sessionId: string;
41
- };
17
+ apiBaseUrl: string;
18
+ applicationId: string;
19
+ sessionUrl: string;
20
+ sessionKey: string;
42
21
  sessionId: string;
43
22
  };
44
- export type CrossDeviceCallback = {
45
- /**
46
- * The function to be executed on completion of the credential request.
47
- * @param result
48
- */
49
- onComplete: (result: CrossDeviceCallbackOnCompleteResponse) => void;
50
- /**
51
- * The function to be executed on failure of the credential request.
52
- * @param error
53
- */
54
- onFailure: (error: CrossDeviceCallbackError) => void;
55
- };
56
23
  export type CrossDeviceRequestCredentialsOptions = {
57
- credentialQuery: CredentialQuery[];
58
- crossDeviceCallback: CrossDeviceCallback;
59
24
  challenge: string;
60
- walletProviderId?: string;
61
- mode: Mode.crossDevice;
62
- initialiseOptions: InitialiseOptions;
25
+ apiBaseUrl: string;
26
+ sessionUrl: string;
27
+ sessionKey: string;
28
+ sessionId: string;
63
29
  };
64
30
  /**
65
- * Options for the same device requestCredentials function
31
+ * Options for requestCredentials function without openId4vp configuration.
32
+ * Can be used for requesting credential with Digital Credentials API or with openId4vp cross-device flow
66
33
  */
67
- export type RequestCredentialsSameDeviceOptions = {
34
+ export type RequestCredentialsBaseOptions = {
68
35
  /**
69
36
  * An array of CredentialQuery objects that specify the credentials to be requested.
70
37
  */
@@ -72,154 +39,83 @@ export type RequestCredentialsSameDeviceOptions = {
72
39
  /**
73
40
  * The URI to which the user will be redirected after the credential request is completed.
74
41
  */
75
- redirectUri: string;
76
- /**
77
- * An optional challenge string that is used to ensure the security and integrity of the credential request. If not provided, a challenge will be generated by default.
78
- */
79
42
  challenge?: string;
43
+ };
44
+ /**
45
+ * Options for openid4vpConfiguration to request credentials with same device
46
+ */
47
+ export type OpenId4vpConfigurationSameDeviceOptions = {
80
48
  /**
81
49
  * An optional identifier for wallet configuration. If not provided, the default wallet will be used.
82
50
  * This parameter is defined as part of your MATTR VII tenant verifier configuration
83
51
  */
84
52
  walletProviderId?: string;
85
53
  /**
86
- * An optional mode in which the credentials are requested. Set to Mode.sameDevice for this type.
54
+ * A mode in which the credentials are requested. Set to Mode.SameDevice for this type.
55
+ * Can be undefined
56
+ */
57
+ mode: Mode.SameDevice;
58
+ /**
59
+ * redirectUri is required if mode is same device or undefined
87
60
  */
88
- mode: Mode.sameDevice;
61
+ redirectUri: string;
89
62
  };
90
- export declare const RequestCredentialsSameDeviceOptionsValidator: v.ObjectSchema<{
91
- readonly credentialQuery: v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
92
- readonly profile: v.PicklistSchema<[import("./credential-presentation").OpenidPresentationCredentialProfileSupported], undefined>;
93
- readonly docType: v.StringSchema<undefined>;
94
- readonly nameSpaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
95
- readonly intentToRetain: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
96
- }, undefined>, undefined>, undefined>;
97
- }, undefined>, undefined>, v.NonEmptyAction<{
98
- profile: import("./credential-presentation").OpenidPresentationCredentialProfileSupported;
99
- nameSpaces: {
100
- [x: string]: {
101
- [x: string]: {
102
- intentToRetain?: boolean | undefined;
103
- };
104
- };
105
- };
106
- docType: string;
107
- }[], undefined>]>;
108
- readonly redirectUri: v.StringSchema<undefined>;
109
- readonly challenge: v.OptionalSchema<v.StringSchema<undefined>, never>;
63
+ export declare const OpenId4vpConfigSameDeviceOptionsValidator: v.ObjectSchema<{
110
64
  readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
111
- readonly mode: v.PicklistSchema<[Mode.sameDevice], undefined>;
65
+ readonly mode: v.LiteralSchema<Mode.SameDevice, undefined>;
66
+ readonly redirectUri: v.StringSchema<undefined>;
112
67
  }, undefined>;
113
68
  /**
114
- * Options for the cross device requestCredentials function
69
+ * Options for openid4vpConfiguration to request credentials with cross device
115
70
  */
116
- export type RequestCredentialsCrossDeviceDeviceOptions = {
117
- /**
118
- * An array of CredentialQuery objects that specify the credentials to be requested.
119
- */
120
- credentialQuery: CredentialQuery[];
121
- /**
122
- * The callback functions to be executed on success or failure of the credential request in cross device mode.
123
- */
124
- crossDeviceCallback: CrossDeviceCallback;
125
- /**
126
- * An optional challenge string that is used to ensure the security and integrity of the credential request. If not provided, a challenge will be generated by default.
127
- */
128
- challenge?: string;
71
+ export type OpenId4vpConfigurationCrossDeviceOptions = {
129
72
  /**
130
73
  * An optional identifier for wallet configuration. If not provided, the default wallet will be used.
131
74
  * This parameter is defined as part of your MATTR VII tenant verifier configuration
132
75
  */
133
76
  walletProviderId?: string;
134
77
  /**
135
- * An optional mode in which the credentials are requested. Set to Mode.crossDevice for this type.
78
+ * A mode in which the credentials are requested. Set to Mode.CrossDevice for this type.
136
79
  */
137
- mode: Mode.crossDevice;
80
+ mode: Mode.CrossDevice;
138
81
  };
139
- export declare const RequestCredentialsCrossDeviceOptionsValidator: v.ObjectSchema<{
140
- readonly credentialQuery: v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
141
- readonly profile: v.PicklistSchema<[import("./credential-presentation").OpenidPresentationCredentialProfileSupported], undefined>;
142
- readonly docType: v.StringSchema<undefined>;
143
- readonly nameSpaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
144
- readonly intentToRetain: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
145
- }, undefined>, undefined>, undefined>;
146
- }, undefined>, undefined>, v.NonEmptyAction<{
147
- profile: import("./credential-presentation").OpenidPresentationCredentialProfileSupported;
148
- nameSpaces: {
149
- [x: string]: {
150
- [x: string]: {
151
- intentToRetain?: boolean | undefined;
152
- };
153
- };
154
- };
155
- docType: string;
156
- }[], undefined>]>;
157
- readonly crossDeviceCallback: v.ObjectSchema<{
158
- readonly onComplete: v.FunctionSchema<undefined>;
159
- readonly onFailure: v.FunctionSchema<undefined>;
160
- }, undefined>;
161
- readonly challenge: v.OptionalSchema<v.StringSchema<undefined>, never>;
82
+ export declare const OpenId4vpConfigCrossDeviceOptionsValidator: v.ObjectSchema<{
162
83
  readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
163
- readonly mode: v.PicklistSchema<[Mode.crossDevice], undefined>;
84
+ readonly mode: v.LiteralSchema<Mode.CrossDevice, undefined>;
164
85
  }, undefined>;
165
86
  /**
166
- * Options for auto detect device requestCredentials function
87
+ * Options for openid4vpConfiguration which allow to auto-detect the device mode
167
88
  */
168
- export type RequestCredentialsAutoDetectOptions = {
169
- /**
170
- * An array of CredentialQuery objects that specify the credentials to be requested.
171
- */
172
- credentialQuery: CredentialQuery[];
173
- /**
174
- * The callback functions to be executed on success or failure of the credential request in cross device mode.
175
- */
176
- crossDeviceCallback: CrossDeviceCallback;
177
- /**
178
- * The URI to which the user will be redirected after the credential request is completed.
179
- */
180
- redirectUri: string;
181
- /**
182
- * An optional challenge string that is used to ensure the security and integrity of the credential request. If not provided, a challenge will be generated by default.
183
- */
184
- challenge?: string;
89
+ export type OpenId4vpConfigurationAutoDetectOptions = {
185
90
  /**
186
91
  * An optional identifier for wallet configuration. If not provided, the default wallet will be used.
187
92
  * This parameter is defined as part of your MATTR VII tenant verifier configuration
188
93
  */
189
94
  walletProviderId?: string;
95
+ /**
96
+ * redirect uri to use for same device mode
97
+ */
98
+ redirectUri: string;
190
99
  /**
191
100
  * An optional mode in which the credentials are requested. If not provided, the mode is determined based on the device (isMobileDetect(navigator.userAgent)).
192
101
  */
193
102
  mode?: Mode;
194
103
  };
195
- export declare const RequestCredentialsAutoDetectDeviceOptionsValidator: v.GenericSchema<RequestCredentialsAutoDetectOptions>;
104
+ export declare const OpenId4vpConfigAutoDetectOptionsValidator: v.ObjectSchema<{
105
+ readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
106
+ readonly redirectUri: v.StringSchema<undefined>;
107
+ readonly mode: v.OptionalSchema<v.PicklistSchema<[Mode.CrossDevice, Mode.SameDevice], undefined>, never>;
108
+ }, undefined>;
196
109
  /**
197
110
  * Options for the requestCredentials function
198
111
  */
199
- export type RequestCredentialsOptions = RequestCredentialsSameDeviceOptions | RequestCredentialsCrossDeviceDeviceOptions | RequestCredentialsAutoDetectOptions;
200
- export declare const RequestCredentialsOptionsValidator: v.UnionSchema<[v.ObjectSchema<{
201
- readonly credentialQuery: v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
202
- readonly profile: v.PicklistSchema<[import("./credential-presentation").OpenidPresentationCredentialProfileSupported], undefined>;
203
- readonly docType: v.StringSchema<undefined>;
204
- readonly nameSpaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
205
- readonly intentToRetain: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
206
- }, undefined>, undefined>, undefined>;
207
- }, undefined>, undefined>, v.NonEmptyAction<{
208
- profile: import("./credential-presentation").OpenidPresentationCredentialProfileSupported;
209
- nameSpaces: {
210
- [x: string]: {
211
- [x: string]: {
212
- intentToRetain?: boolean | undefined;
213
- };
214
- };
215
- };
216
- docType: string;
217
- }[], undefined>]>;
218
- readonly redirectUri: v.StringSchema<undefined>;
219
- readonly challenge: v.OptionalSchema<v.StringSchema<undefined>, never>;
220
- readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
221
- readonly mode: v.PicklistSchema<[Mode.sameDevice], undefined>;
222
- }, undefined>, v.ObjectSchema<{
112
+ export type RequestCredentialsOptions = RequestCredentialsBaseOptions & {
113
+ /**
114
+ * Optional configuration for openid4vp presentation flow
115
+ */
116
+ openid4vpConfiguration?: OpenId4vpConfigurationSameDeviceOptions | OpenId4vpConfigurationCrossDeviceOptions | OpenId4vpConfigurationAutoDetectOptions;
117
+ };
118
+ export declare const RequestCredentialsOptionsValidator: v.ObjectSchema<{
223
119
  readonly credentialQuery: v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
224
120
  readonly profile: v.PicklistSchema<[import("./credential-presentation").OpenidPresentationCredentialProfileSupported], undefined>;
225
121
  readonly docType: v.StringSchema<undefined>;
@@ -237,20 +133,20 @@ export declare const RequestCredentialsOptionsValidator: v.UnionSchema<[v.Object
237
133
  };
238
134
  docType: string;
239
135
  }[], undefined>]>;
240
- readonly crossDeviceCallback: v.ObjectSchema<{
241
- readonly onComplete: v.FunctionSchema<undefined>;
242
- readonly onFailure: v.FunctionSchema<undefined>;
243
- }, undefined>;
244
136
  readonly challenge: v.OptionalSchema<v.StringSchema<undefined>, never>;
245
- readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
246
- readonly mode: v.PicklistSchema<[Mode.crossDevice], undefined>;
247
- }, undefined>, v.GenericSchema<RequestCredentialsAutoDetectOptions, RequestCredentialsAutoDetectOptions, v.BaseIssue<unknown>>], undefined>;
248
- /**
249
- * The response from the same device requestCredentials function
250
- */
251
- export type SameDeviceRequestCredentialsResponse = {
252
- sessionId: string;
253
- };
137
+ readonly openid4vpConfiguration: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
138
+ readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
139
+ readonly mode: v.LiteralSchema<Mode.SameDevice, undefined>;
140
+ readonly redirectUri: v.StringSchema<undefined>;
141
+ }, undefined>, v.ObjectSchema<{
142
+ readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
143
+ readonly mode: v.LiteralSchema<Mode.CrossDevice, undefined>;
144
+ }, undefined>, v.ObjectSchema<{
145
+ readonly walletProviderId: v.OptionalSchema<v.StringSchema<undefined>, never>;
146
+ readonly redirectUri: v.StringSchema<undefined>;
147
+ readonly mode: v.OptionalSchema<v.PicklistSchema<[Mode.CrossDevice, Mode.SameDevice], undefined>, never>;
148
+ }, undefined>], undefined>, never>;
149
+ }, undefined>;
254
150
  export type MessageEvent = {
255
151
  data: {
256
152
  type: MessageEventDataType;
@@ -260,25 +156,58 @@ export type MessageEvent = {
260
156
  origin: string;
261
157
  };
262
158
  /**
263
- * The response from the cross device requestCredentials function
159
+ * The response from the requestCredentials function when credentials were requested with OpenId4vp
264
160
  */
265
- export type CrossDeviceRequestCredentialsResponse = {
161
+ export type RequestCredentialsResponse = {
162
+ /**
163
+ * Contains the result of the presentation session if result is configured to be available in the front channel
164
+ */
165
+ result?: PresentationSessionResult;
166
+ /**
167
+ * when frontChannelResultAvailable is set to true
168
+ */
266
169
  sessionId: string;
170
+ /**
171
+ * Indicates that session is completed and the flow will continue on the redirected page
172
+ */
173
+ sessionCompletedInRedirect?: boolean;
267
174
  };
268
- /**
269
- * The response from the requestCredentials function
270
- */
271
- export type RequestCredentialsResponse = SameDeviceRequestCredentialsResponse | CrossDeviceRequestCredentialsResponse;
272
175
  /**
273
176
  * The error type for the requestCredentials function
274
177
  */
275
178
  export declare enum RequestCredentialsErrorType {
276
- RequestCredentialsFailed = "RequestCredentialsFailed"
179
+ RequestCredentialsFailed = "RequestCredentialsFailed",
180
+ Timeout = "Timeout",
181
+ Abort = "Abort"
182
+ }
183
+ export declare enum RequestCredentialsErrorMessage {
184
+ FailedToGetSessionResult = "Failed to get session result",
185
+ FailedToGetSessionStatus = "Failed to get session status",
186
+ FailedToCreateSession = "Failed to create session",
187
+ FailedToVerifyCredentialResponse = "Failed to verify credential response",
188
+ MissingOpenId4vpConfig = "Identified openid4vp session, but missing openId4vpConfiguration on `requestCredentials`",
189
+ DcApiError = "Failed to request credentials with Digital Credentials API",
190
+ DcApiResponseParseError = "Failed to parse response from Digital Credentials API",
191
+ Abort = "User aborted the session",
192
+ Timeout = "User session timeout"
193
+ }
194
+ /**
195
+ * The error type for the `abortCredentialRequest` function
196
+ */
197
+ export declare enum AbortSessionErrorType {
198
+ AbortSessionFailed = "AbortSessionFailed"
199
+ }
200
+ export declare enum AbortSessionErrorMessage {
201
+ FailedToAbortSession = "Failed to abort session"
277
202
  }
278
203
  /**
279
204
  * The error response from the requestCredentials function
280
205
  */
281
206
  export type RequestCredentialsError = BaseError<RequestCredentialsErrorType>;
207
+ /**
208
+ * The error response from the requestCredentials function
209
+ */
210
+ export type AbortSessionError = BaseError<AbortSessionErrorType>;
282
211
  /**
283
212
  * The response from the handleRedirectCallback function
284
213
  */
@@ -286,19 +215,33 @@ export type HandleRedirectCallbackResponse = {
286
215
  /**
287
216
  * Contains the result of the presentation session if result is configured to be available in the front channel
288
217
  */
289
- result: PresentationSessionResult | {
290
- sessionId: string;
291
- };
218
+ result?: PresentationSessionResult;
292
219
  sessionId: string;
293
220
  };
294
221
  /**
295
- * Options for the initialise function
222
+ * Options for the initialize function
296
223
  */
297
- export type InitialiseOptions = {
224
+ export type InitializeOptions = {
298
225
  apiBaseUrl: string;
299
- applicationId?: string;
226
+ applicationId: string;
300
227
  };
301
- export declare const InitialiseOptionsValidator: v.ObjectSchema<{
302
- readonly apiBaseUrl: v.StringSchema<undefined>;
303
- readonly applicationId: v.OptionalSchema<v.StringSchema<undefined>, never>;
228
+ export declare const InitializeOptionsValidator: v.ObjectSchema<{
229
+ readonly apiBaseUrl: v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, "Must not be empty">]>;
230
+ readonly applicationId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, "Must not be empty">]>;
304
231
  }, undefined>;
232
+ /**
233
+ * Struct for a presentation session
234
+ */
235
+ export type CreatePresentationSession = {
236
+ readonly sessionId: string;
237
+ readonly sessionKey: string;
238
+ readonly sessionTimeoutId?: number;
239
+ };
240
+ /**
241
+ * Struct for a stored presentation session
242
+ */
243
+ export type StoredPresentationSession = {
244
+ readonly sessionId: string;
245
+ readonly sessionKey?: string;
246
+ readonly sessionTimeoutId?: number;
247
+ };
@@ -1,6 +1,6 @@
1
1
  import { Result } from "neverthrow";
2
- import { SafeFetchValidateRespondError } from "../common/safeFetch";
3
- import { CreateSessionRequest, CreateSessionResponse, ExchangeSessionResultResponse, InitialiseOptions } from "./types";
2
+ import { SafeFetchValidateResponseError } from "../common/safeFetch";
3
+ import { CreateSessionRequest, ExchangeSessionResultResponse, GetSessionStatusRequest, GetSessionStatusResponse, AbortSessionRequest, InitializeOptions, CreateSessionResponse } from "./types";
4
4
  /**
5
5
  * Generates a challenge string using the window.crypto API.
6
6
  *
@@ -22,11 +22,27 @@ export declare const getHashParamValue: (hash: string, param: string) => string
22
22
  * @param challenge - The challenge for the session.
23
23
  * @param redirectUri - The redirect URI for the session.
24
24
  * @param apiBaseUrl - The base URL of the API.
25
- * @param applicationId - optional, The ID of the verifier application, if not provided the default application ID will be used.
25
+ * @param applicationId - The ID of the verifier application.
26
26
  * @param walletProviderId - optional, The ID of the wallet provider, if not provided the default wallet provider will be used.
27
27
  * @returns A promise that resolves to a result containing either the created session response or an error.
28
28
  */
29
- export declare const createSession: ({ credentialQuery, challenge, redirectUri, apiBaseUrl, applicationId, walletProviderId, }: CreateSessionRequest & InitialiseOptions) => Promise<Result<CreateSessionResponse, SafeFetchValidateRespondError>>;
29
+ export declare const createSession: ({ credentialQuery, challenge, redirectUri, apiBaseUrl, walletProviderId, dcApiSupported, applicationId, }: CreateSessionRequest & InitializeOptions) => Promise<Result<CreateSessionResponse, SafeFetchValidateResponseError>>;
30
+ /**
31
+ * Abort a session with the provided parameters.
32
+ *
33
+ * @param sessionId - The unique identifier for the session.
34
+ * @param sessionKey - The authorization key for performing operations for the session.
35
+ * @returns A promise that resolves to a ok result when succeed or an error.
36
+ */
37
+ export declare const abortSession: ({ apiBaseUrl, sessionId, sessionKey, }: AbortSessionRequest) => Promise<Result<void, SafeFetchValidateResponseError>>;
38
+ /**
39
+ * Retrieve the status for a session with the provided parameters.
40
+ *
41
+ * @param sessionId - The unique identifier for the session.
42
+ * @param sessionKey - The authorization key for performing operations for the session.
43
+ * @returns A promise that resolves to a result containing either the session status response or an error.
44
+ */
45
+ export declare const getSessionStatus: ({ apiBaseUrl, sessionId, sessionKey, }: GetSessionStatusRequest & InitializeOptions) => Promise<Result<GetSessionStatusResponse, SafeFetchValidateResponseError>>;
30
46
  /**
31
47
  * Exchange the result of a session using the provided parameters.
32
48
  *
@@ -41,7 +57,7 @@ export declare const exchangeSessionResult: ({ challenge, responseCode, sessionI
41
57
  responseCode: string;
42
58
  sessionId: string;
43
59
  apiBaseUrl: string;
44
- }) => Promise<Result<ExchangeSessionResultResponse, SafeFetchValidateRespondError>>;
60
+ }) => Promise<Result<ExchangeSessionResultResponse, SafeFetchValidateResponseError>>;
45
61
  /**
46
62
  * Detects if the user agent is a mobile device.
47
63
  *
@@ -49,3 +65,7 @@ export declare const exchangeSessionResult: ({ challenge, responseCode, sessionI
49
65
  * @returns A boolean indicating whether the user agent is a mobile device.
50
66
  */
51
67
  export declare const isMobileDetect: (userAgent: string) => boolean;
68
+ /**
69
+ * Returns the value that is being set in the x-mattr-sdk-version header
70
+ */
71
+ export declare const getVersion: () => string;