@imtbl/sdk 1.47.2-alpha → 1.47.4-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-CYDJnqwk.js → blockchain_data-CbBJsalL.js} +2 -2
- package/dist/blockchain_data.js +3 -3
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/{checkout-LOXnSKL6.js → checkout-B7xLDjmO.js} +8 -5
- package/dist/checkout.d.ts +1 -0
- package/dist/checkout.js +5 -5
- package/dist/{config-G7gJjF_C.js → config-BYNJw3md.js} +1 -1
- package/dist/config.js +1 -1
- package/dist/{index-DtSdLtV-.js → index-C42TjV84.js} +1 -1
- package/dist/{index-Bm9bq6An.js → index-CW8ylME5.js} +4 -4
- package/dist/{index-DiOzfTJ-.js → index-DL2_Qli2.js} +3 -3
- package/dist/{index-BH5dp6EM.js → index-DYxygwhG.js} +1 -1
- package/dist/{index-CYRF7M9x.js → index-DvP-uJex.js} +6 -63
- package/dist/{index-BkJ3X-zS.js → index-d4gxVDah.js} +1 -1
- package/dist/index.browser.js +5 -5
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +15 -69
- package/dist/index.d.ts +3 -5
- package/dist/index.js +14 -14
- package/dist/{minting_backend-BJpFwBu9.js → minting_backend-uIbayhXa.js} +3 -3
- package/dist/minting_backend.js +5 -5
- package/dist/{orderbook-CT9K2EiU.js → orderbook-DG-99QpD.js} +1 -1
- package/dist/orderbook.d.ts +2 -5
- package/dist/orderbook.js +4 -4
- package/dist/{passport-zLKPkNSJ.js → passport-BZiTNYmZ.js} +3 -3
- package/dist/passport.js +4 -4
- package/dist/{webhook-B8RsrpA9.js → webhook-Dku53DbA.js} +1 -1
- package/dist/webhook.js +2 -2
- package/dist/{x-rkvSakBu.js → x-DoAGu-CP.js} +3 -3
- package/dist/x.js +4 -4
- package/package.json +1 -1
|
@@ -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-DYxygwhG.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-DvP-uJex.js';
|
|
13
|
+
import { B as BlockchainData } from './index-DL2_Qli2.js';
|
|
14
14
|
|
|
15
15
|
function bind(fn, thisArg) {
|
|
16
16
|
return function wrap() {
|
|
@@ -19154,7 +19154,7 @@ const flattenProperties = (properties) => {
|
|
|
19154
19154
|
};
|
|
19155
19155
|
|
|
19156
19156
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
19157
|
-
const SDK_VERSION = '1.47.
|
|
19157
|
+
const SDK_VERSION = '1.47.4-alpha';
|
|
19158
19158
|
const getFrameParentDomain = () => {
|
|
19159
19159
|
if (isNode()) {
|
|
19160
19160
|
return '';
|
|
@@ -24518,7 +24518,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
24518
24518
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
24519
24519
|
};
|
|
24520
24520
|
|
|
24521
|
-
const SDK_VERSION_MARKER = '1.47.
|
|
24521
|
+
const SDK_VERSION_MARKER = '1.47.4-alpha';
|
|
24522
24522
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
24523
24523
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
24524
24524
|
|
|
@@ -28786,6 +28786,9 @@ class Checkout {
|
|
|
28786
28786
|
onInjectedProvidersChange(listener) {
|
|
28787
28787
|
return InjectedProvidersManager.getInstance().subscribe(listener);
|
|
28788
28788
|
}
|
|
28789
|
+
clearInjectedProviders() {
|
|
28790
|
+
return InjectedProvidersManager.getInstance().clear();
|
|
28791
|
+
}
|
|
28789
28792
|
/**
|
|
28790
28793
|
* Checks if a wallet is connected to the specified provider.
|
|
28791
28794
|
* @param {CheckConnectionParams} params - The parameters for checking the wallet connection.
|
package/dist/checkout.d.ts
CHANGED
|
@@ -16785,6 +16785,7 @@ declare class Checkout {
|
|
|
16785
16785
|
* @param listener - The listener to be called when the injected providers change.
|
|
16786
16786
|
*/
|
|
16787
16787
|
onInjectedProvidersChange(listener: (providers: EIP6963ProviderDetail[]) => void): () => void;
|
|
16788
|
+
clearInjectedProviders(): void;
|
|
16788
16789
|
/**
|
|
16789
16790
|
* Checks if a wallet is connected to the specified provider.
|
|
16790
16791
|
* @param {CheckConnectionParams} params - The parameters for checking the wallet connection.
|
package/dist/checkout.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { 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 SwapEventType, T as TokenFilterTypes, y as TransactionOrGasType, W as WalletEventType, z as WalletFilterTypes, A as WalletProviderName, D as WalletProviderRdns, H as WidgetTheme, J as WidgetType, K as getMetaMaskProviderDetail, L as getPassportProviderDetail, M as isAddressSanctioned, Q as validateProvider } from './checkout-
|
|
2
|
-
import './index-
|
|
1
|
+
export { 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 SwapEventType, T as TokenFilterTypes, y as TransactionOrGasType, W as WalletEventType, z as WalletFilterTypes, A as WalletProviderName, D as WalletProviderRdns, H as WidgetTheme, J as WidgetType, K as getMetaMaskProviderDetail, L as getPassportProviderDetail, M as isAddressSanctioned, Q as validateProvider } from './checkout-B7xLDjmO.js';
|
|
2
|
+
import './index-DYxygwhG.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-DvP-uJex.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-DL2_Qli2.js';
|
|
20
|
+
import './index-C42TjV84.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-DYxygwhG.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-DYxygwhG.js';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'lru-memorise';
|
|
4
4
|
import 'global-const';
|
|
@@ -13838,7 +13838,7 @@ class MultiRollupApiClients {
|
|
|
13838
13838
|
}
|
|
13839
13839
|
|
|
13840
13840
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13841
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.47.
|
|
13841
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.47.4-alpha' };
|
|
13842
13842
|
const createConfig = ({ basePath, headers, }) => {
|
|
13843
13843
|
if (!basePath.trim()) {
|
|
13844
13844
|
throw Error('basePath can not be empty');
|
|
@@ -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-C42TjV84.js';
|
|
2
|
+
import { a as addKeysToHeadersOverride, E as Environment, I as ImmutableConfiguration } from './index-DYxygwhG.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.47.
|
|
19
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.47.4-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.47.
|
|
60
|
+
sdkVersion: 'ts-immutable-sdk-1.47.4-alpha',
|
|
61
61
|
baseConfig,
|
|
62
62
|
});
|
|
63
63
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -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-C42TjV84.js';
|
|
2
|
+
import { E as Environment, a as addKeysToHeadersOverride } from './index-DYxygwhG.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.47.
|
|
24
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.47.4-alpha',
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -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.47.
|
|
161
|
+
const SDK_VERSION = '1.47.4-alpha';
|
|
162
162
|
const getFrameParentDomain = () => {
|
|
163
163
|
if (isNode()) {
|
|
164
164
|
return '';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as track, E as Environment } from './index-BH5dp6EM.js';
|
|
2
1
|
import globalAxios from 'axios';
|
|
3
2
|
import FormData from 'form-data';
|
|
4
3
|
import { providers, BigNumber, constants as constants$1 } from 'ethers';
|
|
5
4
|
import { ethers, FetchRequest, JsonRpcProvider, JsonRpcSigner, keccak256, toUtf8Bytes, concat, TypedDataEncoder, zeroPadValue, toBeHex, AbiCoder } from 'ethers-v6';
|
|
6
5
|
import { MerkleTree } from 'merkletreejs';
|
|
6
|
+
import { E as Environment } from './index-DYxygwhG.js';
|
|
7
7
|
import { Seaport as Seaport$1 } from '@opensea/seaport-js';
|
|
8
8
|
|
|
9
9
|
class BaseHttpRequest {
|
|
@@ -1829,14 +1829,11 @@ class Orderbook {
|
|
|
1829
1829
|
* Once the transactions are submitted and the message signed, call the completeListings method
|
|
1830
1830
|
* provided in the return type with the signature. This method supports up to 20 listing creations
|
|
1831
1831
|
* at a time. It can also be used for individual listings to simplify integration code paths.
|
|
1832
|
-
* Bulk listings created through an EOA (Metamask) will only require a single signature but
|
|
1833
|
-
* when using a smart contract wallet, multiple signatures (as many as the number of orders)
|
|
1834
|
-
* are required.
|
|
1835
1832
|
* @param {PrepareBulkListingsParams} prepareBulkListingsParams - Details about the listings
|
|
1836
1833
|
* to be created.
|
|
1837
1834
|
* @return {PrepareBulkListingsResponse} PrepareListingResponse includes
|
|
1838
1835
|
* any unsigned approval transactions, the typed bulk order message for signing and
|
|
1839
|
-
* the createListings method that can be called with the signature
|
|
1836
|
+
* the createListings method that can be called with the signature to create the listings.
|
|
1840
1837
|
*/
|
|
1841
1838
|
async prepareBulkListings({ makerAddress, listingParams, }) {
|
|
1842
1839
|
// Limit bulk listing creation to 20 orders to prevent API and order evaluation spam
|
|
@@ -1854,7 +1851,7 @@ class Orderbook {
|
|
|
1854
1851
|
makerFees: listingParams[0].makerFees,
|
|
1855
1852
|
orderComponents: prepareListingResponse.orderComponents,
|
|
1856
1853
|
orderHash: prepareListingResponse.orderHash,
|
|
1857
|
-
orderSignature:
|
|
1854
|
+
orderSignature: signature,
|
|
1858
1855
|
});
|
|
1859
1856
|
return {
|
|
1860
1857
|
result: [{
|
|
@@ -1866,57 +1863,6 @@ class Orderbook {
|
|
|
1866
1863
|
},
|
|
1867
1864
|
};
|
|
1868
1865
|
}
|
|
1869
|
-
const isSmartContractWallet = await this.orderbookConfig.provider.getCode(makerAddress) !== '0x';
|
|
1870
|
-
if (isSmartContractWallet) {
|
|
1871
|
-
track('orderbookmr', 'bulkListings', { walletType: 'Passport', makerAddress, listingsCount: listingParams.length });
|
|
1872
|
-
// eslint-disable-next-line max-len
|
|
1873
|
-
const prepareListingResponses = await Promise.all(listingParams.map((l) => this.seaport.prepareSeaportOrder(makerAddress, l.sell, l.buy, new Date(), l.orderExpiry || new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 2))));
|
|
1874
|
-
return {
|
|
1875
|
-
actions: prepareListingResponses.flatMap((r) => {
|
|
1876
|
-
const pendingApproval = [];
|
|
1877
|
-
const dedupedActions = [];
|
|
1878
|
-
r.actions.forEach((action) => {
|
|
1879
|
-
if (action.type === ActionType.TRANSACTION) {
|
|
1880
|
-
// Assuming only a single item is on offer per listing
|
|
1881
|
-
const contractAddress = r.orderComponents.offer[0].token;
|
|
1882
|
-
if (!pendingApproval.includes(contractAddress)) {
|
|
1883
|
-
pendingApproval.push(contractAddress);
|
|
1884
|
-
dedupedActions.push(action);
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
else {
|
|
1888
|
-
dedupedActions.push(action);
|
|
1889
|
-
}
|
|
1890
|
-
});
|
|
1891
|
-
return dedupedActions;
|
|
1892
|
-
}),
|
|
1893
|
-
completeListings: async (signatures) => {
|
|
1894
|
-
const createListingsApiResponses = await Promise.all(prepareListingResponses.map(async (prepareListingResponse, i) => {
|
|
1895
|
-
const signature = signatures[i];
|
|
1896
|
-
try {
|
|
1897
|
-
return await this.apiClient.createListing({
|
|
1898
|
-
makerFees: listingParams[i].makerFees,
|
|
1899
|
-
orderComponents: prepareListingResponse.orderComponents,
|
|
1900
|
-
orderHash: prepareListingResponse.orderHash,
|
|
1901
|
-
orderSignature: signature,
|
|
1902
|
-
});
|
|
1903
|
-
}
|
|
1904
|
-
catch {
|
|
1905
|
-
return undefined;
|
|
1906
|
-
}
|
|
1907
|
-
}));
|
|
1908
|
-
return {
|
|
1909
|
-
result: createListingsApiResponses.map((apiListingResponse, i) => ({
|
|
1910
|
-
success: !!apiListingResponse,
|
|
1911
|
-
orderHash: prepareListingResponses[i].orderHash,
|
|
1912
|
-
// eslint-disable-next-line max-len
|
|
1913
|
-
order: apiListingResponse ? mapFromOpenApiOrder(apiListingResponse.result) : undefined,
|
|
1914
|
-
})),
|
|
1915
|
-
};
|
|
1916
|
-
},
|
|
1917
|
-
};
|
|
1918
|
-
}
|
|
1919
|
-
track('orderbookmr', 'bulkListings', { walletType: 'EOA', makerAddress, listingsCount: listingParams.length });
|
|
1920
1866
|
const { actions, preparedListings } = await this.seaport.prepareBulkSeaportOrders(makerAddress, listingParams.map((orderParam) => ({
|
|
1921
1867
|
listingItem: orderParam.sell,
|
|
1922
1868
|
considerationItem: orderParam.buy,
|
|
@@ -1925,14 +1871,11 @@ class Orderbook {
|
|
|
1925
1871
|
})));
|
|
1926
1872
|
return {
|
|
1927
1873
|
actions,
|
|
1928
|
-
completeListings: async (
|
|
1929
|
-
if (signatures.length !== 1) {
|
|
1930
|
-
throw new Error('Only a single signature is expected for bulk listing creation');
|
|
1931
|
-
}
|
|
1874
|
+
completeListings: async (bulkOrderSignature) => {
|
|
1932
1875
|
const orderComponents = preparedListings.map((orderParam) => orderParam.orderComponents);
|
|
1933
|
-
const
|
|
1876
|
+
const signatures = getBulkSeaportOrderSignatures(bulkOrderSignature, orderComponents);
|
|
1934
1877
|
const createOrdersApiListingResponse = await Promise.all(orderComponents.map((orderComponent, i) => {
|
|
1935
|
-
const sig =
|
|
1878
|
+
const sig = signatures[i];
|
|
1936
1879
|
const listing = preparedListings[i];
|
|
1937
1880
|
const listingParam = listingParams[i];
|
|
1938
1881
|
return this.apiClient.createListing({
|