@imtbl/sdk 1.78.1 → 1.78.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.
Files changed (55) hide show
  1. package/dist/{blockchain_data-dtlp9hdb.js → blockchain_data-DXU4U01i.js} +2 -2
  2. package/dist/blockchain_data.js +3 -3
  3. package/dist/browser/checkout/{AddTokensWidget-phRi8isq.js → AddTokensWidget-hN4Oz8Ns.js} +3 -3
  4. package/dist/browser/checkout/{BridgeWidget-DqBqp6iY.js → BridgeWidget-A_pLUANI.js} +6 -6
  5. package/dist/browser/checkout/{CommerceWidget-BakoRfZj.js → CommerceWidget-BoKaAY5y.js} +13 -13
  6. package/dist/browser/checkout/{FeesBreakdown-BeOGIvgY.js → FeesBreakdown-Cnmi6JuS.js} +1 -1
  7. package/dist/browser/checkout/{OnRampWidget-BID9kc9s.js → OnRampWidget-CYqTRHSC.js} +3 -3
  8. package/dist/browser/checkout/{SaleWidget-B6lZ8hGg.js → SaleWidget-DIW0k6AY.js} +10 -10
  9. package/dist/browser/checkout/{SpendingCapHero-DW6X8cGr.js → SpendingCapHero-Dp3KVsiY.js} +1 -1
  10. package/dist/browser/checkout/SwapWidget-CO4Ks4Im.js +1850 -0
  11. package/dist/browser/checkout/{TokenImage-DtkH2h2e.js → TokenImage-BNq0SnBY.js} +1 -1
  12. package/dist/browser/checkout/{TopUpView-BoCJELBq.js → TopUpView-CHsQmxQQ.js} +1 -1
  13. package/dist/browser/checkout/{WalletApproveHero-BxkUQIWN.js → WalletApproveHero-Bj4aKxP9.js} +3 -3
  14. package/dist/browser/checkout/{WalletWidget-C8iWV1OY.js → WalletWidget-BsKIkdBf.js} +3 -3
  15. package/dist/browser/checkout/{auto-track-Densi2-k.js → auto-track-BM5HqFI3.js} +1 -1
  16. package/dist/browser/checkout/{index-C-4DEd8a.js → index-BDZfw_Cp.js} +27 -135
  17. package/dist/browser/checkout/{index-CGZ3kTp1.js → index-CNJ98XFR.js} +2 -2
  18. package/dist/browser/checkout/{index-DSuIrOmV.js → index-Cp7l-bwg.js} +1 -1
  19. package/dist/browser/checkout/{index-CJ-HyQqV.js → index-D-MV_CPF.js} +1 -1
  20. package/dist/browser/checkout/{index-Djor6tHu.js → index-D0Nv1xcY.js} +1 -1
  21. package/dist/browser/checkout/{index-fbNLtQZy.js → index-D9AyMqDS.js} +1 -1
  22. package/dist/browser/checkout/{index-Bz7QkIrz.js → index-DatkoxOH.js} +1 -1
  23. package/dist/browser/checkout/{index-BWF1wMhZ.js → index-DubSxoZp.js} +1 -1
  24. package/dist/browser/checkout/{index.umd-BI-_-mXw.js → index.umd-Dyg-Hme-.js} +1 -1
  25. package/dist/browser/checkout/sdk.js +4 -4
  26. package/dist/browser/checkout/{useInterval-CfVGG_W7.js → useInterval-WSD1wTJp.js} +1 -1
  27. package/dist/browser/checkout/widgets-esm.js +1 -1
  28. package/dist/browser/checkout/widgets.js +181 -177
  29. package/dist/{checkout-B-BLfuyF.js → checkout-BcLZx2nl.js} +5 -11
  30. package/dist/checkout.js +5 -5
  31. package/dist/{config-DK_IUjmj.js → config-AmjUeqX0.js} +1 -1
  32. package/dist/config.js +1 -1
  33. package/dist/{index-2-Yhh8Lo.js → index-B7K98OVK.js} +1 -1
  34. package/dist/{index-wc_sNfXQ.js → index-Bgucm0s0.js} +3 -3
  35. package/dist/{index-B0oHQE2a.js → index-CT3wTyhk.js} +1 -1
  36. package/dist/{index-DmDCdEAA.js → index-DONwAU5q.js} +8 -5
  37. package/dist/{index-Bi3YfX-o.js → index-DW7yzuKO.js} +1 -1
  38. package/dist/{index-8TTFjDjB.js → index-UkqN57JB.js} +4 -4
  39. package/dist/index.browser.js +5 -5
  40. package/dist/index.browser.js.map +1 -1
  41. package/dist/index.cjs +64 -53
  42. package/dist/index.js +14 -14
  43. package/dist/{minting_backend-Blarurl3.js → minting_backend-Bfjb4y_D.js} +3 -3
  44. package/dist/minting_backend.js +5 -5
  45. package/dist/{orderbook-C8nW30oG.js → orderbook-730LCA9X.js} +1 -1
  46. package/dist/orderbook.js +2 -2
  47. package/dist/{passport-Dn-dJ0as.js → passport-CxcuwLFF.js} +53 -39
  48. package/dist/passport.js +4 -4
  49. package/dist/version.json +1 -1
  50. package/dist/{webhook-Bk8qJg4f.js → webhook-DGMGtPc_.js} +1 -1
  51. package/dist/webhook.js +2 -2
  52. package/dist/{x-BTBIq3r-.js → x-Ca_Tzy97.js} +3 -3
  53. package/dist/x.js +4 -4
  54. package/package.json +1 -1
  55. package/dist/browser/checkout/SwapWidget-UFkXHv2L.js +0 -1738
