@imtbl/sdk 0.35.2 → 0.35.4

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
@@ -3791,7 +3791,7 @@ class MultiRollupApiClients {
3791
3791
  }
3792
3792
 
3793
3793
  // eslint-disable-next-line @typescript-eslint/naming-convention
3794
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.35.2' };
3794
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.35.4' };
3795
3795
  const createConfig = ({ basePath, headers, }) => {
3796
3796
  if (!basePath.trim()) {
3797
3797
  throw Error('basePath can not be empty');
@@ -3851,7 +3851,7 @@ class APIError extends Error {
3851
3851
 
3852
3852
  /* eslint-disable implicit-arrow-linebreak */
3853
3853
  const defaultHeaders = {
3854
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.35.2',
3854
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.35.4',
3855
3855
  };
3856
3856
  /**
3857
3857
  * createAPIConfiguration to create a custom Configuration
@@ -4262,7 +4262,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4262
4262
  chainID,
4263
4263
  coreContractAddress,
4264
4264
  registrationContractAddress,
4265
- sdkVersion: 'ts-immutable-sdk-0.35.2',
4265
+ sdkVersion: 'ts-immutable-sdk-0.35.4',
4266
4266
  });
4267
4267
  /**
4268
4268
  * Sets `sdkVersion` at the time of build
@@ -9070,7 +9070,7 @@ class AuthManager {
9070
9070
  + `&state=${state}`
9071
9071
  + `&audience=${this.config.oidcConfiguration.audience}`;
9072
9072
  }
9073
- async connectImxPKCEFlow(authorizationCode, state) {
9073
+ async loginWithPKCEFlowCallback(authorizationCode, state) {
9074
9074
  return withPassportError(async () => {
9075
9075
  const pkceData = this.deviceCredentialsManager.getPKCEData();
9076
9076
  if (!pkceData) {
@@ -10000,10 +10000,6 @@ class PassportImxProviderFactory {
10000
10000
  }
10001
10001
  return this.createProviderInstance(user);
10002
10002
  }
10003
- async getProviderWithPKCEFlow(authorizationCode, state) {
10004
- const user = await this.authManager.connectImxPKCEFlow(authorizationCode, state);
10005
- return this.createProviderInstance(user);
10006
- }
10007
10003
  async createProviderInstance(user) {
10008
10004
  if (!user.idToken) {
10009
10005
  throw new PassportError('Failed to initialise', PassportErrorType.WALLET_CONNECTION_ERROR);
@@ -10994,12 +10990,6 @@ class Passport {
10994
10990
  async connectImx() {
10995
10991
  return this.passportImxProviderFactory.getProvider();
10996
10992
  }
10997
- getPKCEAuthorizationUrl() {
10998
- return this.authManager.getPKCEAuthorizationUrl();
10999
- }
11000
- async connectImxPKCEFlow(authorizationCode, state) {
11001
- return this.passportImxProviderFactory.getProviderWithPKCEFlow(authorizationCode, state);
11002
- }
11003
10993
  connectEvm() {
11004
10994
  if (this.config.network === Networks.PRODUCTION) {
11005
10995
  throw new Error('EVM is not supported on production network');
@@ -11049,6 +11039,13 @@ class Passport {
11049
11039
  const user = await this.authManager.loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs);
11050
11040
  return user.profile;
11051
11041
  }
11042
+ loginWithPKCEFlow() {
11043
+ return this.authManager.getPKCEAuthorizationUrl();
11044
+ }
11045
+ async loginWithPKCEFlowCallback(authorizationCode, state) {
11046
+ const user = await this.authManager.loginWithPKCEFlowCallback(authorizationCode, state);
11047
+ return user.profile;
11048
+ }
11052
11049
  async logout() {
11053
11050
  await this.confirmationScreen.logout();
11054
11051
  await this.authManager.logout();
@@ -30571,7 +30568,7 @@ const GAS_OVERRIDES = {
30571
30568
  maxPriorityFeePerGas: ethers.BigNumber.from(101e9),
30572
30569
  };
30573
30570
 
30574
- const SDK_VERSION_MARKER = '0.35.2';
30571
+ const SDK_VERSION_MARKER = '0.35.4';
30575
30572
  // This SDK version is replaced by the `yarn build` command ran on the root level
30576
30573
  const globalPackageVersion = () => SDK_VERSION_MARKER;
30577
30574
 
package/dist/index.d.ts CHANGED
@@ -14697,8 +14697,6 @@ declare class Passport {
14697
14697
  */
14698
14698
  connectImxSilent(): Promise<IMXProvider | null>;
14699
14699
  connectImx(): Promise<IMXProvider>;
14700
- getPKCEAuthorizationUrl(): string;
14701
- connectImxPKCEFlow(authorizationCode: string, state: string): Promise<IMXProvider | null>;
14702
14700
  connectEvm(): Provider;
14703
14701
  /**
14704
14702
  *
@@ -14714,6 +14712,8 @@ declare class Passport {
14714
14712
  loginCallback(): Promise<void>;
14715
14713
  loginWithDeviceFlow(): Promise<DeviceConnectResponse>;
14716
14714
  loginWithDeviceFlowCallback(deviceCode: string, interval: number, timeoutMs?: number): Promise<UserProfile>;
14715
+ loginWithPKCEFlow(): string;
14716
+ loginWithPKCEFlowCallback(authorizationCode: string, state: string): Promise<UserProfile>;
14717
14717
  logout(): Promise<void>;
14718
14718
  /**
14719
14719
  * Logs the user out of Passport when using device flow authentication.
package/dist/index.js CHANGED
@@ -3769,7 +3769,7 @@ class MultiRollupApiClients {
3769
3769
  }
3770
3770
 
3771
3771
  // eslint-disable-next-line @typescript-eslint/naming-convention
3772
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.35.2' };
3772
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.35.4' };
3773
3773
  const createConfig = ({ basePath, headers, }) => {
3774
3774
  if (!basePath.trim()) {
3775
3775
  throw Error('basePath can not be empty');
@@ -3829,7 +3829,7 @@ class APIError extends Error {
3829
3829
 
3830
3830
  /* eslint-disable implicit-arrow-linebreak */
3831
3831
  const defaultHeaders = {
3832
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.35.2',
3832
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.35.4',
3833
3833
  };
3834
3834
  /**
3835
3835
  * createAPIConfiguration to create a custom Configuration
@@ -4240,7 +4240,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4240
4240
  chainID,
4241
4241
  coreContractAddress,
4242
4242
  registrationContractAddress,
4243
- sdkVersion: 'ts-immutable-sdk-0.35.2',
4243
+ sdkVersion: 'ts-immutable-sdk-0.35.4',
4244
4244
  });
4245
4245
  /**
4246
4246
  * Sets `sdkVersion` at the time of build
@@ -9048,7 +9048,7 @@ class AuthManager {
9048
9048
  + `&state=${state}`
9049
9049
  + `&audience=${this.config.oidcConfiguration.audience}`;
9050
9050
  }
9051
- async connectImxPKCEFlow(authorizationCode, state) {
9051
+ async loginWithPKCEFlowCallback(authorizationCode, state) {
9052
9052
  return withPassportError(async () => {
9053
9053
  const pkceData = this.deviceCredentialsManager.getPKCEData();
9054
9054
  if (!pkceData) {
@@ -9978,10 +9978,6 @@ class PassportImxProviderFactory {
9978
9978
  }
9979
9979
  return this.createProviderInstance(user);
9980
9980
  }
9981
- async getProviderWithPKCEFlow(authorizationCode, state) {
9982
- const user = await this.authManager.connectImxPKCEFlow(authorizationCode, state);
9983
- return this.createProviderInstance(user);
9984
- }
9985
9981
  async createProviderInstance(user) {
9986
9982
  if (!user.idToken) {
9987
9983
  throw new PassportError('Failed to initialise', PassportErrorType.WALLET_CONNECTION_ERROR);
@@ -10972,12 +10968,6 @@ class Passport {
10972
10968
  async connectImx() {
10973
10969
  return this.passportImxProviderFactory.getProvider();
10974
10970
  }
10975
- getPKCEAuthorizationUrl() {
10976
- return this.authManager.getPKCEAuthorizationUrl();
10977
- }
10978
- async connectImxPKCEFlow(authorizationCode, state) {
10979
- return this.passportImxProviderFactory.getProviderWithPKCEFlow(authorizationCode, state);
10980
- }
10981
10971
  connectEvm() {
10982
10972
  if (this.config.network === Networks.PRODUCTION) {
10983
10973
  throw new Error('EVM is not supported on production network');
@@ -11027,6 +11017,13 @@ class Passport {
11027
11017
  const user = await this.authManager.loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs);
11028
11018
  return user.profile;
11029
11019
  }
11020
+ loginWithPKCEFlow() {
11021
+ return this.authManager.getPKCEAuthorizationUrl();
11022
+ }
11023
+ async loginWithPKCEFlowCallback(authorizationCode, state) {
11024
+ const user = await this.authManager.loginWithPKCEFlowCallback(authorizationCode, state);
11025
+ return user.profile;
11026
+ }
11030
11027
  async logout() {
11031
11028
  await this.confirmationScreen.logout();
11032
11029
  await this.authManager.logout();
@@ -30549,7 +30546,7 @@ const GAS_OVERRIDES = {
30549
30546
  maxPriorityFeePerGas: BigNumber$1.from(101e9),
30550
30547
  };
30551
30548
 
30552
- const SDK_VERSION_MARKER = '0.35.2';
30549
+ const SDK_VERSION_MARKER = '0.35.4';
30553
30550
  // This SDK version is replaced by the `yarn build` command ran on the root level
30554
30551
  const globalPackageVersion = () => SDK_VERSION_MARKER;
30555
30552
 
@@ -10337,8 +10337,6 @@ declare class Passport {
10337
10337
  */
10338
10338
  connectImxSilent(): Promise<IMXProvider | null>;
10339
10339
  connectImx(): Promise<IMXProvider>;
10340
- getPKCEAuthorizationUrl(): string;
10341
- connectImxPKCEFlow(authorizationCode: string, state: string): Promise<IMXProvider | null>;
10342
10340
  connectEvm(): Provider;
10343
10341
  /**
10344
10342
  *
@@ -10354,6 +10352,8 @@ declare class Passport {
10354
10352
  loginCallback(): Promise<void>;
10355
10353
  loginWithDeviceFlow(): Promise<DeviceConnectResponse>;
10356
10354
  loginWithDeviceFlowCallback(deviceCode: string, interval: number, timeoutMs?: number): Promise<UserProfile>;
10355
+ loginWithPKCEFlow(): string;
10356
+ loginWithPKCEFlowCallback(authorizationCode: string, state: string): Promise<UserProfile>;
10357
10357
  logout(): Promise<void>;
10358
10358
  /**
10359
10359
  * Logs the user out of Passport when using device flow authentication.
package/dist/passport.js CHANGED
@@ -2191,7 +2191,7 @@ class MultiRollupApiClients {
2191
2191
  }
2192
2192
 
2193
2193
  // eslint-disable-next-line @typescript-eslint/naming-convention
2194
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.35.2' };
2194
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.35.4' };
2195
2195
  const createConfig = ({ basePath, headers, }) => {
2196
2196
  if (!basePath.trim()) {
2197
2197
  throw Error('basePath can not be empty');
@@ -2247,7 +2247,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2247
2247
  chainID,
2248
2248
  coreContractAddress,
2249
2249
  registrationContractAddress,
2250
- sdkVersion: 'ts-immutable-sdk-0.35.2',
2250
+ sdkVersion: 'ts-immutable-sdk-0.35.4',
2251
2251
  });
2252
2252
  /**
2253
2253
  * Sets `sdkVersion` at the time of build
@@ -7038,7 +7038,7 @@ class AuthManager {
7038
7038
  + `&state=${state}`
7039
7039
  + `&audience=${this.config.oidcConfiguration.audience}`;
7040
7040
  }
7041
- async connectImxPKCEFlow(authorizationCode, state) {
7041
+ async loginWithPKCEFlowCallback(authorizationCode, state) {
7042
7042
  return withPassportError(async () => {
7043
7043
  const pkceData = this.deviceCredentialsManager.getPKCEData();
7044
7044
  if (!pkceData) {
@@ -7968,10 +7968,6 @@ class PassportImxProviderFactory {
7968
7968
  }
7969
7969
  return this.createProviderInstance(user);
7970
7970
  }
7971
- async getProviderWithPKCEFlow(authorizationCode, state) {
7972
- const user = await this.authManager.connectImxPKCEFlow(authorizationCode, state);
7973
- return this.createProviderInstance(user);
7974
- }
7975
7971
  async createProviderInstance(user) {
7976
7972
  if (!user.idToken) {
7977
7973
  throw new PassportError('Failed to initialise', PassportErrorType.WALLET_CONNECTION_ERROR);
@@ -8962,12 +8958,6 @@ class Passport {
8962
8958
  async connectImx() {
8963
8959
  return this.passportImxProviderFactory.getProvider();
8964
8960
  }
8965
- getPKCEAuthorizationUrl() {
8966
- return this.authManager.getPKCEAuthorizationUrl();
8967
- }
8968
- async connectImxPKCEFlow(authorizationCode, state) {
8969
- return this.passportImxProviderFactory.getProviderWithPKCEFlow(authorizationCode, state);
8970
- }
8971
8961
  connectEvm() {
8972
8962
  if (this.config.network === Networks.PRODUCTION) {
8973
8963
  throw new Error('EVM is not supported on production network');
@@ -9017,6 +9007,13 @@ class Passport {
9017
9007
  const user = await this.authManager.loginWithDeviceFlowCallback(deviceCode, interval, timeoutMs);
9018
9008
  return user.profile;
9019
9009
  }
9010
+ loginWithPKCEFlow() {
9011
+ return this.authManager.getPKCEAuthorizationUrl();
9012
+ }
9013
+ async loginWithPKCEFlowCallback(authorizationCode, state) {
9014
+ const user = await this.authManager.loginWithPKCEFlowCallback(authorizationCode, state);
9015
+ return user.profile;
9016
+ }
9020
9017
  async logout() {
9021
9018
  await this.confirmationScreen.logout();
9022
9019
  await this.authManager.logout();
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.35.2",
4
+ "version": "0.35.4",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
8
8
  "dependencies": {
9
9
  "@0xsequence/abi": "^1.4.3",
10
10
  "@0xsequence/core": "^1.4.3",
11
- "@biom3/design-tokens": "0.2.4-beta",
12
- "@biom3/react": "^0.10.12",
11
+ "@biom3/design-tokens": "0.2.9",
12
+ "@biom3/react": "^0.19.13",
13
13
  "@ethersproject/abi": "^5.7.0",
14
14
  "@ethersproject/abstract-signer": "^5.7.0",
15
15
  "@ethersproject/providers": "^5.7.2",
@@ -124,7 +124,7 @@
124
124
  },
125
125
  "repository": "immutable/ts-immutable-sdk.git",
126
126
  "resolutions": {
127
- "@biom3/design-tokens": "0.2.4-beta",
127
+ "@biom3/design-tokens": "0.2.9",
128
128
  "@openzeppelin/contracts": "3.4.2-solc-0.7"
129
129
  },
130
130
  "scripts": {