@imtbl/sdk 1.53.1 → 1.53.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
@@ -216,7 +216,7 @@ const flattenProperties$1 = (properties) => {
216
216
  };
217
217
 
218
218
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
219
- const SDK_VERSION$1 = '1.53.1';
219
+ const SDK_VERSION$1 = '1.53.2';
220
220
  const getFrameParentDomain$1 = () => {
221
221
  if (isNode$1()) {
222
222
  return '';
@@ -15765,7 +15765,7 @@ class MultiRollupApiClients {
15765
15765
  }
15766
15766
 
15767
15767
  // eslint-disable-next-line @typescript-eslint/naming-convention
15768
- const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.53.1' };
15768
+ const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.53.2' };
15769
15769
  const createConfig$1 = ({ basePath, headers, }) => {
15770
15770
  if (!basePath.trim()) {
15771
15771
  throw Error('basePath can not be empty');
@@ -15837,7 +15837,7 @@ class APIError extends Error {
15837
15837
 
15838
15838
  /* eslint-disable implicit-arrow-linebreak */
15839
15839
  const defaultHeaders$1 = {
15840
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.53.1',
15840
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.53.2',
15841
15841
  };
15842
15842
  /**
15843
15843
  * createAPIConfiguration to create a custom Configuration
@@ -16311,7 +16311,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
16311
16311
  /* eslint-disable @typescript-eslint/naming-convention */
16312
16312
  class ApiConfiguration extends index$2.Configuration {
16313
16313
  }
16314
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.53.1' };
16314
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.53.2' };
16315
16315
  /**
16316
16316
  * @dev use createImmutableXConfiguration instead
16317
16317
  */
@@ -16352,7 +16352,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
16352
16352
  coreContractAddress,
16353
16353
  registrationContractAddress,
16354
16354
  registrationV4ContractAddress,
16355
- sdkVersion: 'ts-immutable-sdk-1.53.1',
16355
+ sdkVersion: 'ts-immutable-sdk-1.53.2',
16356
16356
  baseConfig,
16357
16357
  });
16358
16358
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -28196,13 +28196,19 @@ class ZkEvmProvider {
28196
28196
  this.#providerEventEmitter = new TypedEventEmitter();
28197
28197
  // Automatically connect an existing user session to Passport
28198
28198
  this.#authManager.getUser().then((user) => {
28199
- if (user && isZkEvmUser(user)) {
28199
+ if (user) {
28200
28200
  this.#initialiseEthSigner(user);
28201
+ if (isZkEvmUser(user)) {
28202
+ this.#callSessionActivity(user.zkEvm.ethAddress);
28203
+ }
28204
+ }
28205
+ }).catch(); // User does not exist, don't initialise an eth signer
28206
+ passportEventEmitter.on(PassportEvents.LOGGED_IN, (user) => {
28207
+ this.#initialiseEthSigner(user);
28208
+ if (isZkEvmUser(user)) {
28209
+ this.#callSessionActivity(user.zkEvm.ethAddress);
28201
28210
  }
28202
- }).catch(() => {
28203
- // User does not exist, don't initialise an eth signer
28204
28211
  });
28205
- passportEventEmitter.on(PassportEvents.LOGGED_IN, (user) => this.#initialiseEthSigner(user));
28206
28212
  passportEventEmitter.on(PassportEvents.LOGGED_OUT, this.#handleLogout);
28207
28213
  passportEventEmitter.on(PassportEvents.ACCOUNTS_REQUESTED, trackSessionActivity);
28208
28214
  }
@@ -28297,7 +28303,9 @@ class ZkEvmProvider {
28297
28303
  try {
28298
28304
  const user = await this.#authManager.getUserOrLogin();
28299
28305
  flow.addEvent('endGetUserOrLogin');
28300
- this.#initialiseEthSigner(user);
28306
+ if (!this.#ethSigner) {
28307
+ this.#initialiseEthSigner(user);
28308
+ }
28301
28309
  let userZkEvmEthAddress;
28302
28310
  if (!isZkEvmUser(user)) {
28303
28311
  flow.addEvent('startUserRegistration');
@@ -50763,7 +50771,7 @@ const flattenProperties = (properties) => {
50763
50771
  };
50764
50772
 
50765
50773
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
50766
- const SDK_VERSION = '1.53.1';
50774
+ const SDK_VERSION = '1.53.2';
50767
50775
  const getFrameParentDomain = () => {
50768
50776
  if (isNode()) {
50769
50777
  return '';
@@ -56158,7 +56166,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
56158
56166
  maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
56159
56167
  };
56160
56168
 
56161
- const SDK_VERSION_MARKER = '1.53.1';
56169
+ const SDK_VERSION_MARKER = '1.53.2';
56162
56170
  // This SDK version is replaced by the `yarn build` command ran on the root level
56163
56171
  const globalPackageVersion = () => SDK_VERSION_MARKER;
56164
56172
 
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- export { c as config } from './config-CI4VuLa3.js';
2
- export { b as blockchainData } from './blockchain_data-DjUh_foV.js';
3
- export { p as passport } from './passport-cDED9af7.js';
4
- export { o as orderbook } from './orderbook-b43XDqQR.js';
5
- export { c as checkout } from './checkout-BIqbVlQv.js';
6
- export { x } from './x-CNTPAuxH.js';
7
- export { w as webhook } from './webhook-JVhxzrnf.js';
8
- export { m as mintingBackend } from './minting_backend-_fyIXCv4.js';
9
- import './index-NsFmPsjG.js';
1
+ export { c as config } from './config-dJklVX8z.js';
2
+ export { b as blockchainData } from './blockchain_data-BQOoiR_y.js';
3
+ export { p as passport } from './passport-Bhp5RpCq.js';
4
+ export { o as orderbook } from './orderbook-CffI6-mz.js';
5
+ export { c as checkout } from './checkout-vxV9-lRv.js';
6
+ export { x } from './x-BnYJS4e5.js';
7
+ export { w as webhook } from './webhook-BGmLE17x.js';
8
+ export { m as mintingBackend } from './minting_backend-hauL8CIc.js';
9
+ import './index-CT1lxIie.js';
10
10
  import 'axios';
11
11
  import 'lru-memorise';
12
12
  import 'global-const';
13
- import './index-CQzW4yCk.js';
14
- import './index-BbhTeUXz.js';
15
- import './index-Ch8ga-mA.js';
13
+ import './index-BMVKFfI3.js';
14
+ import './index-B0s6HA0V.js';
15
+ import './index-B8jjqB1D.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-D1AT1fME.js';
38
+ import './index-CnoYoD3G.js';
39
39
  import 'form-data';
40
40
  import 'ethers-v6';
41
41
  import 'merkletreejs';
@@ -47,5 +47,5 @@ import '@ethersproject/solidity';
47
47
  import '@uniswap/router-sdk';
48
48
  import '@ethersproject/units';
49
49
  import '@ethersproject/bignumber';
50
- import './index-DapZ2ku-.js';
50
+ import './index-C5dZa9h8.js';
51
51
  import 'sns-validator';
@@ -1,6 +1,6 @@
1
- import { B as BlockchainData } from './index-CQzW4yCk.js';
2
- import { h as handle } from './index-DapZ2ku-.js';
3
- import { t as track, e as setEnvironment, f as setPublishableApiKey } from './index-NsFmPsjG.js';
1
+ import { B as BlockchainData } from './index-BMVKFfI3.js';
2
+ import { h as handle } from './index-C5dZa9h8.js';
3
+ import { t as track, e as setEnvironment, f as setPublishableApiKey } from './index-CT1lxIie.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-_fyIXCv4.js';
2
- import './index-CQzW4yCk.js';
3
- import './index-BbhTeUXz.js';
1
+ export { M as MintingBackendModule, a as mintingPersistencePg, b as mintingPersistencePrismaSqlite, p as processMint, r as recordMint, s as submitMintingRequests } from './minting_backend-hauL8CIc.js';
2
+ import './index-BMVKFfI3.js';
3
+ import './index-B0s6HA0V.js';
4
4
  import 'axios';
5
- import './index-NsFmPsjG.js';
5
+ import './index-CT1lxIie.js';
6
6
  import 'lru-memorise';
7
7
  import 'global-const';
8
- import './index-DapZ2ku-.js';
8
+ import './index-C5dZa9h8.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-D1AT1fME.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-CnoYoD3G.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-D1AT1fME.js';
2
- import './index-NsFmPsjG.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-CnoYoD3G.js';
2
+ import './index-CT1lxIie.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-BbhTeUXz.js';
3
- import { I as IMXClient, s as signRaw, c as convertToSignableToken, g as generateLegacyStarkPrivateKey, a as createStarkSigner } from './index-Ch8ga-mA.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-NsFmPsjG.js';
2
+ import { M as MultiRollupApiClients, c as createConfig, m as multiRollupConfig, a as index$1, I as ImxApiClients, b as imxApiConfig } from './index-B0s6HA0V.js';
3
+ import { I as IMXClient, s as signRaw, c as convertToSignableToken, g as generateLegacyStarkPrivateKey, a as createStarkSigner } from './index-B8jjqB1D.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-CT1lxIie.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';
@@ -3096,13 +3096,19 @@ class ZkEvmProvider {
3096
3096
  this.#providerEventEmitter = new TypedEventEmitter();
3097
3097
  // Automatically connect an existing user session to Passport
3098
3098
  this.#authManager.getUser().then((user) => {
3099
- if (user && isZkEvmUser(user)) {
3099
+ if (user) {
3100
3100
  this.#initialiseEthSigner(user);
3101
+ if (isZkEvmUser(user)) {
3102
+ this.#callSessionActivity(user.zkEvm.ethAddress);
3103
+ }
3104
+ }
3105
+ }).catch(); // User does not exist, don't initialise an eth signer
3106
+ passportEventEmitter.on(PassportEvents.LOGGED_IN, (user) => {
3107
+ this.#initialiseEthSigner(user);
3108
+ if (isZkEvmUser(user)) {
3109
+ this.#callSessionActivity(user.zkEvm.ethAddress);
3101
3110
  }
3102
- }).catch(() => {
3103
- // User does not exist, don't initialise an eth signer
3104
3111
  });
3105
- passportEventEmitter.on(PassportEvents.LOGGED_IN, (user) => this.#initialiseEthSigner(user));
3106
3112
  passportEventEmitter.on(PassportEvents.LOGGED_OUT, this.#handleLogout);
3107
3113
  passportEventEmitter.on(PassportEvents.ACCOUNTS_REQUESTED, trackSessionActivity);
3108
3114
  }
@@ -3197,7 +3203,9 @@ class ZkEvmProvider {
3197
3203
  try {
3198
3204
  const user = await this.#authManager.getUserOrLogin();
3199
3205
  flow.addEvent('endGetUserOrLogin');
3200
- this.#initialiseEthSigner(user);
3206
+ if (!this.#ethSigner) {
3207
+ this.#initialiseEthSigner(user);
3208
+ }
3201
3209
  let userZkEvmEthAddress;
3202
3210
  if (!isZkEvmUser(user)) {
3203
3211
  flow.addEvent('startUserRegistration');
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-cDED9af7.js';
1
+ export { J as JsonRpcError, P as Passport, a as PassportError, b as ProviderErrorCode, c as ProviderEvent, R as RpcErrorCode } from './passport-Bhp5RpCq.js';
2
2
  import 'axios';
3
- import './index-BbhTeUXz.js';
4
- import './index-Ch8ga-mA.js';
5
- import './index-NsFmPsjG.js';
3
+ import './index-B0s6HA0V.js';
4
+ import './index-B8jjqB1D.js';
5
+ import './index-CT1lxIie.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-DapZ2ku-.js';
1
+ import { h as handle } from './index-C5dZa9h8.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-DapZ2ku-.js';
1
+ export { h as handle } from './index-C5dZa9h8.js';
2
2
  import 'sns-validator';
3
- import './index-NsFmPsjG.js';
3
+ import './index-CT1lxIie.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 PrimarySalesApi, o as ProjectsApi, T as TokensApi, p as TradesApi, q as TransfersApi, U as UsersApi, W as WithdrawalsApi, r as createConfig, t as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, w as production, x as sandbox, y as serializePackedSignature, z as starkEcOrder } from './index-Ch8ga-mA.js';
2
- import { d as index$2 } from './index-BbhTeUXz.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 PrimarySalesApi, o as ProjectsApi, T as TokensApi, p as TradesApi, q as TransfersApi, U as UsersApi, W as WithdrawalsApi, r as createConfig, t as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, w as production, x as sandbox, y as serializePackedSignature, z as starkEcOrder } from './index-B8jjqB1D.js';
2
+ import { d as index$2 } from './index-B0s6HA0V.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-NsFmPsjG.js';
9
+ import { E as Environment, I as ImmutableConfiguration } from './index-CT1lxIie.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 PrimarySalesApi, o as ProjectsApi, T as TokensApi, p as TradesApi, q as TransfersApi, U as UsersApi, W as WithdrawalsApi, r as createConfig, t as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, a as imxClientCreateStarkSigner, g as imxClientGenerateLegacyStarkPrivateKey, w as production, x as sandbox, y as serializePackedSignature, f as signRegisterEthAddress, z as starkEcOrder } from './index-Ch8ga-mA.js';
2
- export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-CNTPAuxH.js';
3
- export { E as Environment, I as ImmutableConfiguration } from './index-NsFmPsjG.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 PrimarySalesApi, o as ProjectsApi, T as TokensApi, p as TradesApi, q as TransfersApi, U as UsersApi, W as WithdrawalsApi, r as createConfig, t as createImmutableXConfiguration, a as createStarkSigner, g as generateLegacyStarkPrivateKey, u as generateStarkPrivateKey, v as imxClientConfig, a as imxClientCreateStarkSigner, g as imxClientGenerateLegacyStarkPrivateKey, w as production, x as sandbox, y as serializePackedSignature, f as signRegisterEthAddress, z as starkEcOrder } from './index-B8jjqB1D.js';
2
+ export { G as GenericIMXProvider, M as MetaMaskIMXProvider, P as ProviderConfiguration } from './x-BnYJS4e5.js';
3
+ export { E as Environment, I as ImmutableConfiguration } from './index-CT1lxIie.js';
4
4
  export { Signer as EthSigner } from '@ethersproject/abstract-signer';
5
- import './index-BbhTeUXz.js';
5
+ import './index-B0s6HA0V.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.53.1",
4
+ "version": "1.53.2",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",