@imtbl/sdk 1.57.0 → 1.58.0-alpha.1

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 (59) hide show
  1. package/dist/{blockchain_data-BtWkKJIA.js → blockchain_data-D7o0ZtSB.js} +2 -2
  2. package/dist/blockchain_data.js +3 -3
  3. package/dist/browser/checkout/{AddFundsWidget-C_PbSgrh.js → AddFundsWidget-CBpqFdXg.js} +171 -150
  4. package/dist/browser/checkout/{BridgeWidget-n8xOPTQ2.js → BridgeWidget-CK-16Ram.js} +8 -8
  5. package/dist/browser/checkout/{CheckoutWidget-kQ-Im8vB.js → CheckoutWidget-kZ_OIaYZ.js} +16 -16
  6. package/dist/browser/checkout/{EllipsizedText-Ppn9TC1R.js → EllipsizedText-LsUPzOyP.js} +1 -1
  7. package/dist/browser/checkout/{FeesBreakdown-k6lIF8xc.js → FeesBreakdown-DlgNKBj2.js} +1 -1
  8. package/dist/browser/checkout/{HandoverContent-8S6KoHhH.js → HandoverContent-BCPs3VIn.js} +1 -1
  9. package/dist/browser/checkout/{OnRampWidget-v4Op5f05.js → OnRampWidget-C7ikQ_eo.js} +3 -3
  10. package/dist/browser/checkout/{SaleWidget-CmGSUnEX.js → SaleWidget-DMJy-WyV.js} +13 -13
  11. package/dist/browser/checkout/{SpendingCapHero-CDj3Iw9j.js → SpendingCapHero-OVoigFRV.js} +1 -1
  12. package/dist/browser/checkout/{SwapWidget-DDg7cV7V.js → SwapWidget-CrJW0amT.js} +8 -8
  13. package/dist/browser/checkout/{TopUpView-C_ACzI2Q.js → TopUpView-DSklv2kR.js} +2 -2
  14. package/dist/browser/checkout/{WalletWidget--bOcJPeF.js → WalletWidget-B8c13NPd.js} +5 -5
  15. package/dist/browser/checkout/{auto-track-BNEtiRai.js → auto-track-BhnQ9ccO.js} +1 -1
  16. package/dist/browser/checkout/{balance-3-nAoqgO.js → balance-CDxHroiE.js} +3 -3
  17. package/dist/browser/checkout/{index-BZOpAz8z.js → index-3iWJeWjf.js} +1 -1
  18. package/dist/browser/checkout/{index-ClpwX2z9.js → index-7laMaHRP.js} +130 -28
  19. package/dist/browser/checkout/{index-iN9TbfIB.js → index-C3onAaIn.js} +1 -1
  20. package/dist/browser/checkout/{index-BMKU17nO.js → index-C6fRY67u.js} +1 -1
  21. package/dist/browser/checkout/{index-9nmTUuc5.js → index-CI9vWg0-.js} +1 -1
  22. package/dist/browser/checkout/{index-WUiS3XIP.js → index-CXsH55ff.js} +2 -2
  23. package/dist/browser/checkout/{index-D6xurPdk.js → index-DLE7kBGV.js} +1 -1
  24. package/dist/browser/checkout/{index-DUWR3KD0.js → index-DSext20o.js} +1 -1
  25. package/dist/browser/checkout/{index-BD7XwXYb.js → index-Dzu3g9vw.js} +1 -1
  26. package/dist/browser/checkout/{index.umd--iUfBvJV.js → index.umd-DtCdhs0n.js} +1 -1
  27. package/dist/browser/checkout/{retry-D5EXmyEZ.js → retry-Cwu6w9u4.js} +1 -1
  28. package/dist/browser/checkout/sdk.js +5 -5
  29. package/dist/browser/checkout/{useInterval-Tf0MmB55.js → useInterval-LrCr7E5F.js} +1 -1
  30. package/dist/browser/checkout/widgets-esm.js +1 -1
  31. package/dist/browser/checkout/widgets.js +278 -155
  32. package/dist/{checkout-YSKtCNzS.js → checkout-CQ3Y5SOe.js} +7 -8
  33. package/dist/checkout.d.ts +30 -5
  34. package/dist/checkout.js +5 -5
  35. package/dist/{config-lzHVTMnS.js → config-DxDNWshs.js} +1 -1
  36. package/dist/config.js +1 -1
  37. package/dist/{index-Cl5xYcTa.js → index-BSqwXo2x.js} +1 -1
  38. package/dist/{index-BBLIOOxO.js → index-C71avKQW.js} +1 -1
  39. package/dist/{index-DCJMvVVX.js → index-CYDJKO6O.js} +1 -1
  40. package/dist/{index-DCRICFBo.js → index-C_lWrKsx.js} +1 -1
  41. package/dist/{index-B4K4memG.js → index-QUgOBwkD.js} +4 -4
  42. package/dist/{index-C2PMWCyz.js → index-dC1LBzrF.js} +3 -3
  43. package/dist/index.browser.js +5 -5
  44. package/dist/index.browser.js.map +1 -1
  45. package/dist/index.cjs +14 -13
  46. package/dist/index.d.ts +30 -5
  47. package/dist/index.js +14 -14
  48. package/dist/{minting_backend-BeyswK6a.js → minting_backend-BA0c3E7R.js} +3 -3
  49. package/dist/minting_backend.js +5 -5
  50. package/dist/{orderbook-DgElnB3K.js → orderbook-CTn6hQxS.js} +1 -1
  51. package/dist/orderbook.js +2 -2
  52. package/dist/{passport-zkpBoEch.js → passport-DVaxtJTR.js} +8 -6
  53. package/dist/passport.d.ts +5 -0
  54. package/dist/passport.js +4 -4
  55. package/dist/{webhook-niZzHikY.js → webhook-DsgLAopo.js} +1 -1
  56. package/dist/webhook.js +2 -2
  57. package/dist/{x-CGvwkxPx.js → x-Bhn-8Nbo.js} +3 -3
  58. package/dist/x.js +4 -4
  59. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { E as Environment$1, t as track, I as ImmutableConfiguration } from './index-DCJMvVVX.js';
