@imtbl/sdk 1.52.0-alpha.7 → 1.52.0
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-Bfy9sBmS.js → blockchain_data-T7u5Hp0U.js} +2 -2
- package/dist/blockchain_data.js +3 -3
- package/dist/browser/checkout/{AddFundsWidget-DYvIbSpf.js → AddFundsWidget-DuG1OWEM.js} +2 -2
- package/dist/browser/checkout/{BridgeWidget-Ducey2Qb.js → BridgeWidget-2D-8F1Vq.js} +5 -5
- package/dist/browser/checkout/{CheckoutWidget-Bm21igSK.js → CheckoutWidget-Bvnur5WZ.js} +35 -81
- package/dist/browser/checkout/{OnRampWidget-Bskz5dvQ.js → OnRampWidget-B4UV_TYW.js} +3 -3
- package/dist/browser/checkout/{SaleWidget-CODqfTXu.js → SaleWidget-BQMUaWlZ.js} +9 -9
- package/dist/browser/checkout/{SpendingCapHero-TQELr3m8.js → SpendingCapHero-BsQQYO_D.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-CMigrs6K.js → SwapWidget-BK7sTJ6u.js} +6 -6
- package/dist/browser/checkout/{TextInputForm-l8DyF_CE.js → TextInputForm-Cy6sTMjr.js} +1 -1
- package/dist/browser/checkout/{TopUpView-BERpFjSs.js → TopUpView-Dw-JH0Q5.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-BXZ8UMXT.js → WalletWidget-t6i1V-G5.js} +3 -3
- package/dist/browser/checkout/{auto-track-C604xUIn.js → auto-track-CMv29U8a.js} +1 -1
- package/dist/browser/checkout/{balance-BuRFeSlx.js → balance-Dt4oB1G1.js} +2 -2
- package/dist/browser/checkout/{index-sv2_fFWL.js → index-5qc7Vsg4.js} +23 -39
- package/dist/browser/checkout/{index-BxvlPyBl.js → index-BRzBLTux.js} +1 -1
- package/dist/browser/checkout/{index-Dp6ibrrF.js → index-CMBbtkDe.js} +1 -1
- package/dist/browser/checkout/{index-WM-Cqghk.js → index-D2zks65E.js} +2 -2
- package/dist/browser/checkout/{index-BokPdkpz.js → index-D4zR0DRy.js} +1 -1
- package/dist/browser/checkout/{index-Cg3GZSNN.js → index-DmXFGYTM.js} +1 -1
- package/dist/browser/checkout/{index-DH5zrdkC.js → index-DwTyassh.js} +1 -1
- package/dist/browser/checkout/{index-C2PsonPG.js → index-Zraoakam.js} +1 -1
- package/dist/browser/checkout/{index.umd-BI7Sc7k9.js → index.umd-CCwq6cRd.js} +1 -1
- package/dist/browser/checkout/{retry-e3i6ZAF9.js → retry-C_l6vh-l.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 +39 -101
- package/dist/{checkout-XO0m_Ikr.js → checkout-DxDRj3k-.js} +5 -6
- package/dist/checkout.d.ts +1 -5
- package/dist/checkout.js +5 -5
- package/dist/{config-giBl4a2t.js → config-Dj7PQqL4.js} +1 -1
- package/dist/config.js +1 -1
- package/dist/{index-BOL8TjPV.js → index-1bjDCdo5.js} +4 -4
- package/dist/{index-HXaEn9Bo.js → index-8m8-bJcZ.js} +1 -1
- package/dist/{index-BMc4mVaX.js → index-BxF866Mh.js} +1 -1
- package/dist/{index-CRoRRQvZ.js → index-D4eU2e1C.js} +1 -1
- package/dist/{index-B2AUzXVq.js → index-XxjQ6oVx.js} +3 -3
- package/dist/{index-DMQ37tO2.js → index-snMwBaY-.js} +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +7 -8
- package/dist/index.d.ts +1 -5
- package/dist/index.js +14 -14
- package/dist/{minting_backend-D4IArOV9.js → minting_backend-DfBB5ptf.js} +3 -3
- package/dist/minting_backend.js +5 -5
- package/dist/{orderbook-C2xW5rm9.js → orderbook-CnmzmGtG.js} +1 -1
- package/dist/orderbook.js +2 -2
- package/dist/{passport-3KXUZvui.js → passport-B8WhzCZf.js} +3 -3
- package/dist/passport.js +4 -4
- package/dist/{webhook-CaTLC_sP.js → webhook-DzAoMhRT.js} +1 -1
- package/dist/webhook.js +2 -2
- package/dist/{x-Bo323lW9.js → x-DbbHwlbW.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-5qc7Vsg4.js';
|
|
@@ -126800,7 +126800,6 @@
|
|
|
126800
126800
|
PostMessageHandlerEventType["PROVIDER_UPDATED"] = "IMTBL_PROVIDER_UPDATED";
|
|
126801
126801
|
PostMessageHandlerEventType["EIP_6963_EVENT"] = "IMTBL_EIP_6963_EVENT";
|
|
126802
126802
|
PostMessageHandlerEventType["WIDGET_EVENT"] = "IMTBL_CHECKOUT_WIDGET_EVENT";
|
|
126803
|
-
PostMessageHandlerEventType["WIDGET_PROVIDER_EVENT"] = "IMTBL_WIDGET_PROVIDER_EVENT";
|
|
126804
126803
|
})(PostMessageHandlerEventType || (PostMessageHandlerEventType = {}));
|
|
126805
126804
|
|
|
126806
126805
|
class PostMessageHandler {
|
|
@@ -194351,27 +194350,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
194351
194350
|
class Sale extends Base$3 {
|
|
194352
194351
|
eventTopic = IMTBLWidgetEvents.IMTBL_SALE_WIDGET_EVENT;
|
|
194353
194352
|
// TODO: add specific validation logic for the sale items
|
|
194354
|
-
|
|
194353
|
+
isValidProucts(products) {
|
|
194355
194354
|
try {
|
|
194356
|
-
return Array.isArray(
|
|
194355
|
+
return Array.isArray(products);
|
|
194357
194356
|
}
|
|
194358
194357
|
catch {
|
|
194359
194358
|
return false;
|
|
194360
194359
|
}
|
|
194361
194360
|
}
|
|
194362
|
-
deduplicateItems(items) {
|
|
194363
|
-
if (!items || !this.isValidArray(items))
|
|
194364
|
-
return [];
|
|
194365
|
-
const uniqueItems = items.reduce((acc, item) => {
|
|
194366
|
-
const itemIndex = acc.findIndex(({ productId }) => productId === item.productId);
|
|
194367
|
-
if (itemIndex !== -1) {
|
|
194368
|
-
acc[itemIndex] = { ...item, qty: acc[itemIndex].qty + item.qty };
|
|
194369
|
-
return acc;
|
|
194370
|
-
}
|
|
194371
|
-
return [...acc, { ...item }];
|
|
194372
|
-
}, []);
|
|
194373
|
-
return uniqueItems;
|
|
194374
|
-
}
|
|
194375
194361
|
getValidatedProperties({ config, }) {
|
|
194376
194362
|
let validatedConfig;
|
|
194377
194363
|
if (config) {
|
|
@@ -194392,7 +194378,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
194392
194378
|
console.warn('[IMTBL]: invalid "walletProviderName" widget input');
|
|
194393
194379
|
validatedParams.walletProviderName = undefined;
|
|
194394
194380
|
}
|
|
194395
|
-
if
|
|
194381
|
+
// TODO: fix the logic here when proper , currently saying if valid then reset to empty array.
|
|
194382
|
+
if (!this.isValidProucts(params.items ?? [])) {
|
|
194396
194383
|
// eslint-disable-next-line no-console
|
|
194397
194384
|
console.warn('[IMTBL]: invalid "items" widget input.');
|
|
194398
194385
|
validatedParams.items = [];
|
|
@@ -194413,10 +194400,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
194413
194400
|
console.warn('[IMTBL]: invalid "excludePaymentTypes" widget input');
|
|
194414
194401
|
validatedParams.excludePaymentTypes = [];
|
|
194415
194402
|
}
|
|
194416
|
-
return
|
|
194417
|
-
...validatedParams,
|
|
194418
|
-
items: this.deduplicateItems(params.items),
|
|
194419
|
-
};
|
|
194403
|
+
return validatedParams;
|
|
194420
194404
|
}
|
|
194421
194405
|
render() {
|
|
194422
194406
|
if (!this.reactRoot)
|
|
@@ -216024,8 +216008,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216024
216008
|
postMessageHandler?.send(PostMessageHandlerEventType.EIP_6963_EVENT, {
|
|
216025
216009
|
message: 'eip6963:announceProvider',
|
|
216026
216010
|
info: event.detail.info,
|
|
216027
|
-
isPassport: event.detail.provider?.isPassport,
|
|
216028
|
-
isMetamask: event.detail.provider?.isMetamask,
|
|
216029
216011
|
});
|
|
216030
216012
|
}, [postMessageHandler]);
|
|
216031
216013
|
reactExports.useEffect(() => {
|
|
@@ -216051,11 +216033,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216051
216033
|
}, [postMessageHandler, onRequest]);
|
|
216052
216034
|
}
|
|
216053
216035
|
|
|
216054
|
-
var ConnectMethods;
|
|
216055
|
-
(function (ConnectMethods) {
|
|
216056
|
-
ConnectMethods["REQUEST_ACCOUNTS"] = "eth_requestAccounts";
|
|
216057
|
-
ConnectMethods["REQUEST_PERMISSIONS"] = "wallet_requestPermissions";
|
|
216058
|
-
})(ConnectMethods || (ConnectMethods = {}));
|
|
216059
216036
|
function useProviderRelay() {
|
|
216060
216037
|
const [{ checkout, postMessageHandler, provider }, checkoutDispatch] = useCheckoutContext();
|
|
216061
216038
|
const unsubscribePostMessageHandler = reactExports.useRef();
|
|
@@ -216082,7 +216059,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216082
216059
|
});
|
|
216083
216060
|
}
|
|
216084
216061
|
catch (error) {
|
|
216085
|
-
|
|
216062
|
+
// Send the error using the postMessageHandler
|
|
216063
|
+
postMessageHandler.send(PostMessageHandlerEventType.PROVIDER_RELAY, {
|
|
216064
|
+
response: { id: payload.jsonRpcRequestMessage.id, error: error.message, jsonrpc: '2.0' },
|
|
216065
|
+
eip6963Info: payload.eip6963Info,
|
|
216066
|
+
});
|
|
216086
216067
|
}
|
|
216087
216068
|
}, [postMessageHandler]);
|
|
216088
216069
|
/**
|
|
@@ -216101,25 +216082,26 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216101
216082
|
console.error('PARENT - requested provider not found', providerRelayPayload?.eip6963Info, injectedProviders);
|
|
216102
216083
|
return;
|
|
216103
216084
|
}
|
|
216085
|
+
// If provider is not defined, connect the target provider
|
|
216104
216086
|
let currentProvider = provider;
|
|
216105
|
-
// If provider is not defined, create a provider
|
|
216106
216087
|
if (!currentProvider && targetProvider) {
|
|
216107
|
-
|
|
216088
|
+
const connectResponse = await checkout.connect({
|
|
216089
|
+
provider: new Web3Provider(targetProvider.provider),
|
|
216090
|
+
});
|
|
216091
|
+
currentProvider = connectResponse.provider;
|
|
216092
|
+
// Set provider and execute the request
|
|
216093
|
+
checkoutDispatch({
|
|
216094
|
+
payload: {
|
|
216095
|
+
type: CheckoutActions.SET_PROVIDER,
|
|
216096
|
+
provider: currentProvider,
|
|
216097
|
+
},
|
|
216098
|
+
});
|
|
216108
216099
|
}
|
|
216109
216100
|
if (!currentProvider) {
|
|
216110
216101
|
throw new Error('Provider is not defined');
|
|
216111
216102
|
}
|
|
216112
216103
|
try {
|
|
216113
216104
|
await execute(providerRelayPayload, currentProvider);
|
|
216114
|
-
if (providerRelayPayload.jsonRpcRequestMessage.method === ConnectMethods.REQUEST_ACCOUNTS
|
|
216115
|
-
|| providerRelayPayload.jsonRpcRequestMessage.method === ConnectMethods.REQUEST_PERMISSIONS) {
|
|
216116
|
-
checkoutDispatch({
|
|
216117
|
-
payload: {
|
|
216118
|
-
type: CheckoutActions.SET_PROVIDER,
|
|
216119
|
-
provider: currentProvider,
|
|
216120
|
-
},
|
|
216121
|
-
});
|
|
216122
|
-
}
|
|
216123
216105
|
}
|
|
216124
216106
|
catch (error) {
|
|
216125
216107
|
// Send the error using the postMessageHandler
|
|
@@ -216133,12 +216115,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216133
216115
|
* Subscribe to provider relay messages
|
|
216134
216116
|
*/
|
|
216135
216117
|
reactExports.useEffect(() => {
|
|
216118
|
+
// TODO we need to unsubscribe everywhere
|
|
216136
216119
|
if (!postMessageHandler)
|
|
216137
216120
|
return;
|
|
216138
216121
|
unsubscribePostMessageHandler.current?.();
|
|
216139
216122
|
unsubscribePostMessageHandler.current = postMessageHandler?.subscribe(onJsonRpcRequestMessage);
|
|
216140
216123
|
}, [postMessageHandler, onJsonRpcRequestMessage]);
|
|
216141
216124
|
}
|
|
216125
|
+
// TODO -
|
|
216126
|
+
// 1 - commit the unsub part
|
|
216127
|
+
// 2 - add unsubs to all postMessageHandlers subscriptions
|
|
216142
216128
|
|
|
216143
216129
|
/**
|
|
216144
216130
|
* The timeout in milliseconds for the iframe to be initialized.
|
|
@@ -216163,20 +216149,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216163
216149
|
.trim()
|
|
216164
216150
|
.replace(/\n/g, '');
|
|
216165
216151
|
|
|
216166
|
-
function useWidgetProviderEventRelayer() {
|
|
216167
|
-
const [checkoutState] = useCheckoutContext();
|
|
216168
|
-
const { postMessageHandler } = checkoutState;
|
|
216169
|
-
const onWidgetProviderEvent = reactExports.useCallback(() => {
|
|
216170
|
-
postMessageHandler?.send(PostMessageHandlerEventType.WIDGET_PROVIDER_EVENT, {});
|
|
216171
|
-
}, [postMessageHandler]);
|
|
216172
|
-
reactExports.useEffect(() => {
|
|
216173
|
-
if (!postMessageHandler)
|
|
216174
|
-
return () => { };
|
|
216175
|
-
window.addEventListener(PostMessageHandlerEventType.WIDGET_PROVIDER_EVENT, onWidgetProviderEvent);
|
|
216176
|
-
return () => window.removeEventListener(PostMessageHandlerEventType.WIDGET_PROVIDER_EVENT, onWidgetProviderEvent);
|
|
216177
|
-
}, [postMessageHandler, onWidgetProviderEvent]);
|
|
216178
|
-
}
|
|
216179
|
-
|
|
216180
216152
|
function CheckoutAppIframe() {
|
|
216181
216153
|
const { t } = useTranslation();
|
|
216182
216154
|
const iframeRef = reactExports.useRef(null);
|
|
@@ -216187,7 +216159,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216187
216159
|
useCheckoutEventsRelayer();
|
|
216188
216160
|
useEip6963Relayer();
|
|
216189
216161
|
useProviderRelay();
|
|
216190
|
-
useWidgetProviderEventRelayer();
|
|
216191
216162
|
const loading = !iframeURL || !iframeContentWindow || !initialised;
|
|
216192
216163
|
const { eventTargetState: { eventTarget }, } = reactExports.useContext(EventTargetContext);
|
|
216193
216164
|
reactExports.useEffect(() => {
|
|
@@ -216235,21 +216206,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216235
216206
|
} }))] }));
|
|
216236
216207
|
}
|
|
216237
216208
|
|
|
216238
|
-
/**
|
|
216239
|
-
* Encodes a JSON object using base64 encoding.
|
|
216240
|
-
*/
|
|
216241
|
-
const encodeObject = async (value) => {
|
|
216242
|
-
try {
|
|
216243
|
-
const str = JSON.stringify(value);
|
|
216244
|
-
const base64String = btoa(str);
|
|
216245
|
-
return encodeURIComponent(base64String);
|
|
216246
|
-
}
|
|
216247
|
-
catch (error) {
|
|
216248
|
-
throw new Error(`Compression failed: ${error.message}`);
|
|
216249
|
-
}
|
|
216250
|
-
};
|
|
216251
|
-
|
|
216252
|
-
/* eslint-disable no-case-declarations */
|
|
216253
216209
|
/**
|
|
216254
216210
|
* Converts a record of parameters to a query string.
|
|
216255
216211
|
*/
|
|
@@ -216268,7 +216224,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216268
216224
|
/**
|
|
216269
216225
|
* Maps the flow configuration and params to the corresponding query parameters.
|
|
216270
216226
|
*/
|
|
216271
|
-
const getIframeParams =
|
|
216227
|
+
const getIframeParams = (params, widgetConfig, checkoutConfig) => {
|
|
216272
216228
|
const { flow } = params;
|
|
216273
216229
|
const commonConfig = {
|
|
216274
216230
|
theme: widgetConfig.theme,
|
|
@@ -216338,7 +216294,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216338
216294
|
toAmount: params.tokenAddress,
|
|
216339
216295
|
});
|
|
216340
216296
|
case CheckoutFlowType.SALE:
|
|
216341
|
-
const items = await encodeObject(params.items || []);
|
|
216342
216297
|
return toQueryString({
|
|
216343
216298
|
...commonConfig,
|
|
216344
216299
|
...(widgetConfig.sale || {}),
|
|
@@ -216351,7 +216306,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216351
216306
|
// TODO: Get from hub
|
|
216352
216307
|
environmentId: params.environmentId,
|
|
216353
216308
|
collectionName: params.collectionName,
|
|
216354
|
-
items,
|
|
216309
|
+
items: params.items,
|
|
216355
216310
|
preferredCurrency: params.preferredCurrency,
|
|
216356
216311
|
excludePaymentTypes: params.excludePaymentTypes,
|
|
216357
216312
|
excludeFiatCurrencies: params.excludeFiatCurrencies,
|
|
@@ -216363,11 +216318,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216363
216318
|
/**
|
|
216364
216319
|
* Returns the iframe URL for the Checkout App based on the environment.
|
|
216365
216320
|
*/
|
|
216366
|
-
const getIframeURL =
|
|
216321
|
+
const getIframeURL = (params, widgetConfig, checkoutConfig) => {
|
|
216367
216322
|
const { flow } = params;
|
|
216368
216323
|
const { publishableKey } = checkoutConfig;
|
|
216369
|
-
|
|
216370
|
-
return '';
|
|
216324
|
+
const language = params.language || widgetConfig.language;
|
|
216371
216325
|
let environment = checkoutConfig.environment || Environment$1.SANDBOX;
|
|
216372
216326
|
if (checkoutConfig.isDevelopment) {
|
|
216373
216327
|
environment = ENV_DEVELOPMENT;
|
|
@@ -216375,11 +216329,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216375
216329
|
if (checkoutConfig.overrides?.environment) {
|
|
216376
216330
|
environment = checkoutConfig.overrides.environment;
|
|
216377
216331
|
}
|
|
216378
|
-
const baseURL = checkoutConfig.overrides?.checkoutAppUrl
|
|
216379
|
-
|
|
216380
|
-
const
|
|
216381
|
-
|
|
216382
|
-
return iframeURL;
|
|
216332
|
+
const baseURL = checkoutConfig.overrides?.checkoutAppUrl ?? CHECKOUT_APP_URL[environment];
|
|
216333
|
+
const queryParams = getIframeParams(params, widgetConfig, checkoutConfig);
|
|
216334
|
+
const iframeURL = `${baseURL}/${publishableKey}/${language}/${flow}?${queryParams}`;
|
|
216335
|
+
return [baseURL, iframeURL];
|
|
216383
216336
|
};
|
|
216384
216337
|
|
|
216385
216338
|
/**
|
|
@@ -216399,28 +216352,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
216399
216352
|
}, [deps, effect, compare]);
|
|
216400
216353
|
};
|
|
216401
216354
|
|
|
216402
|
-
/**
|
|
216403
|
-
* Handle asynchronous operations with memoization.
|
|
216404
|
-
* It only re-executes the async function when dependencies change.
|
|
216405
|
-
*/
|
|
216406
|
-
const useAsyncMemo = (asyncFn, dependencies) => {
|
|
216407
|
-
const [value, setValue] = reactExports.useState();
|
|
216408
|
-
reactExports.useEffect(() => {
|
|
216409
|
-
let isMounted = true;
|
|
216410
|
-
asyncFn().then((result) => {
|
|
216411
|
-
if (isMounted)
|
|
216412
|
-
setValue(result);
|
|
216413
|
-
});
|
|
216414
|
-
return () => {
|
|
216415
|
-
isMounted = false;
|
|
216416
|
-
};
|
|
216417
|
-
}, dependencies);
|
|
216418
|
-
return value;
|
|
216419
|
-
};
|
|
216420
|
-
|
|
216421
216355
|
function CheckoutWidget(props) {
|
|
216422
216356
|
const { config, checkout, params, provider, } = props;
|
|
216423
|
-
const iframeURL =
|
|
216357
|
+
const [, iframeURL] = reactExports.useMemo(() => {
|
|
216358
|
+
if (!checkout.config.publishableKey)
|
|
216359
|
+
return ['', ''];
|
|
216360
|
+
return getIframeURL(params, config, checkout.config);
|
|
216361
|
+
}, [params, config, checkout.config]);
|
|
216424
216362
|
const [checkoutState, checkoutDispatch] = reactExports.useReducer(checkoutReducer, initialCheckoutState);
|
|
216425
216363
|
const checkoutReducerValues = reactExports.useMemo(() => ({
|
|
216426
216364
|
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-8m8-bJcZ.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-BxF866Mh.js';
|
|
13
|
+
import { B as BlockchainData } from './index-XxjQ6oVx.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.52.0
|
|
19209
|
+
const SDK_VERSION = '1.52.0';
|
|
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.52.0
|
|
24603
|
+
const SDK_VERSION_MARKER = '1.52.0';
|
|
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
|
|
|
@@ -29355,7 +29355,6 @@ var PostMessageHandlerEventType;
|
|
|
29355
29355
|
PostMessageHandlerEventType["PROVIDER_UPDATED"] = "IMTBL_PROVIDER_UPDATED";
|
|
29356
29356
|
PostMessageHandlerEventType["EIP_6963_EVENT"] = "IMTBL_EIP_6963_EVENT";
|
|
29357
29357
|
PostMessageHandlerEventType["WIDGET_EVENT"] = "IMTBL_CHECKOUT_WIDGET_EVENT";
|
|
29358
|
-
PostMessageHandlerEventType["WIDGET_PROVIDER_EVENT"] = "IMTBL_WIDGET_PROVIDER_EVENT";
|
|
29359
29358
|
})(PostMessageHandlerEventType || (PostMessageHandlerEventType = {}));
|
|
29360
29359
|
|
|
29361
29360
|
class PostMessageHandler {
|
package/dist/checkout.d.ts
CHANGED
|
@@ -17293,8 +17293,7 @@ declare enum PostMessageHandlerEventType {
|
|
|
17293
17293
|
PROVIDER_RELAY = "IMTBL_PROVIDER_RELAY",
|
|
17294
17294
|
PROVIDER_UPDATED = "IMTBL_PROVIDER_UPDATED",
|
|
17295
17295
|
EIP_6963_EVENT = "IMTBL_EIP_6963_EVENT",
|
|
17296
|
-
WIDGET_EVENT = "IMTBL_CHECKOUT_WIDGET_EVENT"
|
|
17297
|
-
WIDGET_PROVIDER_EVENT = "IMTBL_WIDGET_PROVIDER_EVENT"
|
|
17296
|
+
WIDGET_EVENT = "IMTBL_CHECKOUT_WIDGET_EVENT"
|
|
17298
17297
|
}
|
|
17299
17298
|
type WidgetEventDetail<T extends WidgetType> = {
|
|
17300
17299
|
[K in keyof WidgetEventData[T]]: {
|
|
@@ -17326,9 +17325,6 @@ type PostMessageData = {
|
|
|
17326
17325
|
} | {
|
|
17327
17326
|
type: PostMessageHandlerEventType.WIDGET_EVENT;
|
|
17328
17327
|
payload: PostMessageWidgetEventData;
|
|
17329
|
-
} | {
|
|
17330
|
-
type: PostMessageHandlerEventType.WIDGET_PROVIDER_EVENT;
|
|
17331
|
-
payload: any;
|
|
17332
17328
|
};
|
|
17333
17329
|
|
|
17334
17330
|
type PostMessageHandlerConfiguration = {
|
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-DxDRj3k-.js';
|
|
2
|
+
import './index-8m8-bJcZ.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-BxF866Mh.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-XxjQ6oVx.js';
|
|
20
|
+
import './index-snMwBaY-.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-8m8-bJcZ.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-8m8-bJcZ.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-snMwBaY-.js';
|
|
2
|
+
import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-8m8-bJcZ.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.52.0
|
|
19
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.52.0' };
|
|
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.52.0
|
|
60
|
+
sdkVersion: 'ts-immutable-sdk-1.52.0',
|
|
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.52.0
|
|
161
|
+
const SDK_VERSION = '1.52.0';
|
|
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-8m8-bJcZ.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-snMwBaY-.js';
|
|
2
|
+
import { E as Environment, a as addKeysToHeadersOverride } from './index-8m8-bJcZ.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.52.0
|
|
24
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.52.0',
|
|
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.52.0
|
|
13994
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.52.0' };
|
|
13995
13995
|
const createConfig = ({ basePath, headers, }) => {
|
|
13996
13996
|
if (!basePath.trim()) {
|
|
13997
13997
|
throw Error('basePath can not be empty');
|