@imtbl/sdk 1.13.0 → 1.13.2-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 (43) hide show
  1. package/dist/blockchain_data.d.ts +1 -13
  2. package/dist/blockchain_data.js +4 -3
  3. package/dist/browser/checkout/{BridgeWidget-a0216abf.js → BridgeWidget-feb6e244.js} +1 -1
  4. package/dist/browser/checkout/{OnRampWidget-0141412f.js → OnRampWidget-bf7b0285.js} +1 -1
  5. package/dist/browser/checkout/SaleWidget-8bbac84d.js +2 -0
  6. package/dist/browser/checkout/{SpendingCapHero-f00c162d.js → SpendingCapHero-cc97026e.js} +1 -1
  7. package/dist/browser/checkout/{SwapWidget-7dd7ae0d.js → SwapWidget-411d726b.js} +1 -1
  8. package/dist/browser/checkout/{TopUpView-83b01082.js → TopUpView-62c3bb1c.js} +1 -1
  9. package/dist/browser/checkout/{WalletWidget-a7294770.js → WalletWidget-da4cd5a6.js} +1 -1
  10. package/dist/browser/checkout/{auto-track-a6ee7728.js → auto-track-42ec91ae.js} +1 -1
  11. package/dist/browser/checkout/{balance-cab05497.js → balance-0e3acb15.js} +1 -1
  12. package/dist/browser/checkout/{index-e06cc1d2.js → index-0face9fc.js} +1 -1
  13. package/dist/browser/checkout/{index-57f03d43.js → index-1383cc81.js} +2 -2
  14. package/dist/browser/checkout/{index-fb6525df.js → index-2a04a2f2.js} +1 -1
  15. package/dist/browser/checkout/{index-a53ae4b9.js → index-4ceb8896.js} +1 -1
  16. package/dist/browser/checkout/index-4eeff6a1.js +1 -0
  17. package/dist/browser/checkout/{index-f13a14b5.js → index-6b30a04c.js} +1 -1
  18. package/dist/browser/checkout/{index-51cb702e.js → index-912bd43f.js} +1 -1
  19. package/dist/browser/checkout/{index-b10fea31.js → index-a4e5665c.js} +1 -1
  20. package/dist/browser/checkout/{index.umd-ebf23be8.js → index.umd-22e11686.js} +1 -1
  21. package/dist/browser/checkout/{retry-242a2c60.js → retry-4271fac2.js} +1 -1
  22. package/dist/browser/checkout/sdk.js +7 -7
  23. package/dist/browser/checkout/{useTransakEvents-4a36b909.js → useTransakEvents-4f11a227.js} +1 -1
  24. package/dist/browser/checkout/widgets-esm.js +1 -1
  25. package/dist/browser/checkout/widgets.js +60 -60
  26. package/dist/checkout.d.ts +1 -13
  27. package/dist/checkout.js +6 -5
  28. package/dist/config.d.ts +2 -17
  29. package/dist/config.js +3 -21
  30. package/dist/index.browser.js +13 -13
  31. package/dist/index.browser.js.map +1 -1
  32. package/dist/index.cjs +89 -79
  33. package/dist/index.d.ts +1 -22
  34. package/dist/index.js +90 -80
  35. package/dist/orderbook.d.ts +1 -13
  36. package/dist/orderbook.js +1 -1
  37. package/dist/passport.d.ts +1 -13
  38. package/dist/passport.js +85 -54
  39. package/dist/x.d.ts +1 -13
  40. package/dist/x.js +2 -2
  41. package/package.json +1 -1
  42. package/dist/browser/checkout/SaleWidget-dfb3ec06.js +0 -2
  43. package/dist/browser/checkout/index-1c0cb426.js +0 -1
@@ -10111,20 +10111,8 @@ declare class ImmutableConfiguration {
10111
10111
  publishableKey?: string;
10112
10112
  });
10113
10113
  }