1
+ import { E as Environment$1, t as track, I as ImmutableConfiguration } from './index-CYDJKO6O.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-DCRICFBo.js';
12
- import { B as BlockchainData } from './index-C2PMWCyz.js';
11
+ import { c as constants, O as OrderStatusName, a as Orderbook, A as ActionType, T as TransactionPurpose, S as SignablePurpose } from './index-C_lWrKsx.js';
12
+ import { B as BlockchainData } from './index-dC1LBzrF.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.57.0';
19210
+ const SDK_VERSION = '1.58.0-alpha.1';
19211
19211
  const getFrameParentDomain = () => {
19212
19212
  if (isNode()) {
19213
19213
  return '';
@@ -23631,9 +23631,8 @@ var AddFundsEventType;
23631
23631
  AddFundsEventType["CLOSE_WIDGET"] = "close-widget";
23632
23632
  AddFundsEventType["LANGUAGE_CHANGED"] = "language-changed";
23633
23633
  AddFundsEventType["CONNECT_SUCCESS"] = "connect-success";
23634
- AddFundsEventType["REQUEST_BRIDGE"] = "request-bridge";
23635
- AddFundsEventType["REQUEST_ONRAMP"] = "request-onramp";
23636
- AddFundsEventType["REQUEST_SWAP"] = "request-swap";
23634
+ AddFundsEventType["SUCCESS"] = "success";
23635
+ AddFundsEventType["FAILURE"] = "failure";
23637
23636
  })(AddFundsEventType || (AddFundsEventType = {}));
23638
23637
 
23639
23638
  /**
@@ -24316,7 +24315,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
24316
24315
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
24317
24316
  };
24318
24317
 
24319
- const SDK_VERSION_MARKER = '1.57.0';
24318
+ const SDK_VERSION_MARKER = '1.58.0-alpha.1';
24320
24319
  // This SDK version is replaced by the `yarn build` command ran on the root level
24321
24320
  const globalPackageVersion = () => SDK_VERSION_MARKER;
24322
24321
 
@@ -11386,6 +11386,11 @@ interface PassportModuleConfiguration extends ModuleConfiguration<PassportOverri
11386
11386
  * and not directly on the web.
11387
11387
  */
11388
11388
  crossSdkBridgeEnabled?: boolean;
11389
+ /**
11390
+ * Optional referrer URL to be sent with JSON-RPC requests.
11391
+ * If specified, this value will be passed as the referrer in fetch options.
11392
+ */
11393
+ jsonRpcReferrer?: string;
11389
11394
  /**
11390
11395
  * Options for disabling the Passport popup overlays.
11391
11396
  */
