@imtbl/sdk 1.7.1 → 1.7.2

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 CHANGED
@@ -142,7 +142,7 @@ const storeDetail$1 = (key, value) => {
142
142
  };
143
143
  setItem$1(Store$1.RUNTIME, RUNTIME_DETAILS$1);
144
144
  };
145
- const getDetail$1 = (key) => {
145
+ const getDetail$1$1 = (key) => {
146
146
  // Handle the scenario where detail is a falsy value
147
147
  if (RUNTIME_DETAILS$1[key] === undefined) {
148
148
  return undefined;
@@ -174,7 +174,7 @@ const flattenProperties$1 = (properties) => {
174
174
  };
175
175
 
176
176
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
177
- const SDK_VERSION$1 = '1.7.1';
177
+ const SDK_VERSION$1 = '1.7.2';
178
178
  const getReferrer$1 = () => {
179
179
  if (isNode$1()) {
180
180
  return '';
@@ -217,7 +217,7 @@ const initialise$2 = async () => {
217
217
  initialised$1 = true;
218
218
  try {
219
219
  const runtimeDetails = flattenProperties$1(getRuntimeDetails$1());
220
- const existingRuntimeId = getDetail$1(Detail$1.RUNTIME_ID);
220
+ const existingRuntimeId = getDetail$1$1(Detail$1.RUNTIME_ID);
221
221
  const body = {
222
222
  version: 1,
223
223
  data: {
@@ -370,6 +370,7 @@ const setPublishableApiKeyFn$1 = (publishableApiKey) => {
370
370
  storeDetail$1(Detail$1.PUBLISHABLE_API_KEY, publishableApiKey);
371
371
  };
372
372
  const setPublishableApiKey = errorBoundary$1(getGlobalisedValue$2('setPublishableApiKey', setPublishableApiKeyFn$1));
373
+ const getDetail = errorBoundary$1(getGlobalisedValue$2('getDetail', getDetail$1$1));
373
374
 
374
375
  var Environment$1;
375
376
  (function (Environment) {
@@ -11297,7 +11298,7 @@ class MultiRollupApiClients {
11297
11298
  }
11298
11299
 
11299
11300
  // eslint-disable-next-line @typescript-eslint/naming-convention
11300
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.7.1' };
11301
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.7.2' };
11301
11302
  const createConfig = ({ basePath, headers, }) => {
11302
11303
  if (!basePath.trim()) {
11303
11304
  throw Error('basePath can not be empty');
@@ -11369,7 +11370,7 @@ class APIError extends Error {
11369
11370
 
11370
11371
  /* eslint-disable implicit-arrow-linebreak */
11371
11372
  const defaultHeaders = {
11372
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.7.1',
11373
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.7.2',
11373
11374
  };
11374
11375
  /**
11375
11376
  * createAPIConfiguration to create a custom Configuration
@@ -11802,7 +11803,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
11802
11803
  chainID,
11803
11804
  coreContractAddress,
11804
11805
  registrationContractAddress,
11805
- sdkVersion: 'ts-immutable-sdk-1.7.1',
11806
+ sdkVersion: 'ts-immutable-sdk-1.7.2',
11806
11807
  });
11807
11808
  /**
11808
11809
  * Sets `sdkVersion` at the time of build
@@ -16536,10 +16537,20 @@ class AuthManager {
16536
16537
  },
16537
16538
  });
16538
16539
  };
16539
- async login() {
16540
+ /**
16541
+ * login
16542
+ * @param anonymousId Caller can pass an anonymousId if they want to associate their user's identity with immutable's internal instrumentation.
16543
+ */
16544
+ async login(anonymousId) {
16540
16545
  return withPassportError(async () => {
16546
+ const rid = getDetail(Detail$1.RUNTIME_ID);
16541
16547
  const popupWindowFeatures = { width: 410, height: 450 };
16542
16548
  const oidcUser = await this.userManager.signinPopup({
16549
+ extraQueryParams: {
16550
+ ...(this.userManager.settings?.extraQueryParams ?? {}),
16551
+ rid: rid || '',
16552
+ third_party_a_id: anonymousId || '',
16553
+ },
16543
16554
  popupWindowFeatures,
16544
16555
  });
16545
16556
  return AuthManager.mapOidcUserToDomainModel(oidcUser);
@@ -16559,17 +16570,22 @@ class AuthManager {
16559
16570
  async loginCallback() {
16560
16571
  return withPassportError(async () => this.userManager.signinPopupCallback(), PassportErrorType.AUTHENTICATION_ERROR);
16561
16572
  }
16562
- async loginWithDeviceFlow() {
16573
+ /**
16574
+ * loginWithDeviceFlow
16575
+ * @param anonymousId Caller can pass an anonymousId if they want to associate their user's identity with immutable's internal instrumentation.
16576
+ */
16577
+ async loginWithDeviceFlow(anonymousId) {
16563
16578
  return withPassportError(async () => {
16564
16579
  const response = await globalAxios$1.post(`${this.config.authenticationDomain}/oauth/device/code`, {
16565
16580
  client_id: this.config.oidcConfiguration.clientId,
16566
16581
  scope: this.config.oidcConfiguration.scope,
16567
16582
  audience: this.config.oidcConfiguration.audience,
16568
16583
  }, formUrlEncodedHeader);
16584
+ const rid = getDetail(Detail$1.RUNTIME_ID);
16569
16585
  return {
16570
16586
  code: response.data.user_code,
16571
16587
  deviceCode: response.data.device_code,
16572
- url: response.data.verification_uri_complete,
16588
+ url: `${response.data.verification_uri_complete}${rid ? `&rid=${rid}` : ''}${anonymousId ? `&third_party_a_id=${anonymousId}` : ''}`,
16573
16589
  interval: response.data.interval,
16574
16590
  };
16575
16591
  }, PassportErrorType.AUTHENTICATION_ERROR);
@@ -37406,7 +37422,7 @@ const storeDetail = (key, value) => {
37406
37422
  };
37407
37423
  setItem(Store.RUNTIME, RUNTIME_DETAILS);
37408
37424
  };
37409
- const getDetail = (key) => {
37425
+ const getDetail$1 = (key) => {
37410
37426
  // Handle the scenario where detail is a falsy value
37411
37427
  if (RUNTIME_DETAILS[key] === undefined) {
37412
37428
  return undefined;
@@ -37438,7 +37454,7 @@ const flattenProperties = (properties) => {
37438
37454
  };
37439
37455
 
37440
37456
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
37441
- const SDK_VERSION = '1.7.1';
37457
+ const SDK_VERSION = '1.7.2';
37442
37458
  const getReferrer = () => {
37443
37459
  if (isNode()) {
37444
37460
  return '';
@@ -37481,7 +37497,7 @@ const initialise = async () => {
37481
37497
  initialised = true;
37482
37498
  try {
37483
37499
  const runtimeDetails = flattenProperties(getRuntimeDetails());
37484
- const existingRuntimeId = getDetail(Detail.RUNTIME_ID);
37500
+ const existingRuntimeId = getDetail$1(Detail.RUNTIME_ID);
37485
37501
  const body = {
37486
37502
  version: 1,
37487
37503
  data: {
@@ -37613,6 +37629,7 @@ const setPublishableApiKeyFn = (publishableApiKey) => {
37613
37629
  storeDetail(Detail.PUBLISHABLE_API_KEY, publishableApiKey);
37614
37630
  };
37615
37631
  errorBoundary(getGlobalisedValue('setPublishableApiKey', setPublishableApiKeyFn));
37632
+ errorBoundary(getGlobalisedValue('getDetail', getDetail$1));
37616
37633
 
37617
37634
  var Environment;
37618
37635
  (function (Environment) {
@@ -42605,7 +42622,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
42605
42622
  maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
42606
42623
  };
42607
42624
 
42608
- const SDK_VERSION_MARKER = '1.7.1';
42625
+ const SDK_VERSION_MARKER = '1.7.2';
42609
42626
  // This SDK version is replaced by the `yarn build` command ran on the root level
42610
42627
  const globalPackageVersion = () => SDK_VERSION_MARKER;
42611
42628
 
package/dist/index.d.ts CHANGED
@@ -30822,6 +30822,7 @@ interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverri
30822
30822
  /**
30823
30823
  * A type representing various remotely defined configurations which are
30824
30824
  * accessible via the Checkout config and configured based on the Environment.
30825
+ * @property {ConnectConfig} connect
30825
30826
  * @property {DexConfig} dex
30826
30827
  * @property {OnRampConfig} onramp
30827
30828
  * @property {BridgeConfig} bridge
@@ -30831,6 +30832,8 @@ interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverri
30831
30832
  * @property {TelemetryConfig | undefined} telemetry
30832
30833
  */
30833
30834
  type RemoteConfiguration = {
30835
+ /** The config used for the Connect. */
30836
+ connect: ConnectConfig;
30834
30837
  /** The config used for the DEX. */
30835
30838
  dex: DexConfig;
30836
30839
  /** The config used for the OnRamp */
@@ -30882,6 +30885,14 @@ type OnRampConfig = {
30882
30885
  /** OnRamp config for Transak provider */
30883
30886
  [key: string]: OnRampProviderConfig;
30884
30887
  };
30888
+ /**
30889
+ * A type representing the configuration for the Connect.
30890
+ * @property {boolean} walletConnect
30891
+ */
30892
+ type ConnectConfig = {
30893
+ /** A boolean value for enabling/disabling WalletConnect */
30894
+ walletConnect: boolean;
30895
+ };
30885
30896
  /**
30886
30897
  * A type representing the configuration for the DEX.
30887
30898
  * @property {ExchangeOverrides | undefined} overrides
package/dist/index.js CHANGED
@@ -120,7 +120,7 @@ const storeDetail$1 = (key, value) => {
120
120
  };
121
121
  setItem$1(Store$1.RUNTIME, RUNTIME_DETAILS$1);
122
122
  };
123
- const getDetail$1 = (key) => {
123
+ const getDetail$1$1 = (key) => {
124
124
  // Handle the scenario where detail is a falsy value
125
125
  if (RUNTIME_DETAILS$1[key] === undefined) {
126
126
  return undefined;
@@ -152,7 +152,7 @@ const flattenProperties$1 = (properties) => {
152
152
  };
153
153
 
154
154
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
155
- const SDK_VERSION$1 = '1.7.1';
155
+ const SDK_VERSION$1 = '1.7.2';
156
156
  const getReferrer$1 = () => {
157
157
  if (isNode$1()) {
158
158
  return '';
@@ -195,7 +195,7 @@ const initialise$2 = async () => {
195
195
  initialised$1 = true;
196
196
  try {
197
197
  const runtimeDetails = flattenProperties$1(getRuntimeDetails$1());
198
- const existingRuntimeId = getDetail$1(Detail$1.RUNTIME_ID);
198
+ const existingRuntimeId = getDetail$1$1(Detail$1.RUNTIME_ID);
199
199
  const body = {
200
200
  version: 1,
201
201
  data: {
@@ -348,6 +348,7 @@ const setPublishableApiKeyFn$1 = (publishableApiKey) => {
348
348
  storeDetail$1(Detail$1.PUBLISHABLE_API_KEY, publishableApiKey);
349
349
  };
350
350
  const setPublishableApiKey = errorBoundary$1(getGlobalisedValue$2('setPublishableApiKey', setPublishableApiKeyFn$1));
351
+ const getDetail = errorBoundary$1(getGlobalisedValue$2('getDetail', getDetail$1$1));
351
352
 
352
353
  var Environment$1;
353
354
  (function (Environment) {
@@ -11275,7 +11276,7 @@ class MultiRollupApiClients {
11275
11276
  }
11276
11277
 
11277
11278
  // eslint-disable-next-line @typescript-eslint/naming-convention
11278
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.7.1' };
11279
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.7.2' };
11279
11280
  const createConfig = ({ basePath, headers, }) => {
11280
11281
  if (!basePath.trim()) {
11281
11282
  throw Error('basePath can not be empty');
@@ -11347,7 +11348,7 @@ class APIError extends Error {
11347
11348
 
11348
11349
  /* eslint-disable implicit-arrow-linebreak */
11349
11350
  const defaultHeaders = {
11350
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.7.1',
11351
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.7.2',
11351
11352
  };
11352
11353
  /**
11353
11354
  * createAPIConfiguration to create a custom Configuration
@@ -11780,7 +11781,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
11780
11781
  chainID,
11781
11782
  coreContractAddress,
11782
11783
  registrationContractAddress,
11783
- sdkVersion: 'ts-immutable-sdk-1.7.1',
11784
+ sdkVersion: 'ts-immutable-sdk-1.7.2',
11784
11785
  });
11785
11786
  /**
11786
11787
  * Sets `sdkVersion` at the time of build
@@ -16514,10 +16515,20 @@ class AuthManager {
16514
16515
  },
16515
16516
  });
16516
16517
  };
16517
- async login() {
16518
+ /**
16519
+ * login
16520
+ * @param anonymousId Caller can pass an anonymousId if they want to associate their user's identity with immutable's internal instrumentation.
16521
+ */
16522
+ async login(anonymousId) {
16518
16523
  return withPassportError(async () => {
16524
+ const rid = getDetail(Detail$1.RUNTIME_ID);
16519
16525
  const popupWindowFeatures = { width: 410, height: 450 };
16520
16526
  const oidcUser = await this.userManager.signinPopup({
16527
+ extraQueryParams: {
16528
+ ...(this.userManager.settings?.extraQueryParams ?? {}),
16529
+ rid: rid || '',
16530
+ third_party_a_id: anonymousId || '',
16531
+ },
16521
16532
  popupWindowFeatures,
16522
16533
  });
16523
16534
  return AuthManager.mapOidcUserToDomainModel(oidcUser);
@@ -16537,17 +16548,22 @@ class AuthManager {
16537
16548
  async loginCallback() {
16538
16549
  return withPassportError(async () => this.userManager.signinPopupCallback(), PassportErrorType.AUTHENTICATION_ERROR);
16539
16550
  }
16540
- async loginWithDeviceFlow() {
16551
+ /**
16552
+ * loginWithDeviceFlow
16553
+ * @param anonymousId Caller can pass an anonymousId if they want to associate their user's identity with immutable's internal instrumentation.
16554
+ */
16555
+ async loginWithDeviceFlow(anonymousId) {
16541
16556
  return withPassportError(async () => {
16542
16557
  const response = await globalAxios$1.post(`${this.config.authenticationDomain}/oauth/device/code`, {
16543
16558
  client_id: this.config.oidcConfiguration.clientId,
16544
16559
  scope: this.config.oidcConfiguration.scope,
16545
16560
  audience: this.config.oidcConfiguration.audience,
16546
16561
  }, formUrlEncodedHeader);
16562
+ const rid = getDetail(Detail$1.RUNTIME_ID);
16547
16563
  return {
16548
16564
  code: response.data.user_code,
16549
16565
  deviceCode: response.data.device_code,
16550
- url: response.data.verification_uri_complete,
16566
+ url: `${response.data.verification_uri_complete}${rid ? `&rid=${rid}` : ''}${anonymousId ? `&third_party_a_id=${anonymousId}` : ''}`,
16551
16567
  interval: response.data.interval,
16552
16568
  };
16553
16569
  }, PassportErrorType.AUTHENTICATION_ERROR);
@@ -37384,7 +37400,7 @@ const storeDetail = (key, value) => {
37384
37400
  };
37385
37401
  setItem(Store.RUNTIME, RUNTIME_DETAILS);
37386
37402
  };
37387
- const getDetail = (key) => {
37403
+ const getDetail$1 = (key) => {
37388
37404
  // Handle the scenario where detail is a falsy value
37389
37405
  if (RUNTIME_DETAILS[key] === undefined) {
37390
37406
  return undefined;
@@ -37416,7 +37432,7 @@ const flattenProperties = (properties) => {
37416
37432
  };
37417
37433
 
37418
37434
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
37419
- const SDK_VERSION = '1.7.1';
37435
+ const SDK_VERSION = '1.7.2';
37420
37436
  const getReferrer = () => {
37421
37437
  if (isNode()) {
37422
37438
  return '';
@@ -37459,7 +37475,7 @@ const initialise = async () => {
37459
37475
  initialised = true;
37460
37476
  try {
37461
37477
  const runtimeDetails = flattenProperties(getRuntimeDetails());
37462
- const existingRuntimeId = getDetail(Detail.RUNTIME_ID);
37478
+ const existingRuntimeId = getDetail$1(Detail.RUNTIME_ID);
37463
37479
  const body = {
37464
37480
  version: 1,
37465
37481
  data: {
@@ -37591,6 +37607,7 @@ const setPublishableApiKeyFn = (publishableApiKey) => {
37591
37607
  storeDetail(Detail.PUBLISHABLE_API_KEY, publishableApiKey);
37592
37608
  };
37593
37609
  errorBoundary(getGlobalisedValue('setPublishableApiKey', setPublishableApiKeyFn));
37610
+ errorBoundary(getGlobalisedValue('getDetail', getDetail$1));
37594
37611
 
37595
37612
  var Environment;
37596
37613
  (function (Environment) {
@@ -42583,7 +42600,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
42583
42600
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
42584
42601
  };
42585
42602
 
42586
- const SDK_VERSION_MARKER = '1.7.1';
42603
+ const SDK_VERSION_MARKER = '1.7.2';
42587
42604
  // This SDK version is replaced by the `yarn build` command ran on the root level
42588
42605
  const globalPackageVersion = () => SDK_VERSION_MARKER;
42589
42606
 
package/dist/orderbook.js CHANGED
@@ -99,7 +99,7 @@ const storeDetail = (key, value) => {
99
99
  };
100
100
  setItem(Store.RUNTIME, RUNTIME_DETAILS);
101
101
  };
102
- const getDetail = (key) => {
102
+ const getDetail$1 = (key) => {
103
103
  // Handle the scenario where detail is a falsy value
104
104
  if (RUNTIME_DETAILS[key] === undefined) {
105
105
  return undefined;
@@ -131,7 +131,7 @@ const flattenProperties = (properties) => {
131
131
  };
132
132
 
133
133
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
134
- const SDK_VERSION = '1.7.1';
134
+ const SDK_VERSION = '1.7.2';
135
135
  const getReferrer = () => {
136
136
  if (isNode()) {
137
137
  return '';
@@ -174,7 +174,7 @@ const initialise = async () => {
174
174
  initialised = true;
175
175
  try {
176
176
  const runtimeDetails = flattenProperties(getRuntimeDetails());
177
- const existingRuntimeId = getDetail(Detail.RUNTIME_ID);
177
+ const existingRuntimeId = getDetail$1(Detail.RUNTIME_ID);
178
178
  const body = {
179
179
  version: 1,
180
180
  data: {
@@ -306,6 +306,7 @@ const setPublishableApiKeyFn = (publishableApiKey) => {
306
306
  storeDetail(Detail.PUBLISHABLE_API_KEY, publishableApiKey);
307
307
  };
308
308
  errorBoundary(getGlobalisedValue('setPublishableApiKey', setPublishableApiKeyFn));
309
+ errorBoundary(getGlobalisedValue('getDetail', getDetail$1));
309
310
 
310
311
  var Environment;
311
312
  (function (Environment) {
package/dist/passport.js CHANGED
@@ -9146,7 +9146,7 @@ class MultiRollupApiClients {
9146
9146
  }
9147
9147
 
9148
9148
  // eslint-disable-next-line @typescript-eslint/naming-convention
9149
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.7.1' };
9149
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.7.2' };
9150
9150
  const createConfig = ({ basePath, headers, }) => {
9151
9151
  if (!basePath.trim()) {
9152
9152
  throw Error('basePath can not be empty');
@@ -9293,7 +9293,7 @@ const storeDetail = (key, value) => {
9293
9293
  };
9294
9294
  setItem(Store.RUNTIME, RUNTIME_DETAILS);
9295
9295
  };
9296
- const getDetail = (key) => {
9296
+ const getDetail$1 = (key) => {
9297
9297
  // Handle the scenario where detail is a falsy value
9298
9298
  if (RUNTIME_DETAILS[key] === undefined) {
9299
9299
  return undefined;
@@ -9325,7 +9325,7 @@ const flattenProperties = (properties) => {
9325
9325
  };
9326
9326
 
9327
9327
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
9328
- const SDK_VERSION = '1.7.1';
9328
+ const SDK_VERSION = '1.7.2';
9329
9329
  const getReferrer = () => {
9330
9330
  if (isNode()) {
9331
9331
  return '';
@@ -9368,7 +9368,7 @@ const initialise = async () => {
9368
9368
  initialised = true;
9369
9369
  try {
9370
9370
  const runtimeDetails = flattenProperties(getRuntimeDetails());
9371
- const existingRuntimeId = getDetail(Detail.RUNTIME_ID);
9371
+ const existingRuntimeId = getDetail$1(Detail.RUNTIME_ID);
9372
9372
  const body = {
9373
9373
  version: 1,
9374
9374
  data: {
@@ -9521,6 +9521,7 @@ const setPublishableApiKeyFn = (publishableApiKey) => {
9521
9521
  storeDetail(Detail.PUBLISHABLE_API_KEY, publishableApiKey);
9522
9522
  };
9523
9523
  errorBoundary(getGlobalisedValue('setPublishableApiKey', setPublishableApiKeyFn));
9524
+ const getDetail = errorBoundary(getGlobalisedValue('getDetail', getDetail$1));
9524
9525
 
9525
9526
  var Environment;
9526
9527
  (function (Environment) {
@@ -9537,7 +9538,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
9537
9538
  chainID,
9538
9539
  coreContractAddress,
9539
9540
  registrationContractAddress,
9540
- sdkVersion: 'ts-immutable-sdk-1.7.1',
9541
+ sdkVersion: 'ts-immutable-sdk-1.7.2',
9541
9542
  });
9542
9543
  /**
9543
9544
  * Sets `sdkVersion` at the time of build
@@ -14262,10 +14263,20 @@ class AuthManager {
14262
14263
  },
14263
14264
  });
14264
14265
  };
14265
- async login() {
14266
+ /**
14267
+ * login
14268
+ * @param anonymousId Caller can pass an anonymousId if they want to associate their user's identity with immutable's internal instrumentation.
14269
+ */
14270
+ async login(anonymousId) {
14266
14271
  return withPassportError(async () => {
14272
+ const rid = getDetail(Detail.RUNTIME_ID);
14267
14273
  const popupWindowFeatures = { width: 410, height: 450 };
14268
14274
  const oidcUser = await this.userManager.signinPopup({
14275
+ extraQueryParams: {
14276
+ ...(this.userManager.settings?.extraQueryParams ?? {}),
14277
+ rid: rid || '',
14278
+ third_party_a_id: anonymousId || '',
14279
+ },
14269
14280
  popupWindowFeatures,
14270
14281
  });
14271
14282
  return AuthManager.mapOidcUserToDomainModel(oidcUser);
@@ -14285,17 +14296,22 @@ class AuthManager {
14285
14296
  async loginCallback() {
14286
14297
  return withPassportError(async () => this.userManager.signinPopupCallback(), PassportErrorType.AUTHENTICATION_ERROR);
14287
14298
  }
14288
- async loginWithDeviceFlow() {
14299
+ /**
14300
+ * loginWithDeviceFlow
14301
+ * @param anonymousId Caller can pass an anonymousId if they want to associate their user's identity with immutable's internal instrumentation.
14302
+ */
14303
+ async loginWithDeviceFlow(anonymousId) {
14289
14304
  return withPassportError(async () => {
14290
14305
  const response = await globalAxios$1.post(`${this.config.authenticationDomain}/oauth/device/code`, {
14291
14306
  client_id: this.config.oidcConfiguration.clientId,
14292
14307
  scope: this.config.oidcConfiguration.scope,
14293
14308
  audience: this.config.oidcConfiguration.audience,
14294
14309
  }, formUrlEncodedHeader);
14310
+ const rid = getDetail(Detail.RUNTIME_ID);
14295
14311
  return {
14296
14312
  code: response.data.user_code,
14297
14313
  deviceCode: response.data.device_code,
14298
- url: response.data.verification_uri_complete,
14314
+ url: `${response.data.verification_uri_complete}${rid ? `&rid=${rid}` : ''}${anonymousId ? `&third_party_a_id=${anonymousId}` : ''}`,
14299
14315
  interval: response.data.interval,
14300
14316
  };
14301
14317
  }, PassportErrorType.AUTHENTICATION_ERROR);
package/dist/x.js CHANGED
@@ -104,7 +104,7 @@ const storeDetail = (key, value) => {
104
104
  };
105
105
  setItem(Store.RUNTIME, RUNTIME_DETAILS);
106
106
  };
107
- const getDetail = (key) => {
107
+ const getDetail$1 = (key) => {
108
108
  // Handle the scenario where detail is a falsy value
109
109
  if (RUNTIME_DETAILS[key] === undefined) {
110
110
  return undefined;
@@ -136,7 +136,7 @@ const flattenProperties = (properties) => {
136
136
  };
137
137
 
138
138
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
139
- const SDK_VERSION = '1.7.1';
139
+ const SDK_VERSION = '1.7.2';
140
140
  const getReferrer = () => {
141
141
  if (isNode()) {
142
142
  return '';
@@ -179,7 +179,7 @@ const initialise = async () => {
179
179
  initialised = true;
180
180
  try {
181
181
  const runtimeDetails = flattenProperties(getRuntimeDetails());
182
- const existingRuntimeId = getDetail(Detail.RUNTIME_ID);
182
+ const existingRuntimeId = getDetail$1(Detail.RUNTIME_ID);
183
183
  const body = {
184
184
  version: 1,
185
185
  data: {
@@ -311,6 +311,7 @@ const setPublishableApiKeyFn = (publishableApiKey) => {
311
311
  storeDetail(Detail.PUBLISHABLE_API_KEY, publishableApiKey);
312
312
  };
313
313
  errorBoundary(getGlobalisedValue('setPublishableApiKey', setPublishableApiKeyFn));
314
+ errorBoundary(getGlobalisedValue('getDetail', getDetail$1));
314
315
 
315
316
  var Environment;
316
317
  (function (Environment) {
@@ -327,7 +328,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
327
328
  chainID,
328
329
  coreContractAddress,
329
330
  registrationContractAddress,
330
- sdkVersion: 'ts-immutable-sdk-1.7.1',
331
+ sdkVersion: 'ts-immutable-sdk-1.7.2',
331
332
  });
332
333
  /**
333
334
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "1.7.1",
4
+ "version": "1.7.2",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",