10114
- type ImmutableConfigurationWithRequireableFields<T> = ImmutableConfiguration & (T extends {
10115
- apiKey: 'required';
10116
- } ? Required<{
10117
- apiKey: string;
10118
- }> : {}) & (T extends {
10119
- publishableKey: 'required';
10120
- } ? Required<{
10121
- publishableKey: string;
10122
- }> : {});
10123
- type ImmutableConfigurationWithOmitableFields<T> = T extends {
10124
- apiKey: 'omit';
10125
- } ? Omit<ImmutableConfigurationWithRequireableFields<T>, 'apiKey'> : ImmutableConfigurationWithRequireableFields<T>;
10126
10114
  interface ModuleConfiguration<T> {
10127
- baseConfig: ImmutableConfigurationWithOmitableFields<T>;
10115
+ baseConfig: ImmutableConfiguration;
10128
10116
  overrides?: T;
10129
10117
  }
10130
10118
 
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.13.0';
142
+ const SDK_VERSION$1 = '1.13.2-alpha.1';
143
143
  const getReferrer$1 = () => {
144
144
  if (isNode$1()) {
145
145
  return '';
@@ -313,7 +313,7 @@ errorBoundary$1(getGlobalisedValue$2('setPassportClientId', setPassportClientIdF
313
313
  const setPublishableApiKeyFn$1 = (publishableApiKey) => {
314
314
  storeDetail$1(Detail$1.PUBLISHABLE_API_KEY, publishableApiKey);
315
315
  };
316
- errorBoundary$1(getGlobalisedValue$2('setPublishableApiKey', setPublishableApiKeyFn$1));
316
+ const setPublishableApiKey = errorBoundary$1(getGlobalisedValue$2('setPublishableApiKey', setPublishableApiKeyFn$1));
317
317
  errorBoundary$1(getGlobalisedValue$2('getDetail', getDetail$1$1));
318
318
 
319
319
  var Environment$1;
@@ -354,6 +354,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
354
354
  }
355
355
  if (baseConfig.publishableKey) {
356
356
  newHeaders[KeyHeaders$1.PUBLISHABLE_KEY] = baseConfig.publishableKey;
357
+ setPublishableApiKey(baseConfig.publishableKey);
357
358
  }
358
359
  if (baseConfig.rateLimitingKey) {
359
360
  newHeaders[KeyHeaders$1.RATE_LIMITING_KEY] = baseConfig.rateLimitingKey;
@@ -17520,7 +17521,7 @@ const flattenProperties = (properties) => {
17520
17521
  };
17521
17522
 
17522
17523
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
17523
- const SDK_VERSION = '1.13.0';
17524
+ const SDK_VERSION = '1.13.2-alpha.1';
17524
17525
  const getReferrer = () => {
17525
17526
  if (isNode()) {
17526
17527
  return '';
@@ -28002,7 +28003,7 @@ class APIError extends Error {
28002
28003
 
28003
28004
  /* eslint-disable implicit-arrow-linebreak */
28004
28005
  const defaultHeaders = {
28005
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.13.0',
28006
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.13.2-alpha.1',
28006
28007
  };
28007
28008
  /**
28008
28009
  * createAPIConfiguration to create a custom Configuration
@@ -29421,7 +29422,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
29421
29422
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
29422
29423
  };
29423
29424
 
29424
- const SDK_VERSION_MARKER = '1.13.0';
29425
+ const SDK_VERSION_MARKER = '1.13.2-alpha.1';
29425
29426
  // This SDK version is replaced by the `yarn build` command ran on the root level
29426
29427
  const globalPackageVersion = () => SDK_VERSION_MARKER;
29427
29428
 
package/dist/config.d.ts CHANGED
@@ -22,24 +22,9 @@ declare class ImmutableConfiguration {
22
22
  declare const addKeysToHeadersOverride: <T extends {
23
23
  headers?: Record<string, string> | undefined;
24
24
  }>(baseConfig: ImmutableConfiguration | undefined, overrides: T | undefined) => T | undefined;
25
- declare const addApiKeyToAxiosHeader: (apiKey: string) => void;
26
- declare const addPublishableKeyToAxiosHeader: (publishableKey: string) => void;
27
- declare const addRateLimitingKeyToAxiosHeader: (rateLimitingKey: string) => void;
28
- type ImmutableConfigurationWithRequireableFields<T> = ImmutableConfiguration & (T extends {
29
- apiKey: 'required';
30
- } ? Required<{
31
- apiKey: string;
32
- }> : {}) & (T extends {
33
- publishableKey: 'required';
34
- } ? Required<{
35
- publishableKey: string;
36
- }> : {});
37
- type ImmutableConfigurationWithOmitableFields<T> = T extends {
38
- apiKey: 'omit';
39
- } ? Omit<ImmutableConfigurationWithRequireableFields<T>, 'apiKey'> : ImmutableConfigurationWithRequireableFields<T>;
40
25
  interface ModuleConfiguration<T> {
41
- baseConfig: ImmutableConfigurationWithOmitableFields<T>;
26
+ baseConfig: ImmutableConfiguration;
42
27
  overrides?: T;
43
28
  }
44
29
 
45
- export { Environment, ImmutableConfiguration, KeyHeaders, ModuleConfiguration, addApiKeyToAxiosHeader, addKeysToHeadersOverride, addPublishableKeyToAxiosHeader, addRateLimitingKeyToAxiosHeader };
30
+ export { Environment, ImmutableConfiguration, KeyHeaders, ModuleConfiguration, addKeysToHeadersOverride };
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.13.0';
131
+ const SDK_VERSION = '1.13.2-alpha.1';
132
132
  const getReferrer = () => {
133
133
  if (isNode()) {
134
134
  return '';
@@ -343,6 +343,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
343
343
  }
344
344
  if (baseConfig.publishableKey) {
345
345
  newHeaders[KeyHeaders.PUBLISHABLE_KEY] = baseConfig.publishableKey;
346
+ setPublishableApiKey(baseConfig.publishableKey);
346
347
  }
347
348
  if (baseConfig.rateLimitingKey) {
348
349
  newHeaders[KeyHeaders.RATE_LIMITING_KEY] = baseConfig.rateLimitingKey;
@@ -362,24 +363,5 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
362
363
  headers: newHeaders,
363
364
  };
364
365
  };
365
- const API_KEY_PREFIX = 'sk_imapik-';
366
- const PUBLISHABLE_KEY_PREFIX = 'pk_imapik-';
367
- const addApiKeyToAxiosHeader = (apiKey) => {
368
- if (!apiKey.startsWith(API_KEY_PREFIX)) {
369
- throw new Error('Invalid API key. Create your api key in Immutable developer hub. https://hub.immutable.com');
370
- }
371
- axios.defaults.headers.common[KeyHeaders.API_KEY] = apiKey;
372
- };
373
- const addPublishableKeyToAxiosHeader = (publishableKey) => {
374
- if (!publishableKey.startsWith(PUBLISHABLE_KEY_PREFIX)) {
375
- throw new Error('Invalid Publishable key. Create your Publishable key in Immutable developer hub.'
376
- + ' https://hub.immutable.com');
377
- }
378
- setPublishableApiKey(publishableKey);
379
- axios.defaults.headers.common[KeyHeaders.PUBLISHABLE_KEY] = publishableKey;
380
- };
381
- const addRateLimitingKeyToAxiosHeader = (rateLimitingKey) => {
382
- axios.defaults.headers.common[KeyHeaders.RATE_LIMITING_KEY] = rateLimitingKey;
383
- };
384
366
 
385
- export { Environment, ImmutableConfiguration, KeyHeaders, addApiKeyToAxiosHeader, addKeysToHeadersOverride, addPublishableKeyToAxiosHeader, addRateLimitingKeyToAxiosHeader };
367
+ export { Environment, ImmutableConfiguration, KeyHeaders, addKeysToHeadersOverride };