@imtbl/sdk 1.71.1 → 1.71.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
@@ -218,7 +218,7 @@ const flattenProperties$1 = (properties) => {
218
218
  };
219
219
 
220
220
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
221
- const SDK_VERSION$1 = '1.71.1';
221
+ const SDK_VERSION$1 = '1.71.2';
222
222
  const getFrameParentDomain$1 = () => {
223
223
  if (isNode$1()) {
224
224
  return '';
@@ -15001,7 +15001,7 @@ class MultiRollupApiClients {
15001
15001
  }
15002
15002
 
15003
15003
  // eslint-disable-next-line @typescript-eslint/naming-convention
15004
- const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.71.1' };
15004
+ const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.71.2' };
15005
15005
  const createConfig$1 = ({ basePath, headers, }) => {
15006
15006
  if (!basePath.trim()) {
15007
15007
  throw Error('basePath can not be empty');
@@ -15073,7 +15073,7 @@ class APIError extends Error {
15073
15073
 
15074
15074
  /* eslint-disable implicit-arrow-linebreak */
15075
15075
  const defaultHeaders$1 = {
15076
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.71.1',
15076
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.71.2',
15077
15077
  };
15078
15078
  /**
15079
15079
  * createAPIConfiguration to create a custom Configuration
@@ -15663,7 +15663,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
15663
15663
  /* eslint-disable @typescript-eslint/naming-convention */
15664
15664
  class ApiConfiguration extends index$2.Configuration {
15665
15665
  }
15666
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.71.1' };
15666
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.71.2' };
15667
15667
  /**
15668
15668
  * @dev use createImmutableXConfiguration instead
15669
15669
  */
@@ -15704,7 +15704,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
15704
15704
  coreContractAddress,
15705
15705
  registrationContractAddress,
15706
15706
  registrationV4ContractAddress,
15707
- sdkVersion: 'ts-immutable-sdk-1.71.1',
15707
+ sdkVersion: 'ts-immutable-sdk-1.71.2',
15708
15708
  baseConfig,
15709
15709
  });
15710
15710
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -25240,7 +25240,10 @@ class AuthManager {
25240
25240
  });
25241
25241
  }
25242
25242
  async forceUserRefresh() {
25243
- return this.refreshTokenAndUpdatePromise();
25243
+ return this.refreshTokenAndUpdatePromise().catch((error) => {
25244
+ logger$f.warn('Failed to refresh user token', error);
25245
+ return null;
25246
+ });
25244
25247
  }
25245
25248
  /**
25246
25249
  * Refreshes the token and returns the user.
@@ -27456,7 +27459,9 @@ class ZkEvmProvider {
27456
27459
  this.#callSessionActivity(user.zkEvm.ethAddress);
27457
27460
  }
27458
27461
  }
27459
- }).catch(); // User does not exist, don't initialise an eth signer
27462
+ }).catch(() => {
27463
+ // User does not exist, don't initialise an eth signer
27464
+ });
27460
27465
  passportEventEmitter.on(PassportEvents.LOGGED_IN, (user) => {
27461
27466
  this.#initialiseEthSigner(user);
27462
27467
  if (isZkEvmUser(user)) {
@@ -28044,7 +28049,7 @@ class Passport {
28044
28049
  user = await this.authManager.getUser();
28045
28050
  }
28046
28051
  catch (error) {
28047
- if (error instanceof Error) {
28052
+ if (error instanceof Error && !error.message.includes('Unknown or invalid refresh token')) {
28048
28053
  trackError$1('passport', 'login', error);
28049
28054
  }
28050
28055
  if (useCachedSession) {
@@ -50429,7 +50434,7 @@ const flattenProperties = (properties) => {
50429
50434
  };
50430
50435
 
50431
50436
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
50432
- const SDK_VERSION = '1.71.1';
50437
+ const SDK_VERSION = '1.71.2';
50433
50438
  const getFrameParentDomain = () => {
50434
50439
  if (isNode()) {
50435
50440
  return '';
@@ -55538,7 +55543,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
55538
55543
  maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
55539
55544
  };
55540
55545
 
55541
- const SDK_VERSION_MARKER = '1.71.1';
55546
+ const SDK_VERSION_MARKER = '1.71.2';
55542
55547
  // This SDK version is replaced by the `yarn build` command ran on the root level
55543
55548
  const globalPackageVersion = () => SDK_VERSION_MARKER;
55544
55549
 
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- export { c as config } from './config-CWwpsjUb.js';
2
- export { b as blockchainData } from './blockchain_data-CNyFnM2c.js';
3
- export { p as passport } from './passport-BjF8KoDX.js';
4
- export { o as orderbook } from './orderbook-D3plQn23.js';
5
- export { c as checkout } from './checkout-CqcHP1Tc.js';
6
- export { x } from './x-DkgUA49d.js';
7
- export { w as webhook } from './webhook-Bf60DT4_.js';
8
- export { m as mintingBackend } from './minting_backend-BBI5ObIP.js';
9
- import './index-DdRnSVaF.js';
1
+ export { c as config } from './config-DCVDc3v8.js';
2
+ export { b as blockchainData } from './blockchain_data-Bhqm0if8.js';
3
+ export { p as passport } from './passport-vGE_K8Y1.js';
4
+ export { o as orderbook } from './orderbook-CEguKubj.js';
5
+ export { c as checkout } from './checkout-DasYybUZ.js';
6
+ export { x } from './x-SjcnDDz3.js';
7
+ export { w as webhook } from './webhook-BCQEMed_.js';
8
+ export { m as mintingBackend } from './minting_backend-Bg5AfM_R.js';
9
+ import './index-BmVyhpJX.js';
10
10
  import 'axios';
11
11
  import 'lru-memorise';
12
12
  import 'global-const';
13
- import './index-LMP6ksZC.js';
14
- import './index-cZSX66t5.js';
15
- import './index-0ugTu8KO.js';
13
+ import './index-L_TcRmaA.js';
14
+ import './index-NtppN-aK.js';
15
+ import './index-o5dSv0jt.js';
16
16
  import '@ethersproject/keccak256';
17
17
  import '@ethersproject/strings';
18
18
  import 'bn.js';
@@ -35,7 +35,7 @@ import 'events';
35
35
  import '@0xsequence/abi';
36
36
  import '@0xsequence/core';
37
37
  import 'uuid';
38
- import './index-Bqa30Kvc.js';
38
+ import './index-COICsNsE.js';
39
39
  import 'form-data';
40
40
  import '@opensea/seaport-js/lib/constants';
41
41
  import 'ethers-v6';
@@ -49,5 +49,5 @@ import '@metamask/detect-provider';
49
49
  import 'semver';
50
50
  import '@ethersproject/units';
51
51
  import '@ethersproject/bignumber';
52
- import './index-Xh5TmON_.js';
52
+ import './index-TFa0owz-.js';
53
53
  import 'sns-validator';
@@ -1,6 +1,6 @@
1
- import { B as BlockchainData } from './index-LMP6ksZC.js';
2
- import { h as handle } from './index-Xh5TmON_.js';
3
- import { t as track, e as setEnvironment, f as setPublishableApiKey } from './index-DdRnSVaF.js';
1
+ import { B as BlockchainData } from './index-L_TcRmaA.js';
2
+ import { h as handle } from './index-TFa0owz-.js';
3
+ import { t as track, e as setEnvironment, f as setPublishableApiKey } from './index-BmVyhpJX.js';
4
4
 
5
5
  const moduleName = 'minting_backend_sdk';
6
6
  const trackInitializePersistencePG = () => {
@@ -1,9 +1,9 @@
1
- export { M as MintingBackendModule, a as mintingPersistencePg, b as mintingPersistencePrismaSqlite, p as processMint, r as recordMint, s as submitMintingRequests } from './minting_backend-BBI5ObIP.js';
2
- import './index-LMP6ksZC.js';
3
- import './index-cZSX66t5.js';
1
+ export { M as MintingBackendModule, a as mintingPersistencePg, b as mintingPersistencePrismaSqlite, p as processMint, r as recordMint, s as submitMintingRequests } from './minting_backend-Bg5AfM_R.js';
2
+ import './index-L_TcRmaA.js';
3
+ import './index-NtppN-aK.js';
4
4
  import 'axios';
5
- import './index-DdRnSVaF.js';
5
+ import './index-BmVyhpJX.js';
6
6
  import 'lru-memorise';
7
7
  import 'global-const';
8
- import './index-Xh5TmON_.js';
8
+ import './index-TFa0owz-.js';
9
9
  import 'sns-validator';
@@ -1,4 +1,4 @@
1
- import { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-Bqa30Kvc.js';
1
+ import { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-COICsNsE.js';
2
2
 
3
3
  var orderbook = /*#__PURE__*/Object.freeze({
4
4
  __proto__: null,
package/dist/orderbook.js CHANGED
@@ -1,5 +1,5 @@
1
- export { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-Bqa30Kvc.js';
2
- import './index-DdRnSVaF.js';
1
+ export { A as ActionType, F as FeeType, O as OrderStatusName, a as Orderbook, S as SignablePurpose, T as TransactionPurpose, c as constants } from './index-COICsNsE.js';
2
+ import './index-BmVyhpJX.js';
3
3
  import 'axios';
4
4
  import 'lru-memorise';
5
5
  import 'global-const';
@@ -1,7 +1,7 @@
1
1
  import globalAxios, { isAxiosError } from 'axios';
2
- import { M as MultiRollupApiClients, c as createConfig, m as multiRollupConfig, a as index$1, I as ImxApiClients, b as imxApiConfig } from './index-cZSX66t5.js';
3
- import { I as IMXClient, s as signRaw, c as convertToSignableToken, g as generateLegacyStarkPrivateKey, a as createStarkSigner } from './index-0ugTu8KO.js';
4
- import { s as setPassportClientId, t as track, b as trackFlow, c as trackError, u as utils, i as identify, g as getDetail, D as Detail, d as trackDuration, E as Environment } from './index-DdRnSVaF.js';
2
+ import { M as MultiRollupApiClients, c as createConfig, m as multiRollupConfig, a as index$1, I as ImxApiClients, b as imxApiConfig } from './index-NtppN-aK.js';
3
+ import { I as IMXClient, s as signRaw, c as convertToSignableToken, g as generateLegacyStarkPrivateKey, a as createStarkSigner } from './index-o5dSv0jt.js';
4
+ import { s as setPassportClientId, t as track, b as trackFlow, c as trackError, u as utils, i as identify, g as getDetail, D as Detail, d as trackDuration, E as Environment } from './index-BmVyhpJX.js';
5
5
  import { UserManager, User, ErrorTimeout, ErrorResponse, InMemoryWebStorage, WebStorageStateStore } from 'oidc-client-ts';
6
6
  import * as crypto from 'crypto';
7
7
  import jwt_decode from 'jwt-decode';
@@ -931,7 +931,10 @@ class AuthManager {
931
931
  });
932
932
  }
933
933
  async forceUserRefresh() {
934
- return this.refreshTokenAndUpdatePromise();
934
+ return this.refreshTokenAndUpdatePromise().catch((error) => {
935
+ logger.warn('Failed to refresh user token', error);
936
+ return null;
937
+ });
935
938
  }
936
939
  /**
937
940
  * Refreshes the token and returns the user.
@@ -3147,7 +3150,9 @@ class ZkEvmProvider {
3147
3150
  this.#callSessionActivity(user.zkEvm.ethAddress);
3148
3151
  }
3149
3152
  }
3150
- }).catch(); // User does not exist, don't initialise an eth signer
3153
+ }).catch(() => {
3154
+ // User does not exist, don't initialise an eth signer
3155
+ });
3151
3156
  passportEventEmitter.on(PassportEvents.LOGGED_IN, (user) => {
3152
3157
  this.#initialiseEthSigner(user);
3153
3158
  if (isZkEvmUser(user)) {
@@ -3735,7 +3740,7 @@ class Passport {
3735
3740
  user = await this.authManager.getUser();
3736
3741
  }
3737
3742
  catch (error) {
3738
- if (error instanceof Error) {
3743
+ if (error instanceof Error && !error.message.includes('Unknown or invalid refresh token')) {
3739
3744
  trackError('passport', 'login', error);
3740
3745
  }
3741
3746
  if (useCachedSession) {
package/dist/passport.js CHANGED
@@ -1,8 +1,8 @@
1
- export { J as JsonRpcError, P as Passport, a as PassportError, b as ProviderErrorCode, c as ProviderEvent, R as RpcErrorCode } from './passport-BjF8KoDX.js';
1
+ export { J as JsonRpcError, P as Passport, a as PassportError, b as ProviderErrorCode, c as ProviderEvent, R as RpcErrorCode } from './passport-vGE_K8Y1.js';
2
2
  import 'axios';
3
- import './index-cZSX66t5.js';
4
- import './index-0ugTu8KO.js';
5
- import './index-DdRnSVaF.js';
3
+ import './index-NtppN-aK.js';
4
+ import './index-o5dSv0jt.js';
5
+ import './index-BmVyhpJX.js';
6
6
  import 'lru-memorise';
7
7
  import 'global-const';
8
8
  import '@ethersproject/keccak256';
@@ -1,4 +1,4 @@
1
- import { h as handle } from './index-Xh5TmON_.js';
1
+ import { h as handle } from './index-TFa0owz-.js';
2
2
 
3
3
  var webhook = /*#__PURE__*/Object.freeze({
4
4
  __proto__: null,
package/dist/webhook.js CHANGED
@@ -1,6 +1,6 @@
1
- export { h as handle } from './index-Xh5TmON_.js';
1
+ export { h as handle } from './index-TFa0owz-.js';
2
2
  import 'sns-validator';
3
- import './index-DdRnSVaF.js';
3
+ import './index-BmVyhpJX.js';
4
4
  import 'axios';
5
5
  import 'lru-memorise';
6
6
  import 'global-const';
@@ -1,12 +1,12 @@
1
- import { b as ImxConfiguration, c as convertToSignableToken, s as signRaw, e as exportContracts, d as signMessage, E as EncodingApi, M as MintsApi, f as signRegisterEthAddress, A as ApiConfiguration, h as AssetsApi, B as BalancesApi, C as CollectionsApi, D as DepositsApi, i as ExchangesApi, I as IMXClient, j as IMXError, k as ImmutableX, l as MetadataApi, m as MetadataRefreshesApi, n as MetadataSchemaRequestTypeEnum, N as NftCheckoutPrimaryApi, O as OrdersApi, P as ProjectsApi, T as TokensApi, o as TradesApi, p as TransfersApi, U as UsersApi, W as WithdrawalsApi, q as createConfig, r as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, t as generateStarkPrivateKey, u as imxClientConfig, v as production, w as sandbox, x as serializePackedSignature, y as starkEcOrder } from './index-0ugTu8KO.js';
2
- import { d as index$2 } from './index-cZSX66t5.js';
1
+ import { b as ImxConfiguration, c as convertToSignableToken, s as signRaw, e as exportContracts, d as signMessage, E as EncodingApi, M as MintsApi, f as signRegisterEthAddress, A as ApiConfiguration, h as AssetsApi, B as BalancesApi, C as CollectionsApi, D as DepositsApi, i as ExchangesApi, I as IMXClient, j as IMXError, k as ImmutableX, l as MetadataApi, m as MetadataRefreshesApi, n as MetadataSchemaRequestTypeEnum, N as NftCheckoutPrimaryApi, O as OrdersApi, P as ProjectsApi, T as TokensApi, o as TradesApi, p as TransfersApi, U as UsersApi, W as WithdrawalsApi, q as createConfig, r as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, t as generateStarkPrivateKey, u as imxClientConfig, v as production, w as sandbox, x as serializePackedSignature, y as starkEcOrder } from './index-o5dSv0jt.js';
2
+ import { d as index$2 } from './index-NtppN-aK.js';
3
3
  import { isAxiosError } from 'axios';
4
4
  import * as encUtils from 'enc-utils';
5
5
  import { parseUnits } from '@ethersproject/units';
6
6
  import { BigNumber } from '@ethersproject/bignumber';
7
7
  import { ethers } from 'ethers';
8
8
  import detectEthereumProvider from '@metamask/detect-provider';
9
- import { E as Environment, I as ImmutableConfiguration } from './index-DdRnSVaF.js';
9
+ import { E as Environment, I as ImmutableConfiguration } from './index-BmVyhpJX.js';
10
10
  import { Signer } from '@ethersproject/abstract-signer';
11
11
 
12
12
  function isChainValid(chainID, config) {
package/dist/x.js CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ApiConfiguration, h as AssetsApi, B as BalancesApi, C as CollectionsApi, e as Contracts, D as DepositsApi, E as EncodingApi, i as ExchangesApi, I as IMXClient, j as IMXError, k as ImmutableX, b as ImxConfiguration, l as MetadataApi, m as MetadataRefreshesApi, n as MetadataSchemaRequestTypeEnum, M as MintsApi, N as NftCheckoutPrimaryApi, O as OrdersApi, P as ProjectsApi, T as TokensApi, o as TradesApi, p as TransfersApi, U as UsersApi, W as WithdrawalsApi, q as createConfig, r as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, t as generateStarkPrivateKey, u as imxClientConfig, a as imxClientCreateStarkSigner, g as imxClientGenerateLegacyStarkPrivateKey, v as production, w as sandbox, x as serializePackedSignature, f as signRegisterEthAddress, y as starkEcOrder } from './index-0ugTu8KO.js';
2
- export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-DkgUA49d.js';
3
- export { E as Environment, I as ImmutableConfiguration } from './index-DdRnSVaF.js';
1
+ export { A as ApiConfiguration, h as AssetsApi, B as BalancesApi, C as CollectionsApi, e as Contracts, D as DepositsApi, E as EncodingApi, i as ExchangesApi, I as IMXClient, j as IMXError, k as ImmutableX, b as ImxConfiguration, l as MetadataApi, m as MetadataRefreshesApi, n as MetadataSchemaRequestTypeEnum, M as MintsApi, N as NftCheckoutPrimaryApi, O as OrdersApi, P as ProjectsApi, T as TokensApi, o as TradesApi, p as TransfersApi, U as UsersApi, W as WithdrawalsApi, q as createConfig, r as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, t as generateStarkPrivateKey, u as imxClientConfig, a as imxClientCreateStarkSigner, g as imxClientGenerateLegacyStarkPrivateKey, v as production, w as sandbox, x as serializePackedSignature, f as signRegisterEthAddress, y as starkEcOrder } from './index-o5dSv0jt.js';
2
+ export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-SjcnDDz3.js';
3
+ export { E as Environment, I as ImmutableConfiguration } from './index-BmVyhpJX.js';
4
4
  export { Signer as EthSigner } from '@ethersproject/abstract-signer';
5
- import './index-cZSX66t5.js';
5
+ import './index-NtppN-aK.js';
6
6
  import 'axios';
7
7
  import '@ethersproject/keccak256';
8
8
  import '@ethersproject/strings';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Typescript SDK",
4
- "version": "1.71.1",
4
+ "version": "1.71.2",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",