@@ -1,4 +1,4 @@
1
- import { E as Environment$1, t as track, I as ImmutableConfiguration } from './index-DmDCdEAA.js';
1
+ import { E as Environment$1, t as track, I as ImmutableConfiguration } from './index-DONwAU5q.js';
2
2
  import globalAxios, { HttpStatusCode as HttpStatusCode$1 } from 'axios';
3
3
  import { ethers, BigNumber as BigNumber$1, ContractFactory, utils as utils$2, Contract as Contract$1 } from 'ethers';
4
4
  import { Web3Provider, JsonRpcProvider } from '@ethersproject/providers';
@@ -8,8 +8,8 @@ import assert from 'assert';
8
8
  import { FeeAmount, Route, SwapQuoter, Pool, Trade, toHex as toHex$1, encodeRouteToPath } from '@uniswap/v3-sdk';
9
9
  import { keccak256 as keccak256$1 } from '@ethersproject/solidity';
10
10
  import { SwapRouter, PaymentsExtended } from '@uniswap/router-sdk';
11
- import { c as constants, O as OrderStatusName, a as Orderbook, A as ActionType, T as TransactionPurpose, S as SignablePurpose } from './index-Bi3YfX-o.js';
12
- import { B as BlockchainData } from './index-wc_sNfXQ.js';
11
+ import { c as constants, O as OrderStatusName, a as Orderbook, A as ActionType, T as TransactionPurpose, S as SignablePurpose } from './index-DW7yzuKO.js';
12
+ import { B as BlockchainData } from './index-Bgucm0s0.js';
13
13
  import detectEthereumProvider from '@metamask/detect-provider';
14
14
  import semver from 'semver';
15
15
 
@@ -19207,7 +19207,7 @@ const flattenProperties = (properties) => {
19207
19207
  };
19208
19208
 
