@imtbl/sdk 1.5.4-alpha.1 → 1.5.4

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 (36) hide show
  1. package/dist/blockchain_data.js +2 -2
  2. package/dist/browser/checkout/sdk.js +4 -4
  3. package/dist/browser/checkout/widgets.js +64 -63
  4. package/dist/checkout.d.ts +1 -4
  5. package/dist/checkout.js +6 -30
  6. package/dist/config.js +1 -1
  7. package/dist/index.browser.js +13 -13
  8. package/dist/index.browser.js.map +1 -1
  9. package/dist/index.cjs +8 -32
  10. package/dist/index.d.ts +1 -4
  11. package/dist/index.js +8 -32
  12. package/dist/orderbook.js +1 -1
  13. package/dist/passport.js +3 -3
  14. package/dist/x.js +2 -2
  15. package/package.json +4 -4
  16. package/dist/browser/checkout/BridgeWidget-895c2ff8.js +0 -1
  17. package/dist/browser/checkout/OnRampWidget-93e6c462.js +0 -1
  18. package/dist/browser/checkout/SaleWidget-af43a403.js +0 -2
  19. package/dist/browser/checkout/SpendingCapHero-03968ac0.js +0 -1
  20. package/dist/browser/checkout/SwapWidget-61e779d8.js +0 -1
  21. package/dist/browser/checkout/TopUpView-09a61709.js +0 -1
  22. package/dist/browser/checkout/WalletWidget-68b65814.js +0 -1
  23. package/dist/browser/checkout/auto-track-7c8945e1.js +0 -1
  24. package/dist/browser/checkout/balance-5343fb20.js +0 -1
  25. package/dist/browser/checkout/index-2657c3d3.js +0 -1
  26. package/dist/browser/checkout/index-2c059c42.js +0 -1
  27. package/dist/browser/checkout/index-3ef57b96.js +0 -1
  28. package/dist/browser/checkout/index-8130cf40.js +0 -106
  29. package/dist/browser/checkout/index-a12ebc45.js +0 -1
  30. package/dist/browser/checkout/index-d949d325.js +0 -1
  31. package/dist/browser/checkout/index-f2726576.js +0 -773
  32. package/dist/browser/checkout/index.umd-31af21e6.js +0 -1
  33. package/dist/browser/checkout/is-plan-event-enabled-80f76ce6.js +0 -1
  34. package/dist/browser/checkout/retry-07d04bc8.js +0 -1
  35. package/dist/browser/checkout/useTransakEvents-33875f8a.js +0 -2
  36. package/dist/browser/checkout/widgets-esm.js +0 -1
