@imtbl/sdk 1.26.7 → 1.26.9
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.js +2 -2
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/checkout.d.ts +1 -1
- package/dist/checkout.js +16 -11
- package/dist/config.js +1 -1
- package/dist/index.browser.js +43 -26
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +505 -2904
- package/dist/index.d.ts +41 -24
- package/dist/index.js +498 -2897
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +5 -2402
- package/dist/x.d.ts +40 -22
- package/dist/x.js +5 -2410
- package/package.json +3 -2
package/dist/checkout.d.ts
CHANGED
|
@@ -14345,7 +14345,7 @@ interface SmartCheckoutParams {
|
|
|
14345
14345
|
/** The item requirements for the transaction. */
|
|
14346
14346
|
itemRequirements: (NativeItemRequirement | ERC20ItemRequirement | ERC721ItemRequirement)[];
|
|
14347
14347
|
/** The transaction or gas amount. */
|
|
14348
|
-
transactionOrGasAmount
|
|
14348
|
+
transactionOrGasAmount?: FulfillmentTransaction | GasAmount;
|
|
14349
14349
|
}
|
|
14350
14350
|
/**
|
|
14351
14351
|
* Represents a native item requirement for a transaction.
|
package/dist/checkout.js
CHANGED
|
@@ -140,7 +140,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
143
|
-
const SDK_VERSION$1 = '1.26.
|
|
143
|
+
const SDK_VERSION$1 = '1.26.9';
|
|
144
144
|
const getReferrer$1 = () => {
|
|
145
145
|
if (isNode$1()) {
|
|
146
146
|
return '';
|
|
@@ -17583,7 +17583,7 @@ const flattenProperties = (properties) => {
|
|
|
17583
17583
|
};
|
|
17584
17584
|
|
|
17585
17585
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
17586
|
-
const SDK_VERSION = '1.26.
|
|
17586
|
+
const SDK_VERSION = '1.26.9';
|
|
17587
17587
|
const getReferrer = () => {
|
|
17588
17588
|
if (isNode()) {
|
|
17589
17589
|
return '';
|
|
@@ -28885,7 +28885,7 @@ class APIError extends Error {
|
|
|
28885
28885
|
|
|
28886
28886
|
/* eslint-disable implicit-arrow-linebreak */
|
|
28887
28887
|
const defaultHeaders = {
|
|
28888
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.26.
|
|
28888
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.26.9',
|
|
28889
28889
|
};
|
|
28890
28890
|
/**
|
|
28891
28891
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -30316,7 +30316,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
30316
30316
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
30317
30317
|
};
|
|
30318
30318
|
|
|
30319
|
-
const SDK_VERSION_MARKER = '1.26.
|
|
30319
|
+
const SDK_VERSION_MARKER = '1.26.9';
|
|
30320
30320
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
30321
30321
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
30322
30322
|
|
|
@@ -31422,11 +31422,12 @@ const getERC721ApprovedAddress = async (provider, contractAddress, id) => {
|
|
|
31422
31422
|
}
|
|
31423
31423
|
};
|
|
31424
31424
|
const convertIdToNumber = (id, contractAddress) => {
|
|
31425
|
-
|
|
31426
|
-
|
|
31425
|
+
try {
|
|
31426
|
+
return BigNumber$1.from(id);
|
|
31427
|
+
}
|
|
31428
|
+
catch (e) {
|
|
31427
31429
|
throw new CheckoutError('Invalid ERC721 ID', CheckoutErrorType.GET_ERC721_ALLOWANCE_ERROR, { id, contractAddress });
|
|
31428
31430
|
}
|
|
31429
|
-
return parsedId;
|
|
31430
31431
|
};
|
|
31431
31432
|
const getApprovedCollections = async (provider, itemRequirements, owner) => {
|
|
31432
31433
|
const approvedCollections = new Map();
|
|
@@ -33210,10 +33211,14 @@ const smartCheckout = async (config, provider, itemRequirements, transactionOrGa
|
|
|
33210
33211
|
const erc721AllowancePromise = hasERC721Allowances(provider, ownerAddress, aggregatedItems);
|
|
33211
33212
|
const resolvedAllowances = await measureAsyncExecution(config, 'Time to calculate token allowances', Promise.all([erc20AllowancePromise, erc721AllowancePromise]));
|
|
33212
33213
|
const aggregatedAllowances = allowanceAggregator(resolvedAllowances[0], resolvedAllowances[1]);
|
|
33213
|
-
|
|
33214
|
-
|
|
33215
|
-
|
|
33216
|
-
|
|
33214
|
+
// Skip gas calculation if transactionOrGasAmount is not provided
|
|
33215
|
+
let gasItem = null;
|
|
33216
|
+
if (transactionOrGasAmount) {
|
|
33217
|
+
gasItem = await measureAsyncExecution(config, 'Time to run gas calculator', gasCalculator(provider, aggregatedAllowances, transactionOrGasAmount));
|
|
33218
|
+
if (gasItem !== null) {
|
|
33219
|
+
aggregatedItems.push(gasItem);
|
|
33220
|
+
aggregatedItems = itemAggregator(aggregatedItems);
|
|
33221
|
+
}
|
|
33217
33222
|
}
|
|
33218
33223
|
const balanceCheckResult = await measureAsyncExecution(config, 'Time to run balance checks', balanceCheck(config, provider, ownerAddress, aggregatedItems, true));
|
|
33219
33224
|
const { sufficient } = balanceCheckResult;
|
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.26.
|
|
131
|
+
const SDK_VERSION = '1.26.9';
|
|
132
132
|
const getReferrer = () => {
|
|
133
133
|
if (isNode()) {
|
|
134
134
|
return '';
|