19209
19209
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
19210
- const SDK_VERSION = '1.78.1';
19210
+ const SDK_VERSION = '1.78.2';
19211
19211
  const getFrameParentDomain = () => {
19212
19212
  if (isNode()) {
19213
19213
  return '';
@@ -24328,7 +24328,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
24328
24328
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
24329
24329
  };
24330
24330
 
24331
- const SDK_VERSION_MARKER = '1.78.1';
24331
+ const SDK_VERSION_MARKER = '1.78.2';
24332
24332
  // This SDK version is replaced by the `yarn build` command ran on the root level
24333
24333
  const globalPackageVersion = () => SDK_VERSION_MARKER;
24334
24334
 
@@ -29070,7 +29070,6 @@ class Checkout {
29070
29070
  this.passport = config.passport;
29071
29071
  // Initialise injected providers via EIP-6963
29072
29072
  InjectedProvidersManager.getInstance().initialise();
29073
- track('checkout_sdk', 'initialised');
29074
29073
  }
29075
29074
  /**
29076
29075
  * Loads the widgets bundle and initiate the widgets factory.
@@ -29084,11 +29083,6 @@ class Checkout {
29084
29083
  const validatedBuildVersion = validateAndBuildVersion(init.version);
29085
29084
  const initVersionProvided = init.version !== undefined;
29086
29085
  const widgetsVersion = await determineWidgetsVersion(validatedBuildVersion, initVersionProvided, versionConfig);
29087
- track('checkout_sdk', 'widgets', {
29088
- sdkVersion: globalPackageVersion(),
29089
- validatedSdkVersion: validatedBuildVersion,
29090
- widgetsVersion,
29091
- });
29092
29086
  try {
29093
29087
  const factory = await this.loadEsModules(init.config, widgetsVersion);
29094
29088
  return factory;
package/dist/checkout.js CHANGED
@@ -1,5 +1,5 @@
1
- export { A as AddTokensEventType, B as BlockExplorerService, a as BridgeEventType, C as ChainId, b as ChainName, d as ChainSlug, e as Checkout, f as CheckoutConfiguration, g as CheckoutError, h as CheckoutErrorType, i as CheckoutStatus, j as CommerceEventType, k as CommerceFailureEventType, l as CommerceFlowType, m as CommerceSuccessEventType, n as CommerceUserActionEventType, o as ConnectEventType, p as ConnectTargetLayer, E as ExchangeType, F as FeeType, q as FundingStepType, G as GasEstimateType, r as GasTokenType, I as IMMUTABLE_API_BASE_URL, s as IMTBLWidgetEvents, t as ItemType, N as NetworkFilterTypes, O as OnRampEventType, u as OrchestrationEventType, P as ProviderEventType, v as PurchaseEventType, R as RoutingOutcomeType, S as SaleEventType, w as SalePaymentTypes, x as SwapDirection, y as SwapEventType, T as TokenFilterTypes, z as TransactionOrGasType, W as WalletEventType, D as WalletFilterTypes, H as WalletProviderName, J as WalletProviderRdns, K as WidgetTheme, L as WidgetType, M as fetchRiskAssessment, Q as getMetaMaskProviderDetail, U as getPassportProviderDetail, V as isAddressSanctioned, X as validateProvider } from './checkout-B-BLfuyF.js';
2
- import './index-DmDCdEAA.js';
1
+ export { A as AddTokensEventType, B as BlockExplorerService, a as BridgeEventType, C as ChainId, b as ChainName, d as ChainSlug, e as Checkout, f as CheckoutConfiguration, g as CheckoutError, h as CheckoutErrorType, i as CheckoutStatus, j as CommerceEventType, k as CommerceFailureEventType, l as CommerceFlowType, m as CommerceSuccessEventType, n as CommerceUserActionEventType, o as ConnectEventType, p as ConnectTargetLayer, E as ExchangeType, F as FeeType, q as FundingStepType, G as GasEstimateType, r as GasTokenType, I as IMMUTABLE_API_BASE_URL, s as IMTBLWidgetEvents, t as ItemType, N as NetworkFilterTypes, O as OnRampEventType, u as OrchestrationEventType, P as ProviderEventType, v as PurchaseEventType, R as RoutingOutcomeType, S as SaleEventType, w as SalePaymentTypes, x as SwapDirection, y as SwapEventType, T as TokenFilterTypes, z as TransactionOrGasType, W as WalletEventType, D as WalletFilterTypes, H as WalletProviderName, J as WalletProviderRdns, K as WidgetTheme, L as WidgetType, M as fetchRiskAssessment, Q as getMetaMaskProviderDetail, U as getPassportProviderDetail, V as isAddressSanctioned, X as validateProvider } from './checkout-BcLZx2nl.js';
2
+ import './index-DONwAU5q.js';
3
3
  import 'axios';
4
4
  import 'lru-memorise';
5
5
  import 'global-const';
@@ -10,12 +10,12 @@ import 'assert';
10
10
  import '@uniswap/v3-sdk';
11
11
  import '@ethersproject/solidity';
12
12
  import '@uniswap/router-sdk';
13
- import './index-Bi3YfX-o.js';
13
+ import './index-DW7yzuKO.js';
14
14
  import 'form-data';
15
15
  import 'ethers-v6';
16
16
  import 'merkletreejs';
17
17
  import '@opensea/seaport-js';
18
- import './index-wc_sNfXQ.js';
19
- import './index-2-Yhh8Lo.js';
18
+ import './index-Bgucm0s0.js';
19
+ import './index-B7K98OVK.js';
20
20
  import '@metamask/detect-provider';
21
21
  import 'semver';
@@ -1,4 +1,4 @@
1
- import { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-DmDCdEAA.js';
1
+ import { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-DONwAU5q.js';
2
2
 
3
3
  var config = /*#__PURE__*/Object.freeze({
4
4
  __proto__: null,
package/dist/config.js CHANGED
@@ -1,4 +1,4 @@
1
- export { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-DmDCdEAA.js';
1
+ export { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-DONwAU5q.js';
2
2
  import 'axios';
3
3
  import 'lru-memorise';
4
4
  import 'global-const';
@@ -14336,7 +14336,7 @@ class MultiRollupApiClients {
14336
14336
  }
14337
14337
 
14338
14338
  // eslint-disable-next-line @typescript-eslint/naming-convention
14339
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.78.1' };
14339
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.78.2' };
14340
14340
  const createConfig = ({ basePath, headers, }) => {
14341
14341
  if (!basePath.trim()) {
14342
14342
  throw Error('basePath can not be empty');
@@ -1,5 +1,5 @@
1
- import { a as index$1 } from './index-2-Yhh8Lo.js';
2
- import { E as Environment, a as addKeysToHeadersOverride } from './index-DmDCdEAA.js';
1
+ import { a as index$1 } from './index-B7K98OVK.js';
2
+ import { E as Environment, a as addKeysToHeadersOverride } from './index-DONwAU5q.js';
3
3
  import globalAxios from 'axios';
4
4
 
5
5
  /**
@@ -21,7 +21,7 @@ class APIError extends Error {
21
21
 
22
22
  /* eslint-disable implicit-arrow-linebreak */
23
23
  const defaultHeaders = {
24
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.78.1',
24
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.78.2',
25
25
  };
26
26
  /**
27
27
  * createAPIConfiguration to create a custom Configuration
@@ -1,5 +1,5 @@
1
1
  import MessageValidator from 'sns-validator';
2
- import { E as Environment } from './index-DmDCdEAA.js';
2
+ import { E as Environment } from './index-DONwAU5q.js';
3
3
 
4
4
  const validator = new MessageValidator();
5
5
  const allowedTopicArnPrefix = {
@@ -158,7 +158,7 @@ const flattenProperties = (properties) => {
158
158
  };
159
159
 
160
160
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
161
- const SDK_VERSION = '1.78.1';
161
+ const SDK_VERSION = '1.78.2';
162
162
  const getFrameParentDomain = () => {
163
163
  if (isNode()) {
164
164
  return '';
@@ -398,7 +398,7 @@ const mergeProperties = (...args) => {
398
398
  };
399
399
  const cleanEventName = (eventName) => eventName.replace(/[^a-zA-Z0-9\s\-_]/g, '');
400
400
  const getEventName = (flowName, eventName) => `${flowName}_${cleanEventName(eventName)}`;
401
- const trackFlowFn = (moduleName, flowName, properties) => {
401
+ const trackFlowFn = (moduleName, flowName, trackStartEvent = true, properties) => {
402
402
  // Track the start of the flow
403
403
  const flowId = generateFlowId();
404
404
  const flowStartTime = Date.now();
@@ -434,8 +434,10 @@ const trackFlowFn = (moduleName, flowName, properties) => {
434
434
  currentStepCount++;
435
435
  previousStepTime = currentTime;
436
436
  };
437
- // Trigger a Start Event as a record of creating the flow
438
- addEvent('Start');
437
+ if (trackStartEvent) {
438
+ // Trigger a Start Event as a record of creating the flow
439
+ addEvent('Start');
440
+ }
439
441
  return {
440
442
  details: {
441
443
  moduleName,
@@ -452,11 +454,12 @@ const trackFlowFn = (moduleName, flowName, properties) => {
452
454
  * Works similarly to `track`
453
455
  * @param moduleName Name of the module being tracked (for namespacing purposes), e.g. `passport`
454
456
  * @param flowName Name of the flow, e.g. `performTransaction`
457
+ * @param trackStartEvent Whether to track the start event in the flow
455
458
  * @param properties Other properties to be sent with the event, other than duration
456
459
  *
457
460
  * @example
458
461
  * ```ts
459
- * const flow = trackFlow("passport", "performTransaction", { transationType: "transfer" });
462
+ * const flow = trackFlow("passport", "performTransaction", true, { transationType: "transfer" });
460
463
  * // Do something...
461
464
  * flow.addEvent("clickItem");
462
465
  * // Do something...
@@ -1,4 +1,4 @@
1
- import { t as track, E as Environment } from './index-DmDCdEAA.js';
1
+ import { t as track, E as Environment } from './index-DONwAU5q.js';
2
2
  import globalAxios from 'axios';
3
3
  import FormData from 'form-data';
4
4
  import { providers, BigNumber, constants as constants$1 } from 'ethers';
@@ -1,5 +1,5 @@
1
- import { d as index$2, I as ImxApiClients } from './index-2-Yhh8Lo.js';
2
- import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-DmDCdEAA.js';
1
+ import { d as index$2, I as ImxApiClients } from './index-B7K98OVK.js';
2
+ import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-DONwAU5q.js';
3
3
  import globalAxios from 'axios';
4
4
  import { keccak256 } from '@ethersproject/keccak256';
5
5
  import { toUtf8Bytes } from '@ethersproject/strings';
@@ -16,7 +16,7 @@ import '@ethersproject/abstract-signer';
16
16
  /* eslint-disable @typescript-eslint/naming-convention */
17
17
  class ApiConfiguration extends index$2.Configuration {
18
18
  }
19
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.78.1' };
19
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.78.2' };
20
20
  /**
21
21
  * @dev use createImmutableXConfiguration instead
22
22
  */
@@ -57,7 +57,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
57
57
  coreContractAddress,
58
58
  registrationContractAddress,
59
59
  registrationV4ContractAddress,
60
- sdkVersion: 'ts-immutable-sdk-1.78.1',
60
+ sdkVersion: 'ts-immutable-sdk-1.78.2',
61
61
  baseConfig,
62
62
  });
63
63
  const production = ({ baseConfig }) => createImmutableXConfiguration({