@@ -12700,6 +12705,8 @@ type RemoteConfiguration = {
12700
12705
  onramp: OnRampConfig;
12701
12706
  /** The config used for the Bridge. */
12702
12707
  bridge: BridgeConfig;
12708
+ /** The config used for Add Funds */
12709
+ addfunds: AddFundsConfig;
12703
12710
  /** An array representing the allowed networks. */
12704
12711
  allowedNetworks: AllowedNetworkConfig[];
12705
12712
  /** The config for the tokens used to estimate gas. */
@@ -12713,6 +12720,14 @@ type RemoteConfiguration = {
12713
12720
  /** The checkout version info. */
12714
12721
  checkoutWidgetsVersion: CheckoutWidgetsVersionConfig;
12715
12722
  };
12723
+ /**
12724
+ * A type representing the configuration for the Add Funds.
12725
+ * @property {TokenInfo[] | undefined} tokens
12726
+ */
12727
+ type AddFundsConfig = {
12728
+ /** A boolean value for enabling/disabling Add Funds */
12729
+ enabled: boolean;
12730
+ };
12716
12731
  /**
12717
12732
  * A type representing the fee structure for an OnRamp provider
12718
12733
  * @property {string | undefined} minPercentage
@@ -13905,12 +13920,19 @@ type RequestOnrampEvent = {
13905
13920
  /**
13906
13921
  * Represents the add funds event object when the add funds widget is requested.
13907
13922
  */
13908
- type RequestAddFundsEvent = {};
13923
+ type RequestAddFundsEvent = {
13924
+ /** Token address of the fund to be added */
13925
+ toTokenAddress?: string;
13926
+ /** Amount of the fund to be added */
13927
+ toAmount?: string;
13928
+ /** Whether to show a back button on the first screen, on click triggers REQUEST_GO_BACK event */
13929
+ showBackButton?: boolean;
13930
+ };
13909
13931
  /**
13910
13932
  * Represents the object provide after go back event is requested
13911
13933
  */
13912
13934
  type RequestGoBackEvent = {};
13913
- type OrchestrationEventData = RequestConnectEvent | RequestWalletEvent | RequestSwapEvent | RequestBridgeEvent | RequestOnrampEvent | RequestGoBackEvent;
13935
+ type OrchestrationEventData = RequestConnectEvent | RequestWalletEvent | RequestSwapEvent | RequestBridgeEvent | RequestOnrampEvent | RequestGoBackEvent | RequestAddFundsEvent;
13914
13936
 
13915
13937
  /**
13916
13938
  * Enum of possible OnRamp Widget event types.
@@ -13948,9 +13970,8 @@ declare enum AddFundsEventType {
13948
13970
  CLOSE_WIDGET = "close-widget",
13949
13971
  LANGUAGE_CHANGED = "language-changed",
13950
13972
  CONNECT_SUCCESS = "connect-success",
13951
- REQUEST_BRIDGE = "request-bridge",
13952
- REQUEST_ONRAMP = "request-onramp",
13953
- REQUEST_SWAP = "request-swap"
13973
+ SUCCESS = "success",
13974
+ FAILURE = "failure"
13954
13975
  }
13955
13976
  /**
13956
13977
  * Represents a successful add funds transaction.
@@ -14124,6 +14145,8 @@ type AddFundsWidgetParams = {
14124
14145
  toAmount?: string;
14125
14146
  /** Whether to show a back button on the first screen, on click triggers REQUEST_GO_BACK event */
14126
14147
  showBackButton?: boolean;
14148
+ /** The destination wallet provider, when requiring to lock destination of funds */
14149
+ toProvider?: Web3Provider;
14127
14150
  };
14128
14151
 
