@imtbl/sdk 1.8.0 → 1.8.1

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
@@ -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.8.0';
177
+ const SDK_VERSION$1 = '1.8.1';
178
178
  const getReferrer$1 = () => {
179
179
  if (isNode$1()) {
180
180
  return '';
@@ -11298,7 +11298,7 @@ class MultiRollupApiClients {
11298
11298
  }
11299
11299
 
11300
11300
  // eslint-disable-next-line @typescript-eslint/naming-convention
11301
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.8.0' };
11301
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.8.1' };
11302
11302
  const createConfig = ({ basePath, headers, }) => {
11303
11303
  if (!basePath.trim()) {
11304
11304
  throw Error('basePath can not be empty');
@@ -11370,7 +11370,7 @@ class APIError extends Error {
11370
11370
 
11371
11371
  /* eslint-disable implicit-arrow-linebreak */
11372
11372
  const defaultHeaders = {
11373
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.8.0',
11373
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.8.1',
11374
11374
  };
11375
11375
  /**
11376
11376
  * createAPIConfiguration to create a custom Configuration
@@ -11803,7 +11803,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
11803
11803
  chainID,
11804
11804
  coreContractAddress,
11805
11805
  registrationContractAddress,
11806
- sdkVersion: 'ts-immutable-sdk-1.8.0',
11806
+ sdkVersion: 'ts-immutable-sdk-1.8.1',
11807
11807
  });
11808
11808
  /**
11809
11809
  * Sets `sdkVersion` at the time of build
@@ -18627,6 +18627,7 @@ class Passport {
18627
18627
  *
18628
18628
  * @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
18629
18629
  * prompted to log in and the Promise will resolve with a null value.
18630
+ * @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
18630
18631
  * @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
18631
18632
  */
18632
18633
  async login(options) {
@@ -18643,7 +18644,7 @@ class Passport {
18643
18644
  console.warn('login failed to retrieve a cached user session', error);
18644
18645
  }
18645
18646
  if (!user && !useCachedSession) {
18646
- user = await this.authManager.login();
18647
+ user = await this.authManager.login(options?.anonymousId);
18647
18648
  }
18648
18649
  if (user) {
18649
18650
  identify({
@@ -18655,8 +18656,8 @@ class Passport {
18655
18656
  async loginCallback() {
18656
18657
  return this.authManager.loginCallback();
18657
18658
  }
18658
- async loginWithDeviceFlow() {
18659
- return this.authManager.loginWithDeviceFlow();
18659
+ async loginWithDeviceFlow(options) {
18660
+ return this.authManager.loginWithDeviceFlow(options?.anonymousId);
18660
18661
  }
18661
18662
  async loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs) {
18662
18663
  const user = await this.authManager.loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs);
@@ -37484,7 +37485,7 @@ const flattenProperties = (properties) => {
37484
37485
  };
37485
37486
 
37486
37487
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
37487
- const SDK_VERSION = '1.8.0';
37488
+ const SDK_VERSION = '1.8.1';
37488
37489
  const getReferrer = () => {
37489
37490
  if (isNode()) {
37490
37491
  return '';
@@ -42652,7 +42653,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
42652
42653
  maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
42653
42654
  };
42654
42655
 
42655
- const SDK_VERSION_MARKER = '1.8.0';
42656
+ const SDK_VERSION_MARKER = '1.8.1';
42656
42657
  // This SDK version is replaced by the `yarn build` command ran on the root level
42657
42658
  const globalPackageVersion = () => SDK_VERSION_MARKER;
42658
42659
 
package/dist/index.d.ts CHANGED
@@ -28629,13 +28629,17 @@ declare class Passport {
28629
28629
  *
28630
28630
  * @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
28631
28631
  * prompted to log in and the Promise will resolve with a null value.
28632
+ * @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
28632
28633
  * @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
28633
28634
  */
28634
28635
  login(options?: {
28635
28636
  useCachedSession: boolean;
28637
+ anonymousId?: string;
28636
28638
  }): Promise<UserProfile | null>;
28637
28639
  loginCallback(): Promise<void>;
28638
- loginWithDeviceFlow(): Promise<DeviceConnectResponse>;
28640
+ loginWithDeviceFlow(options?: {
28641
+ anonymousId?: string;
28642
+ }): Promise<DeviceConnectResponse>;
28639
28643
  loginWithDeviceFlowCallback(deviceCode: string, interval: number, timeoutMs?: number): Promise<UserProfile>;
28640
28644
  loginWithPKCEFlow(): string;
28641
28645
  loginWithPKCEFlowCallback(authorizationCode: string, state: string): Promise<UserProfile>;
package/dist/index.js CHANGED
@@ -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.8.0';
155
+ const SDK_VERSION$1 = '1.8.1';
156
156
  const getReferrer$1 = () => {
157
157
  if (isNode$1()) {
158
158
  return '';
@@ -11276,7 +11276,7 @@ class MultiRollupApiClients {
11276
11276
  }
11277
11277
 
11278
11278
  // eslint-disable-next-line @typescript-eslint/naming-convention
11279
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.8.0' };
11279
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.8.1' };
11280
11280
  const createConfig = ({ basePath, headers, }) => {
11281
11281
  if (!basePath.trim()) {
11282
11282
  throw Error('basePath can not be empty');
@@ -11348,7 +11348,7 @@ class APIError extends Error {
11348
11348
 
11349
11349
  /* eslint-disable implicit-arrow-linebreak */
11350
11350
  const defaultHeaders = {
11351
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.8.0',
11351
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.8.1',
11352
11352
  };
11353
11353
  /**
11354
11354
  * createAPIConfiguration to create a custom Configuration
@@ -11781,7 +11781,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
11781
11781
  chainID,
11782
11782
  coreContractAddress,
11783
11783
  registrationContractAddress,
11784
- sdkVersion: 'ts-immutable-sdk-1.8.0',
11784
+ sdkVersion: 'ts-immutable-sdk-1.8.1',
11785
11785
  });
11786
11786
  /**
11787
11787
  * Sets `sdkVersion` at the time of build
@@ -18605,6 +18605,7 @@ class Passport {
18605
18605
  *
18606
18606
  * @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
18607
18607
  * prompted to log in and the Promise will resolve with a null value.
18608
+ * @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
18608
18609
  * @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
18609
18610
  */
18610
18611
  async login(options) {
@@ -18621,7 +18622,7 @@ class Passport {
18621
18622
  console.warn('login failed to retrieve a cached user session', error);
18622
18623
  }
18623
18624
  if (!user && !useCachedSession) {
18624
- user = await this.authManager.login();
18625
+ user = await this.authManager.login(options?.anonymousId);
18625
18626
  }
18626
18627
  if (user) {
18627
18628
  identify({
@@ -18633,8 +18634,8 @@ class Passport {
18633
18634
  async loginCallback() {
18634
18635
  return this.authManager.loginCallback();
18635
18636
  }
18636
- async loginWithDeviceFlow() {
18637
- return this.authManager.loginWithDeviceFlow();
18637
+ async loginWithDeviceFlow(options) {
18638
+ return this.authManager.loginWithDeviceFlow(options?.anonymousId);
18638
18639
  }
18639
18640
  async loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs) {
18640
18641
  const user = await this.authManager.loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs);
@@ -37462,7 +37463,7 @@ const flattenProperties = (properties) => {
37462
37463
  };
37463
37464
 
37464
37465
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
37465
- const SDK_VERSION = '1.8.0';
37466
+ const SDK_VERSION = '1.8.1';
37466
37467
  const getReferrer = () => {
37467
37468
  if (isNode()) {
37468
37469
  return '';
@@ -42630,7 +42631,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
42630
42631
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
42631
42632
  };
42632
42633
 
42633
- const SDK_VERSION_MARKER = '1.8.0';
42634
+ const SDK_VERSION_MARKER = '1.8.1';
42634
42635
  // This SDK version is replaced by the `yarn build` command ran on the root level
42635
42636
  const globalPackageVersion = () => SDK_VERSION_MARKER;
42636
42637
 
package/dist/orderbook.js CHANGED
@@ -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.8.0';
134
+ const SDK_VERSION = '1.8.1';
135
135
  const getReferrer = () => {
136
136
  if (isNode()) {
137
137
  return '';
@@ -21102,13 +21102,17 @@ declare class Passport {
21102
21102
  *
21103
21103
  * @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
21104
21104
  * prompted to log in and the Promise will resolve with a null value.
21105
+ * @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
21105
21106
  * @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
21106
21107
  */
21107
21108
  login(options?: {
21108
21109
  useCachedSession: boolean;
21110
+ anonymousId?: string;
21109
21111
  }): Promise<UserProfile | null>;
21110
21112
  loginCallback(): Promise<void>;
21111
- loginWithDeviceFlow(): Promise<DeviceConnectResponse>;
21113
+ loginWithDeviceFlow(options?: {
21114
+ anonymousId?: string;
21115
+ }): Promise<DeviceConnectResponse>;
21112
21116
  loginWithDeviceFlowCallback(deviceCode: string, interval: number, timeoutMs?: number): Promise<UserProfile>;
21113
21117
  loginWithPKCEFlow(): string;
21114
21118
  loginWithPKCEFlowCallback(authorizationCode: string, state: string): Promise<UserProfile>;
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.8.0' };
9149
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.8.1' };
9150
9150
  const createConfig = ({ basePath, headers, }) => {
9151
9151
  if (!basePath.trim()) {
9152
9152
  throw Error('basePath can not be empty');
@@ -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.8.0';
9328
+ const SDK_VERSION = '1.8.1';
9329
9329
  const getReferrer = () => {
9330
9330
  if (isNode()) {
9331
9331
  return '';
@@ -9538,7 +9538,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
9538
9538
  chainID,
9539
9539
  coreContractAddress,
9540
9540
  registrationContractAddress,
9541
- sdkVersion: 'ts-immutable-sdk-1.8.0',
9541
+ sdkVersion: 'ts-immutable-sdk-1.8.1',
9542
9542
  });
9543
9543
  /**
9544
9544
  * Sets `sdkVersion` at the time of build
@@ -16353,6 +16353,7 @@ class Passport {
16353
16353
  *
16354
16354
  * @param options.useCachedSession = false - If true, and no active session exists, then the user will not be
16355
16355
  * prompted to log in and the Promise will resolve with a null value.
16356
+ * @param options.anonymousId - If provided, Passport internal metrics will be enriched with this value.
16356
16357
  * @returns {Promise<UserProfile | null>} the user profile if the user is logged in, otherwise null
16357
16358
  */
16358
16359
  async login(options) {
@@ -16369,7 +16370,7 @@ class Passport {
16369
16370
  console.warn('login failed to retrieve a cached user session', error);
16370
16371
  }
16371
16372
  if (!user && !useCachedSession) {
16372
- user = await this.authManager.login();
16373
+ user = await this.authManager.login(options?.anonymousId);
16373
16374
  }
16374
16375
  if (user) {
16375
16376
  identify({
@@ -16381,8 +16382,8 @@ class Passport {
16381
16382
  async loginCallback() {
16382
16383
  return this.authManager.loginCallback();
16383
16384
  }
16384
- async loginWithDeviceFlow() {
16385
- return this.authManager.loginWithDeviceFlow();
16385
+ async loginWithDeviceFlow(options) {
16386
+ return this.authManager.loginWithDeviceFlow(options?.anonymousId);
16386
16387
  }
16387
16388
  async loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs) {
16388
16389
  const user = await this.authManager.loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs);
package/dist/x.js CHANGED
@@ -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.8.0';
139
+ const SDK_VERSION = '1.8.1';
140
140
  const getReferrer = () => {
141
141
  if (isNode()) {
142
142
  return '';
@@ -328,7 +328,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
328
328
  chainID,
329
329
  coreContractAddress,
330
330
  registrationContractAddress,
331
- sdkVersion: 'ts-immutable-sdk-1.8.0',
331
+ sdkVersion: 'ts-immutable-sdk-1.8.1',
332
332
  });
333
333
  /**
334
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.8.0",
4
+ "version": "1.8.1",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",