@imtbl/sdk 1.51.6-alpha.3 → 1.51.7-alpha
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-Cj9feTC_.js → blockchain_data-NwV19jKe.js} +2 -2
- package/dist/blockchain_data.js +3 -3
- package/dist/browser/checkout/{AddFundsWidget-DuG1OWEM.js → AddFundsWidget-60fIp6Ey.js} +2 -2
- package/dist/browser/checkout/{BridgeWidget-2D-8F1Vq.js → BridgeWidget-BXflY6CD.js} +5 -5
- package/dist/browser/checkout/{CheckoutWidget-Bvnur5WZ.js → CheckoutWidget-DUcj5yhp.js} +47 -14
- package/dist/browser/checkout/{OnRampWidget-B4UV_TYW.js → OnRampWidget-bRIzh3SI.js} +3 -3
- package/dist/browser/checkout/{SaleWidget-BQMUaWlZ.js → SaleWidget-BfRWYw-x.js} +9 -9
- package/dist/browser/checkout/{SpendingCapHero-BsQQYO_D.js → SpendingCapHero-D5J-PqGu.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-BK7sTJ6u.js → SwapWidget-CgtS6wF-.js} +6 -6
- package/dist/browser/checkout/{TextInputForm-Cy6sTMjr.js → TextInputForm-DFz4T9gr.js} +1 -1
- package/dist/browser/checkout/{TopUpView-Dw-JH0Q5.js → TopUpView-CR59P_9s.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-t6i1V-G5.js → WalletWidget-B2e3P2b_.js} +3 -3
- package/dist/browser/checkout/{auto-track-CMv29U8a.js → auto-track-BlKHxjh9.js} +1 -1
- package/dist/browser/checkout/{balance-Dt4oB1G1.js → balance-DHb2qU4v.js} +2 -2
- package/dist/browser/checkout/{index-5qc7Vsg4.js → index-B-0jqzbr.js} +18 -18
- package/dist/browser/checkout/{index-D4zR0DRy.js → index-BIWbNf18.js} +1 -1
- package/dist/browser/checkout/{index-CMBbtkDe.js → index-D9ZXz8kq.js} +1 -1
- package/dist/browser/checkout/{index-BRzBLTux.js → index-DR6Ua43K.js} +1 -1
- package/dist/browser/checkout/{index-DmXFGYTM.js → index-DXpg_6O3.js} +1 -1
- package/dist/browser/checkout/{index-D2zks65E.js → index-DdnJcCwY.js} +2 -2
- package/dist/browser/checkout/{index-DwTyassh.js → index-rZMMkDHX.js} +1 -1
- package/dist/browser/checkout/{index-Zraoakam.js → index-xaWPeC16.js} +1 -1
- package/dist/browser/checkout/{index.umd-CCwq6cRd.js → index.umd-BrmJxnop.js} +1 -1
- package/dist/browser/checkout/{retry-C_l6vh-l.js → retry-CWri6uLY.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +46 -13
- package/dist/{checkout-Bbpnp9mt.js → checkout-DMpJvvQS.js} +5 -5
- package/dist/checkout.js +5 -5
- package/dist/{config-sXFF9m4x.js → config-D-clK73v.js} +1 -1
- package/dist/config.js +1 -1
- package/dist/{index-B98Oxezh.js → index-0cWI8Qhc.js} +4 -4
- package/dist/{index-DM2LjOba.js → index-BGjUCefm.js} +1 -1
- package/dist/{index-9FzewX5R.js → index-DI7M8rzP.js} +1 -1
- package/dist/{index-_orlyaK_.js → index-DTVYUEH8.js} +1 -1
- package/dist/{index-D0HfHdqJ.js → index-DWqDxFIR.js} +3 -3
- package/dist/{index-CyDcrC5z.js → index-Dxx5lLW1.js} +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +14 -14
- package/dist/{minting_backend-AupEhVLb.js → minting_backend-DSLh143M.js} +3 -3
- package/dist/minting_backend.js +5 -5
- package/dist/{orderbook-B3YaAPkk.js → orderbook-LNsrAqry.js} +1 -1
- package/dist/orderbook.js +2 -2
- package/dist/{passport-D23DKhtQ.js → passport-B-95l5BM.js} +3 -3
- package/dist/passport.js +4 -4
- package/dist/{webhook-xdDiR57E.js → webhook-BHRQETWI.js} +1 -1
- package/dist/webhook.js +2 -2
- package/dist/{x-BIHwnhUS.js → x-wv2autMY.js} +3 -3
- package/dist/x.js +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export { dw as WidgetsFactory } from './index-
|
|
1
|
+
export { dw as WidgetsFactory } from './index-B-0jqzbr.js';
|
|
@@ -216206,6 +216206,21 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216206
216206
|
} }))] }));
|
|
216207
216207
|
}
|
|
216208
216208
|
|
|
216209
|
+
/**
|
|
216210
|
+
* Encodes a JSON object using base64 encoding.
|
|
216211
|
+
*/
|
|
216212
|
+
const encodeObject = async (value) => {
|
|
216213
|
+
try {
|
|
216214
|
+
const str = JSON.stringify(value);
|
|
216215
|
+
const base64String = btoa(str);
|
|
216216
|
+
return encodeURIComponent(base64String);
|
|
216217
|
+
}
|
|
216218
|
+
catch (error) {
|
|
216219
|
+
throw new Error(`Compression failed: ${error.message}`);
|
|
216220
|
+
}
|
|
216221
|
+
};
|
|
216222
|
+
|
|
216223
|
+
/* eslint-disable no-case-declarations */
|
|
216209
216224
|
/**
|
|
216210
216225
|
* Converts a record of parameters to a query string.
|
|
216211
216226
|
*/
|
|
@@ -216224,7 +216239,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216224
216239
|
/**
|
|
216225
216240
|
* Maps the flow configuration and params to the corresponding query parameters.
|
|
216226
216241
|
*/
|
|
216227
|
-
const getIframeParams = (params, widgetConfig, checkoutConfig) => {
|
|
216242
|
+
const getIframeParams = async (params, widgetConfig, checkoutConfig) => {
|
|
216228
216243
|
const { flow } = params;
|
|
216229
216244
|
const commonConfig = {
|
|
216230
216245
|
theme: widgetConfig.theme,
|
|
@@ -216294,6 +216309,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216294
216309
|
toAmount: params.tokenAddress,
|
|
216295
216310
|
});
|
|
216296
216311
|
case CheckoutFlowType.SALE:
|
|
216312
|
+
const items = await encodeObject(params.items || []);
|
|
216297
216313
|
return toQueryString({
|
|
216298
216314
|
...commonConfig,
|
|
216299
216315
|
...(widgetConfig.sale || {}),
|
|
@@ -216306,7 +216322,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216306
216322
|
// TODO: Get from hub
|
|
216307
216323
|
environmentId: params.environmentId,
|
|
216308
216324
|
collectionName: params.collectionName,
|
|
216309
|
-
items
|
|
216325
|
+
items,
|
|
216310
216326
|
preferredCurrency: params.preferredCurrency,
|
|
216311
216327
|
excludePaymentTypes: params.excludePaymentTypes,
|
|
216312
216328
|
excludeFiatCurrencies: params.excludeFiatCurrencies,
|
|
@@ -216318,10 +216334,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216318
216334
|
/**
|
|
216319
216335
|
* Returns the iframe URL for the Checkout App based on the environment.
|
|
216320
216336
|
*/
|
|
216321
|
-
const getIframeURL = (params, widgetConfig, checkoutConfig) => {
|
|
216337
|
+
const getIframeURL = async (params, widgetConfig, checkoutConfig) => {
|
|
216322
216338
|
const { flow } = params;
|
|
216323
216339
|
const { publishableKey } = checkoutConfig;
|
|
216324
|
-
|
|
216340
|
+
if (!publishableKey)
|
|
216341
|
+
return '';
|
|
216325
216342
|
let environment = checkoutConfig.environment || Environment$1.SANDBOX;
|
|
216326
216343
|
if (checkoutConfig.isDevelopment) {
|
|
216327
216344
|
environment = ENV_DEVELOPMENT;
|
|
@@ -216329,10 +216346,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216329
216346
|
if (checkoutConfig.overrides?.environment) {
|
|
216330
216347
|
environment = checkoutConfig.overrides.environment;
|
|
216331
216348
|
}
|
|
216332
|
-
const baseURL = checkoutConfig.overrides?.checkoutAppUrl
|
|
216333
|
-
|
|
216334
|
-
const
|
|
216335
|
-
|
|
216349
|
+
const baseURL = checkoutConfig.overrides?.checkoutAppUrl
|
|
216350
|
+
?? CHECKOUT_APP_URL[environment];
|
|
216351
|
+
const queryParams = await getIframeParams(params, widgetConfig, checkoutConfig);
|
|
216352
|
+
const iframeURL = `${baseURL}/${flow}?${queryParams}`;
|
|
216353
|
+
return iframeURL;
|
|
216336
216354
|
};
|
|
216337
216355
|
|
|
216338
216356
|
/**
|
|
@@ -216352,13 +216370,28 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216352
216370
|
}, [deps, effect, compare]);
|
|
216353
216371
|
};
|
|
216354
216372
|
|
|
216373
|
+
/**
|
|
216374
|
+
* Handle asynchronous operations with memoization.
|
|
216375
|
+
* It only re-executes the async function when dependencies change.
|
|
216376
|
+
*/
|
|
216377
|
+
const useAsyncMemo = (asyncFn, dependencies) => {
|
|
216378
|
+
const [value, setValue] = reactExports.useState();
|
|
216379
|
+
reactExports.useEffect(() => {
|
|
216380
|
+
let isMounted = true;
|
|
216381
|
+
asyncFn().then((result) => {
|
|
216382
|
+
if (isMounted)
|
|
216383
|
+
setValue(result);
|
|
216384
|
+
});
|
|
216385
|
+
return () => {
|
|
216386
|
+
isMounted = false;
|
|
216387
|
+
};
|
|
216388
|
+
}, dependencies);
|
|
216389
|
+
return value;
|
|
216390
|
+
};
|
|
216391
|
+
|
|
216355
216392
|
function CheckoutWidget(props) {
|
|
216356
216393
|
const { config, checkout, params, provider, } = props;
|
|
216357
|
-
const
|
|
216358
|
-
if (!checkout.config.publishableKey)
|
|
216359
|
-
return ['', ''];
|
|
216360
|
-
return getIframeURL(params, config, checkout.config);
|
|
216361
|
-
}, [params, config, checkout.config]);
|
|
216394
|
+
const iframeURL = useAsyncMemo(async () => getIframeURL(params, config, checkout.config), [params, config, checkout.config]);
|
|
216362
216395
|
const [checkoutState, checkoutDispatch] = reactExports.useReducer(checkoutReducer, initialCheckoutState);
|
|
216363
216396
|
const checkoutReducerValues = reactExports.useMemo(() => ({
|
|
216364
216397
|
checkoutState: { ...checkoutState, iframeURL, checkout },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Environment$1, t as track, I as ImmutableConfiguration } from './index-
|
|
1
|
+
import { E as Environment$1, t as track, I as ImmutableConfiguration } from './index-DI7M8rzP.js';
|
|
2
2
|
import { ethers, BigNumber as BigNumber$1, ContractFactory, utils as utils$2, Contract as Contract$1 } from 'ethers';
|
|
3
3
|
import globalAxios, { HttpStatusCode as HttpStatusCode$1 } from 'axios';
|
|
4
4
|
import { Web3Provider, JsonRpcProvider } from '@ethersproject/providers';
|
|
@@ -9,8 +9,8 @@ import assert from 'assert';
|
|
|
9
9
|
import { FeeAmount, Route, SwapQuoter, Pool, Trade, toHex as toHex$1, encodeRouteToPath } from '@uniswap/v3-sdk';
|
|
10
10
|
import { keccak256 as keccak256$1 } from '@ethersproject/solidity';
|
|
11
11
|
import { SwapRouter, PaymentsExtended } from '@uniswap/router-sdk';
|
|
12
|
-
import { c as constants, O as OrderStatusName, a as Orderbook, A as ActionType, T as TransactionPurpose, S as SignablePurpose } from './index-
|
|
13
|
-
import { B as BlockchainData } from './index-
|
|
12
|
+
import { c as constants, O as OrderStatusName, a as Orderbook, A as ActionType, T as TransactionPurpose, S as SignablePurpose } from './index-DTVYUEH8.js';
|
|
13
|
+
import { B as BlockchainData } from './index-DWqDxFIR.js';
|
|
14
14
|
|
|
15
15
|
function bind(fn, thisArg) {
|
|
16
16
|
return function wrap() {
|
|
@@ -19206,7 +19206,7 @@ const flattenProperties = (properties) => {
|
|
|
19206
19206
|
};
|
|
19207
19207
|
|
|
19208
19208
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
19209
|
-
const SDK_VERSION = '1.51.
|
|
19209
|
+
const SDK_VERSION = '1.51.7-alpha';
|
|
19210
19210
|
const getFrameParentDomain = () => {
|
|
19211
19211
|
if (isNode()) {
|
|
19212
19212
|
return '';
|
|
@@ -24600,7 +24600,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
24600
24600
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
24601
24601
|
};
|
|
24602
24602
|
|
|
24603
|
-
const SDK_VERSION_MARKER = '1.51.
|
|
24603
|
+
const SDK_VERSION_MARKER = '1.51.7-alpha';
|
|
24604
24604
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
24605
24605
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
24606
24606
|
|
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 CheckoutErrorType, h as CheckoutEventType, i as CheckoutFailureEventType, j as CheckoutFlowType, k as CheckoutStatus, l as CheckoutSuccessEventType, m as CheckoutUserActionEventType, n as ConnectEventType, o as ConnectTargetLayer, E as ExchangeType, F as FeeType, p as FundingStepType, G as GasEstimateType, q as GasTokenType, I as IMMUTABLE_API_BASE_URL, r as IMTBLWidgetEvents, s as ItemType, N as NetworkFilterTypes, O as OnRampEventType, t as OrchestrationEventType, P as PostMessageHandler, u as PostMessageHandlerEventType, v as ProviderEventType, 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 getMetaMaskProviderDetail, Q as getPassportProviderDetail, U as isAddressSanctioned, V as validateProvider } from './checkout-
|
|
2
|
-
import './index-
|
|
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 CheckoutErrorType, h as CheckoutEventType, i as CheckoutFailureEventType, j as CheckoutFlowType, k as CheckoutStatus, l as CheckoutSuccessEventType, m as CheckoutUserActionEventType, n as ConnectEventType, o as ConnectTargetLayer, E as ExchangeType, F as FeeType, p as FundingStepType, G as GasEstimateType, q as GasTokenType, I as IMMUTABLE_API_BASE_URL, r as IMTBLWidgetEvents, s as ItemType, N as NetworkFilterTypes, O as OnRampEventType, t as OrchestrationEventType, P as PostMessageHandler, u as PostMessageHandlerEventType, v as ProviderEventType, 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 getMetaMaskProviderDetail, Q as getPassportProviderDetail, U as isAddressSanctioned, V as validateProvider } from './checkout-DMpJvvQS.js';
|
|
2
|
+
import './index-DI7M8rzP.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'lru-memorise';
|
|
5
5
|
import 'global-const';
|
|
@@ -11,10 +11,10 @@ import 'assert';
|
|
|
11
11
|
import '@uniswap/v3-sdk';
|
|
12
12
|
import '@ethersproject/solidity';
|
|
13
13
|
import '@uniswap/router-sdk';
|
|
14
|
-
import './index-
|
|
14
|
+
import './index-DTVYUEH8.js';
|
|
15
15
|
import 'form-data';
|
|
16
16
|
import 'ethers-v6';
|
|
17
17
|
import 'merkletreejs';
|
|
18
18
|
import '@opensea/seaport-js';
|
|
19
|
-
import './index-
|
|
20
|
-
import './index-
|
|
19
|
+
import './index-DWqDxFIR.js';
|
|
20
|
+
import './index-Dxx5lLW1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-
|
|
1
|
+
import { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-DI7M8rzP.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-
|
|
1
|
+
export { E as Environment, I as ImmutableConfiguration, K as KeyHeaders, a as addKeysToHeadersOverride } from './index-DI7M8rzP.js';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'lru-memorise';
|
|
4
4
|
import 'global-const';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as index$2, I as ImxApiClients } from './index-
|
|
2
|
-
import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-
|
|
1
|
+
import { b as index$2, I as ImxApiClients } from './index-Dxx5lLW1.js';
|
|
2
|
+
import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-DI7M8rzP.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.51.
|
|
19
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.51.7-alpha' };
|
|
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.51.
|
|
60
|
+
sdkVersion: 'ts-immutable-sdk-1.51.7-alpha',
|
|
61
61
|
baseConfig,
|
|
62
62
|
});
|
|
63
63
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -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.51.
|
|
161
|
+
const SDK_VERSION = '1.51.7-alpha';
|
|
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-
|
|
1
|
+
import { t as track, E as Environment } from './index-DI7M8rzP.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 { a as index$1 } from './index-
|
|
2
|
-
import { E as Environment, a as addKeysToHeadersOverride } from './index-
|
|
1
|
+
import { a as index$1 } from './index-Dxx5lLW1.js';
|
|
2
|
+
import { E as Environment, a as addKeysToHeadersOverride } from './index-DI7M8rzP.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.51.
|
|
24
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.51.7-alpha',
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -13991,7 +13991,7 @@ class MultiRollupApiClients {
|
|
|
13991
13991
|
}
|
|
13992
13992
|
|
|
13993
13993
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13994
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.51.
|
|
13994
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.51.7-alpha' };
|
|
13995
13995
|
const createConfig = ({ basePath, headers, }) => {
|
|
13996
13996
|
if (!basePath.trim()) {
|
|
13997
13997
|
throw Error('basePath can not be empty');
|