14129
14152
  declare enum ConnectTargetLayer {
@@ -14429,6 +14452,8 @@ type WidgetEventData = {
14429
14452
  [WidgetType.ADD_FUNDS]: {
14430
14453
  [AddFundsEventType.CLOSE_WIDGET]: {};
14431
14454
  [AddFundsEventType.CONNECT_SUCCESS]: AddFundsConnectSuccess;
14455
+ [AddFundsEventType.SUCCESS]: AddFundsSuccess;
14456
+ [AddFundsEventType.FAILURE]: AddFundsFailed;
14432
14457
  } & OrchestrationMapping & ProviderEventMapping;
14433
14458
  };
14434
14459
  /**
package/dist/checkout.js CHANGED
@@ -1,5 +1,5 @@
1
- export { A as AddFundsEventType, 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 CheckoutEventType, j as CheckoutFailureEventType, k as CheckoutFlowType, l as CheckoutStatus, m as CheckoutSuccessEventType, n as CheckoutUserActionEventType, 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 PostMessageHandler, v as PostMessageHandlerEventType, w as ProviderEventType, R as RoutingOutcomeType, S as SaleEventType, x as SalePaymentTypes, y as SwapDirection, z as SwapEventType, T as TokenFilterTypes, D as TransactionOrGasType, W as WalletEventType, H as WalletFilterTypes, J as WalletProviderName, K as WalletProviderRdns, L as WidgetTheme, M as WidgetType, Q as getMetaMaskProviderDetail, U as getPassportProviderDetail, V as isAddressSanctioned, X as validateProvider } from './checkout-YSKtCNzS.js';
2
- import './index-DCJMvVVX.js';
1
+ export { A as AddFundsEventType, 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 CheckoutEventType, j as CheckoutFailureEventType, k as CheckoutFlowType, l as CheckoutStatus, m as CheckoutSuccessEventType, n as CheckoutUserActionEventType, 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 PostMessageHandler, v as PostMessageHandlerEventType, w as ProviderEventType, R as RoutingOutcomeType, S as SaleEventType, x as SalePaymentTypes, y as SwapDirection, z as SwapEventType, T as TokenFilterTypes, D as TransactionOrGasType, W as WalletEventType, H as WalletFilterTypes, J as WalletProviderName, K as WalletProviderRdns, L as WidgetTheme, M as WidgetType, Q as getMetaMaskProviderDetail, U as getPassportProviderDetail, V as isAddressSanctioned, X as validateProvider } from './checkout-CQ3Y5SOe.js';
2
+ import './index-CYDJKO6O.js';
3
3
  import 'axios';
4
4
  import 'lru-memorise';
5
5
  import 'global-const';
@@ -10,13 +10,13 @@ import 'assert';
10
10
  import '@uniswap/v3-sdk';
11
11
  import '@ethersproject/solidity';
12
12
  import '@uniswap/router-sdk';
13
- import './index-DCRICFBo.js';
13
+ import './index-C_lWrKsx.js';
14
14
  import 'form-data';
15
15
  import '@opensea/seaport-js/lib/constants';
16
16
  import 'ethers-v6';
17
17
  import 'merkletreejs';
18
18
  import '@opensea/seaport-js';
19
- import './index-C2PMWCyz.js';
20
- import './index-Cl5xYcTa.js';
19
+ import './index-dC1LBzrF.js';
20
+ import './index-BSqwXo2x.js';
21
21
  import '@metamask/detect-provider';
22
22
  import 'semver';
@@ -1,4 +1,4 @@
1
- import { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-DCJMvVVX.js';
1
+ import { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-CYDJKO6O.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-DCJMvVVX.js';
1
+ export { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-CYDJKO6O.js';
2
2
  import 'axios';
3
3
  import 'lru-memorise';
4
4
  import 'global-const';
@@ -13527,7 +13527,7 @@ class MultiRollupApiClients {
13527
13527
  }
13528
13528
 
13529
13529
  // eslint-disable-next-line @typescript-eslint/naming-convention
13530
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.57.0' };
13530
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.58.0-alpha.1' };
13531
13531
  const createConfig = ({ basePath, headers, }) => {
13532
13532
  if (!basePath.trim()) {
13533
13533
  throw Error('basePath can not be empty');
@@ -1,5 +1,5 @@
1
1
  import MessageValidator from 'sns-validator';
2
- import { E as Environment } from './index-DCJMvVVX.js';
2
+ import { E as Environment } from './index-CYDJKO6O.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.57.0';
161
+ const SDK_VERSION = '1.58.0-alpha.1';
162
162
  const getFrameParentDomain = () => {
163
163
  if (isNode()) {
164
164
  return '';
@@ -1,4 +1,4 @@
1
- import { t as track, E as Environment } from './index-DCJMvVVX.js';
1
+ import { t as track, E as Environment } from './index-CYDJKO6O.js';
2
2
  import globalAxios from 'axios';
3
3
  import FormData from 'form-data';
4
4
  import { OrderType as OrderType$1, ItemType as ItemType$1 } from '@opensea/seaport-js/lib/constants';
@@ -1,5 +1,5 @@
1
- import { d as index$2, I as ImxApiClients } from './index-Cl5xYcTa.js';
2
- import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-DCJMvVVX.js';
1
+ import { d as index$2, I as ImxApiClients } from './index-BSqwXo2x.js';
2
+ import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-CYDJKO6O.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.57.0' };
19
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.58.0-alpha.1' };
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.57.0',
60
+ sdkVersion: 'ts-immutable-sdk-1.58.0-alpha.1',
61
61
  baseConfig,
62
62
  });
63
63
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -1,5 +1,5 @@
1
- import { a as index$1 } from './index-Cl5xYcTa.js';
2
- import { E as Environment, a as addKeysToHeadersOverride } from './index-DCJMvVVX.js';
1
+ import { a as index$1 } from './index-BSqwXo2x.js';
2
+ import { E as Environment, a as addKeysToHeadersOverride } from './index-CYDJKO6O.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.57.0',
24
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.58.0-alpha.1',
25
25
  };
26
26
  /**
27
27
  * createAPIConfiguration to create a custom Configuration