@imtbl/sdk 1.76.7 → 1.76.8

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.76.7';
221
+ const SDK_VERSION$1 = '1.76.8';
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.76.7' };
15004
+ const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.76.8' };
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.76.7',
15076
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.76.8',
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.76.7' };
15666
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.76.8' };
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.76.7',
15707
+ sdkVersion: 'ts-immutable-sdk-1.76.8',
15708
15708
  baseConfig,
15709
15709
  });
15710
15710
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -25269,19 +25269,32 @@ class AuthManager {
25269
25269
  catch (err) {
25270
25270
  let passportErrorType = PassportErrorType.AUTHENTICATION_ERROR;
25271
25271
  let errorMessage = 'Failed to refresh token';
25272
+ let removeUser = true;
25272
25273
  if (err instanceof oidcClientTs.ErrorTimeout) {
25273
25274
  passportErrorType = PassportErrorType.SILENT_LOGIN_ERROR;
25275
+ errorMessage = `${errorMessage}: ${err.message}`;
25276
+ removeUser = false;
25274
25277
  }
25275
25278
  else if (err instanceof oidcClientTs.ErrorResponse) {
25276
25279
  passportErrorType = PassportErrorType.NOT_LOGGED_IN_ERROR;
25277
- errorMessage = `${err.message}: ${err.error_description}`;
25280
+ errorMessage = `${errorMessage}: ${err.message || err.error_description}`;
25278
25281
  }
25279
25282
  else if (err instanceof Error) {
25280
- errorMessage = err.message;
25283
+ errorMessage = `${errorMessage}: ${err.message}`;
25281
25284
  }
25282
25285
  else if (typeof err === 'string') {
25283
25286
  errorMessage = `${errorMessage}: ${err}`;
25284
25287
  }
25288
+ if (removeUser) {
25289
+ try {
25290
+ await this.userManager.removeUser();
25291
+ }
25292
+ catch (removeUserError) {
25293
+ if (removeUserError instanceof Error) {
25294
+ errorMessage = `${errorMessage}: Failed to remove user: ${removeUserError.message}`;
25295
+ }
25296
+ }
25297
+ }
25285
25298
  reject(new PassportError(errorMessage, passportErrorType));
25286
25299
  }
25287
25300
  finally {
@@ -50479,7 +50492,7 @@ const flattenProperties = (properties) => {
50479
50492
  };
50480
50493
 
50481
50494
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
50482
- const SDK_VERSION = '1.76.7';
50495
+ const SDK_VERSION = '1.76.8';
50483
50496
  const getFrameParentDomain = () => {
50484
50497
  if (isNode()) {
50485
50498
  return '';
@@ -55599,7 +55612,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
55599
55612
  maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
55600
55613
  };
55601
55614
 
55602
- const SDK_VERSION_MARKER = '1.76.7';
55615
+ const SDK_VERSION_MARKER = '1.76.8';
55603
55616
  // This SDK version is replaced by the `yarn build` command ran on the root level
55604
55617
  const globalPackageVersion = () => SDK_VERSION_MARKER;
55605
55618
 
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- export { c as config } from './config-BXXEsWia.js';
2
- export { b as blockchainData } from './blockchain_data-B0zEvGzb.js';
3
- export { p as passport } from './passport-DObRfrvo.js';
4
- export { o as orderbook } from './orderbook-DTeUQ4BQ.js';
5
- export { c as checkout } from './checkout-DRSkR8pH.js';
6
- export { x } from './x-CQOboSVk.js';
7
- export { w as webhook } from './webhook-Bv4_9uYs.js';
8
- export { m as mintingBackend } from './minting_backend-CsnC6UvI.js';
9
- import './index-D-7sLqmU.js';
1
+ export { c as config } from './config-m4ZpgBla.js';
2
+ export { b as blockchainData } from './blockchain_data-BYhX2fEz.js';
3
+ export { p as passport } from './passport-BunrXmQf.js';
4
+ export { o as orderbook } from './orderbook-Dz46dMUS.js';
5
+ export { c as checkout } from './checkout-TzmVNLfQ.js';
6
+ export { x } from './x-CtCDz6kZ.js';
7
+ export { w as webhook } from './webhook-Dm5OxRNv.js';
8
+ export { m as mintingBackend } from './minting_backend-CPVx6mJE.js';
9
+ import './index-ClQQOk3-.js';
10
10
  import 'axios';
11
11
  import 'lru-memorise';
12
12
  import 'global-const';
13
- import './index-Byv2SWUb.js';
14
- import './index-tBAarKJC.js';
15
- import './index-BecNJ6bo.js';
13
+ import './index-DKGNbHrp.js';
14
+ import './index-Cwke28tY.js';
15
+ import './index-Fea6IMKf.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-DLbb8Vpw.js';
38
+ import './index-DtGdRplI.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-Lnh10MCZ.js';
52
+ import './index-BWP30mSG.js';
53
53
  import 'sns-validator';
@@ -1 +1 @@
1
- {"timestamp": "2024-12-19T01:42:15Z"}
1
+ {"timestamp": "2024-12-19T02:44:18Z"}
@@ -1,6 +1,6 @@
1
- import { B as BlockchainData } from './index-Byv2SWUb.js';
2
- import { h as handle } from './index-Lnh10MCZ.js';
3
- import { t as track, e as setEnvironment, f as setPublishableApiKey } from './index-D-7sLqmU.js';
1
+ import { B as BlockchainData } from './index-DKGNbHrp.js';
2
+ import { h as handle } from './index-BWP30mSG.js';
3
+ import { t as track, e as setEnvironment, f as setPublishableApiKey } from './index-ClQQOk3-.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-CsnC6UvI.js';
2
- import './index-Byv2SWUb.js';
3
- import './index-tBAarKJC.js';
1
+ export { M as MintingBackendModule, a as mintingPersistencePg, b as mintingPersistencePrismaSqlite, p as processMint, r as recordMint, s as submitMintingRequests } from './minting_backend-CPVx6mJE.js';
2
+ import './index-DKGNbHrp.js';
3
+ import './index-Cwke28tY.js';
4
4
  import 'axios';
5
- import './index-D-7sLqmU.js';
5
+ import './index-ClQQOk3-.js';
6
6
  import 'lru-memorise';
7
7
  import 'global-const';
8
- import './index-Lnh10MCZ.js';
8
+ import './index-BWP30mSG.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-DLbb8Vpw.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-DtGdRplI.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-DLbb8Vpw.js';
2
- import './index-D-7sLqmU.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-DtGdRplI.js';
2
+ import './index-ClQQOk3-.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-tBAarKJC.js';
3
- import { I as IMXClient, s as signRaw, c as convertToSignableToken, g as generateLegacyStarkPrivateKey, a as createStarkSigner } from './index-BecNJ6bo.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-D-7sLqmU.js';
2
+ import { M as MultiRollupApiClients, c as createConfig, m as multiRollupConfig, a as index$1, I as ImxApiClients, b as imxApiConfig } from './index-Cwke28tY.js';
3
+ import { I as IMXClient, s as signRaw, c as convertToSignableToken, g as generateLegacyStarkPrivateKey, a as createStarkSigner } from './index-Fea6IMKf.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-ClQQOk3-.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';
@@ -960,19 +960,32 @@ class AuthManager {
960
960
  catch (err) {
961
961
  let passportErrorType = PassportErrorType.AUTHENTICATION_ERROR;
962
962
  let errorMessage = 'Failed to refresh token';
963
+ let removeUser = true;
963
964
  if (err instanceof ErrorTimeout) {
964
965
  passportErrorType = PassportErrorType.SILENT_LOGIN_ERROR;
966
+ errorMessage = `${errorMessage}: ${err.message}`;
967
+ removeUser = false;
965
968
  }
966
969
  else if (err instanceof ErrorResponse) {
967
970
  passportErrorType = PassportErrorType.NOT_LOGGED_IN_ERROR;
968
- errorMessage = `${err.message}: ${err.error_description}`;
971
+ errorMessage = `${errorMessage}: ${err.message || err.error_description}`;
969
972
  }
970
973
  else if (err instanceof Error) {
971
- errorMessage = err.message;
974
+ errorMessage = `${errorMessage}: ${err.message}`;
972
975
  }
973
976
  else if (typeof err === 'string') {
974
977
  errorMessage = `${errorMessage}: ${err}`;
975
978
  }
979
+ if (removeUser) {
980
+ try {
981
+ await this.userManager.removeUser();
982
+ }
983
+ catch (removeUserError) {
984
+ if (removeUserError instanceof Error) {
985
+ errorMessage = `${errorMessage}: Failed to remove user: ${removeUserError.message}`;
986
+ }
987
+ }
988
+ }
976
989
  reject(new PassportError(errorMessage, passportErrorType));
977
990
  }
978
991
  finally {
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-DObRfrvo.js';
1
+ export { J as JsonRpcError, P as Passport, a as PassportError, b as ProviderErrorCode, c as ProviderEvent, R as RpcErrorCode } from './passport-BunrXmQf.js';
2
2
  import 'axios';
3
- import './index-tBAarKJC.js';
4
- import './index-BecNJ6bo.js';
5
- import './index-D-7sLqmU.js';
3
+ import './index-Cwke28tY.js';
4
+ import './index-Fea6IMKf.js';
5
+ import './index-ClQQOk3-.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-Lnh10MCZ.js';
1
+ import { h as handle } from './index-BWP30mSG.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-Lnh10MCZ.js';
1
+ export { h as handle } from './index-BWP30mSG.js';
2
2
  import 'sns-validator';
3
- import './index-D-7sLqmU.js';
3
+ import './index-ClQQOk3-.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-BecNJ6bo.js';
2
- import { d as index$2 } from './index-tBAarKJC.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-Fea6IMKf.js';
2
+ import { d as index$2 } from './index-Cwke28tY.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-D-7sLqmU.js';
9
+ import { E as Environment, I as ImmutableConfiguration } from './index-ClQQOk3-.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-BecNJ6bo.js';
2
- export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-CQOboSVk.js';
3
- export { E as Environment, I as ImmutableConfiguration } from './index-D-7sLqmU.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-Fea6IMKf.js';
2
+ export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-CtCDz6kZ.js';
3
+ export { E as Environment, I as ImmutableConfiguration } from './index-ClQQOk3-.js';
4
4
  export { Signer as EthSigner } from '@ethersproject/abstract-signer';
5
- import './index-tBAarKJC.js';
5
+ import './index-Cwke28tY.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.76.7",
4
+ "version": "1.76.8",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",