@@ -23736,14 +23736,11 @@ type CheckoutWidgetsConfig = {
23736
23736
  /**
23737
23737
  * Represents the configuration options for instantiating the Checkout Widgets factory.
23738
23738
  * @property {WidgetConfiguration} config - global configuration options for the widgets.
23739
- * @property {SemanticVersion | undefined} version - version of the Checkout widgets bundle(default latest version will be used).
23740
- * @property {boolean | undefined} useEsModules - Set to true to use the esm build of the widgets.
23739
+ * @property {SemanticVersion | undefined} version - version of the Checkout widgets bundle (default latest version will be used).
23741
23740
  */
23742
23741
  type WidgetsInit = {
23743
23742
  config: WidgetConfiguration;
23744
23743
  version?: SemanticVersion;
23745
- /** Loads separate parts of the widget script as required for performance improvements. */
23746
- useEsModules?: boolean;
23747
23744
  };
23748
23745
 
23749
23746
  declare class Checkout {
package/dist/checkout.js CHANGED
@@ -139,7 +139,7 @@ const flattenProperties$1 = (properties) => {
139
139
  };
140
140
 
141
141
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
142
- const SDK_VERSION$1 = '1.5.4-alpha.1';
142
+ const SDK_VERSION$1 = '1.5.4';
143
143
  const getReferrer$1 = () => {
144
144
  if (isNode$1()) {
145
145
  return '';
@@ -17478,7 +17478,7 @@ const flattenProperties = (properties) => {
17478
17478
  };
17479
17479
 
17480
17480
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
17481
- const SDK_VERSION = '1.5.4-alpha.1';
17481
+ const SDK_VERSION = '1.5.4';
17482
17482
  const getReferrer = () => {
17483
17483
  if (isNode()) {
17484
17484
  return '';
@@ -27715,7 +27715,7 @@ class APIError extends Error {
27715
27715
 
27716
27716
  /* eslint-disable implicit-arrow-linebreak */
27717
27717
  const defaultHeaders = {
27718
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.5.4-alpha.1',
27718
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.5.4',
27719
27719
  };
27720
27720
  /**
27721
27721
  * createAPIConfiguration to create a custom Configuration
@@ -29082,7 +29082,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
29082
29082
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
29083
29083
  };
29084
29084
 
29085
- const SDK_VERSION_MARKER = '1.5.4-alpha.1';
29085
+ const SDK_VERSION_MARKER = '1.5.4';
29086
29086
  // This SDK version is replaced by the `yarn build` command ran on the root level
29087
29087
  const globalPackageVersion = () => SDK_VERSION_MARKER;
29088
29088
 
@@ -32697,8 +32697,7 @@ function validateAndBuildVersion(version) {
32697
32697
  return validatedVersion;
32698
32698
  }
32699
32699
 
32700
- // Loads the checkout widgets bundle from the CDN and appends the script to the document head
32701
- function loadUnresolvedBundle(version) {
32700
+ function loadUnresolved(version) {
32702
32701
  if (window === undefined) {
32703
32702
  throw new Error('missing window object: please run Checkout client side');
32704
32703
  }
@@ -32720,12 +32719,6 @@ function loadUnresolvedBundle(version) {
32720
32719
  document.head.appendChild(tag);
32721
32720
  return { loaded: false, element: tag };
32722
32721
  }
32723
- // Gets the CDN url for the split checkout widgets bundle
32724
- function getCdnUrl(version) {
32725
- const validVersion = validateAndBuildVersion(version);
32726
- let cdnUrl = `https://cdn.jsdelivr.net/npm/@imtbl/sdk@${validVersion}/dist/browser/checkout/widgets-esm.js`;
32727
- return cdnUrl;
32728
- }
32729
32722
 
32730
32723
  const PUBLISHABLE_KEY_PREFIX = 'pk_imapik-';
32731
32724
  const publishableKeyDomainAllowlist = [
@@ -32833,23 +32826,6 @@ class Checkout {
32833
32826
  const checkout = this;
32834
32827
  // Preload the configurations
32835
32828
  await checkout.config.remote.getConfig();
32836
- // Resolves the factory for the esm build of the widgets
32837
- if (init.useEsModules) {
32838
- const cdnUrl = getCdnUrl(init.version);
32839
- // WebpackIgnore comment required to prevent webpack modifying the import statement and
32840
- // breaking the dynamic import in certain applications integrating checkout
32841
- const checkoutWidgetsModule = await import(/* webpackIgnore: true */ cdnUrl);
32842
- const factory = new Promise((resolve, reject) => {
32843
- if (checkoutWidgetsModule && checkoutWidgetsModule.WidgetsFactory) {
32844
- resolve(new checkoutWidgetsModule.WidgetsFactory(checkout, init.config));
32845
- }
32846
- else {
32847
- reject(new CheckoutError('Unable to resolve the WidgetsFactory from the checkout widgets module', CheckoutErrorType.WIDGETS_SCRIPT_LOAD_ERROR));
32848
- }
32849
- });
32850
- return factory;
32851
- }
32852
- // Resolves the factory for the umd build of the widgets
32853
32829
  const factory = new Promise((resolve, reject) => {
32854
32830
  function checkForWidgetsBundleLoaded() {
32855
32831
  if (typeof ImmutableCheckoutWidgets !== 'undefined') {
@@ -32863,7 +32839,7 @@ class Checkout {
32863
32839
  }
32864
32840
  }
32865
32841
  try {
32866
- const script = loadUnresolvedBundle(init.version);
32842
+ const script = loadUnresolved(init.version);
32867
32843
  if (script.loaded && typeof ImmutableCheckoutWidgets !== 'undefined') {
32868
32844
  resolve(new ImmutableCheckoutWidgets.WidgetsFactory(checkout, init.config));
32869
32845
  }
package/dist/config.js CHANGED
@@ -128,7 +128,7 @@ const flattenProperties = (properties) => {
128
128
  };
129
129
 
130
130
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
131
- const SDK_VERSION = '1.5.4-alpha.1';
131
+ const SDK_VERSION = '1.5.4';
132
132
  const getReferrer = () => {
133
133
  if (isNode()) {
134
134
  return '';