@imtbl/sdk 1.13.0 → 1.13.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/blockchain_data.d.ts +1 -13
- package/dist/blockchain_data.js +4 -3
- package/dist/browser/checkout/{BridgeWidget-a0216abf.js → BridgeWidget-fad5e5b4.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-0141412f.js → OnRampWidget-cd752140.js} +1 -1
- package/dist/browser/checkout/{SaleWidget-dfb3ec06.js → SaleWidget-d346df01.js} +1 -1
- package/dist/browser/checkout/{SpendingCapHero-f00c162d.js → SpendingCapHero-8f336477.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-7dd7ae0d.js → SwapWidget-9004a303.js} +1 -1
- package/dist/browser/checkout/{TopUpView-83b01082.js → TopUpView-24b7522e.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-a7294770.js → WalletWidget-d04f02c7.js} +1 -1
- package/dist/browser/checkout/{auto-track-a6ee7728.js → auto-track-a76b6dc5.js} +1 -1
- package/dist/browser/checkout/{balance-cab05497.js → balance-b06cb17f.js} +1 -1
- package/dist/browser/checkout/{index-51cb702e.js → index-10a2ce7f.js} +1 -1
- package/dist/browser/checkout/{index-fb6525df.js → index-1380b155.js} +1 -1
- package/dist/browser/checkout/{index-b10fea31.js → index-33ba2d41.js} +1 -1
- package/dist/browser/checkout/{index-a53ae4b9.js → index-3549d306.js} +1 -1
- package/dist/browser/checkout/index-5202f725.js +1 -0
- package/dist/browser/checkout/{index-e06cc1d2.js → index-52729a66.js} +1 -1
- package/dist/browser/checkout/{index-f13a14b5.js → index-6e473dc6.js} +1 -1
- package/dist/browser/checkout/{index-57f03d43.js → index-a5ec4ed9.js} +2 -2
- package/dist/browser/checkout/{index.umd-ebf23be8.js → index.umd-17c2e990.js} +1 -1
- package/dist/browser/checkout/{retry-242a2c60.js → retry-154c5f2b.js} +1 -1
- package/dist/browser/checkout/sdk.js +7 -7
- package/dist/browser/checkout/{useTransakEvents-4a36b909.js → useTransakEvents-05f3e770.js} +1 -1
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +60 -60
- package/dist/checkout.d.ts +1 -13
- package/dist/checkout.js +6 -5
- package/dist/config.d.ts +2 -17
- package/dist/config.js +3 -21
- package/dist/index.browser.js +13 -13
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +52 -54
- package/dist/index.d.ts +1 -22
- package/dist/index.js +53 -55
- package/dist/orderbook.d.ts +1 -13
- package/dist/orderbook.js +1 -1
- package/dist/passport.d.ts +1 -13
- package/dist/passport.js +48 -29
- package/dist/x.d.ts +1 -13
- package/dist/x.js +2 -2
- package/package.json +1 -1
- package/dist/browser/checkout/index-1c0cb426.js +0 -1
package/dist/checkout.d.ts
CHANGED
|
@@ -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:
|
|
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.
|
|
142
|
+
const SDK_VERSION$1 = '1.13.2';
|
|
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.
|
|
17524
|
+
const SDK_VERSION = '1.13.2';
|
|
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.
|
|
28006
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.13.2',
|
|
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.
|
|
29425
|
+
const SDK_VERSION_MARKER = '1.13.2';
|
|
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:
|
|
26
|
+
baseConfig: ImmutableConfiguration;
|
|
42
27
|
overrides?: T;
|
|
43
28
|
}
|
|
44
29
|
|
|
45
|
-
export { Environment, ImmutableConfiguration, KeyHeaders, ModuleConfiguration,
|
|
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.
|
|
131
|
+
const SDK_VERSION = '1.13.2';
|
|
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,
|
|
367
|
+
export { Environment, ImmutableConfiguration, KeyHeaders, addKeysToHeadersOverride };
|