@imtbl/sdk 1.26.7 → 1.26.8
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 +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +19 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -14
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +4 -4
- package/dist/x.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -181,7 +181,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
184
|
-
const SDK_VERSION$1 = '1.26.
|
|
184
|
+
const SDK_VERSION$1 = '1.26.8';
|
|
185
185
|
const getReferrer$1 = () => {
|
|
186
186
|
if (isNode$1()) {
|
|
187
187
|
return '';
|
|
@@ -14333,7 +14333,7 @@ class MultiRollupApiClients {
|
|
|
14333
14333
|
}
|
|
14334
14334
|
|
|
14335
14335
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14336
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.26.
|
|
14336
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.26.8' };
|
|
14337
14337
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
14338
14338
|
if (!basePath.trim()) {
|
|
14339
14339
|
throw Error('basePath can not be empty');
|
|
@@ -14405,7 +14405,7 @@ class APIError extends Error {
|
|
|
14405
14405
|
|
|
14406
14406
|
/* eslint-disable implicit-arrow-linebreak */
|
|
14407
14407
|
const defaultHeaders$1 = {
|
|
14408
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.26.
|
|
14408
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.26.8',
|
|
14409
14409
|
};
|
|
14410
14410
|
/**
|
|
14411
14411
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14879,7 +14879,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14879
14879
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14880
14880
|
class ApiConfiguration extends index$2.Configuration {
|
|
14881
14881
|
}
|
|
14882
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.
|
|
14882
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.8' };
|
|
14883
14883
|
/**
|
|
14884
14884
|
* @dev use createImmutableXConfiguration instead
|
|
14885
14885
|
*/
|
|
@@ -14918,7 +14918,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14918
14918
|
chainID,
|
|
14919
14919
|
coreContractAddress,
|
|
14920
14920
|
registrationContractAddress,
|
|
14921
|
-
sdkVersion: 'ts-immutable-sdk-1.26.
|
|
14921
|
+
sdkVersion: 'ts-immutable-sdk-1.26.8',
|
|
14922
14922
|
baseConfig,
|
|
14923
14923
|
});
|
|
14924
14924
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -46316,7 +46316,7 @@ const flattenProperties = (properties) => {
|
|
|
46316
46316
|
};
|
|
46317
46317
|
|
|
46318
46318
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
46319
|
-
const SDK_VERSION = '1.26.
|
|
46319
|
+
const SDK_VERSION = '1.26.8';
|
|
46320
46320
|
const getReferrer = () => {
|
|
46321
46321
|
if (isNode()) {
|
|
46322
46322
|
return '';
|
|
@@ -51511,7 +51511,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
51511
51511
|
maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
|
|
51512
51512
|
};
|
|
51513
51513
|
|
|
51514
|
-
const SDK_VERSION_MARKER = '1.26.
|
|
51514
|
+
const SDK_VERSION_MARKER = '1.26.8';
|
|
51515
51515
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
51516
51516
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
51517
51517
|
|
|
@@ -52617,11 +52617,12 @@ const getERC721ApprovedAddress = async (provider, contractAddress, id) => {
|
|
|
52617
52617
|
}
|
|
52618
52618
|
};
|
|
52619
52619
|
const convertIdToNumber = (id, contractAddress) => {
|
|
52620
|
-
|
|
52621
|
-
|
|
52620
|
+
try {
|
|
52621
|
+
return ethers.BigNumber.from(id);
|
|
52622
|
+
}
|
|
52623
|
+
catch (e) {
|
|
52622
52624
|
throw new CheckoutError('Invalid ERC721 ID', CheckoutErrorType.GET_ERC721_ALLOWANCE_ERROR, { id, contractAddress });
|
|
52623
52625
|
}
|
|
52624
|
-
return parsedId;
|
|
52625
52626
|
};
|
|
52626
52627
|
const getApprovedCollections = async (provider, itemRequirements, owner) => {
|
|
52627
52628
|
const approvedCollections = new Map();
|
|
@@ -54405,10 +54406,14 @@ const smartCheckout = async (config, provider, itemRequirements, transactionOrGa
|
|
|
54405
54406
|
const erc721AllowancePromise = hasERC721Allowances(provider, ownerAddress, aggregatedItems);
|
|
54406
54407
|
const resolvedAllowances = await measureAsyncExecution(config, 'Time to calculate token allowances', Promise.all([erc20AllowancePromise, erc721AllowancePromise]));
|
|
54407
54408
|
const aggregatedAllowances = allowanceAggregator(resolvedAllowances[0], resolvedAllowances[1]);
|
|
54408
|
-
|
|
54409
|
-
|
|
54410
|
-
|
|
54411
|
-
|
|
54409
|
+
// Skip gas calculation if transactionOrGasAmount is not provided
|
|
54410
|
+
let gasItem = null;
|
|
54411
|
+
if (transactionOrGasAmount) {
|
|
54412
|
+
gasItem = await measureAsyncExecution(config, 'Time to run gas calculator', gasCalculator(provider, aggregatedAllowances, transactionOrGasAmount));
|
|
54413
|
+
if (gasItem !== null) {
|
|
54414
|
+
aggregatedItems.push(gasItem);
|
|
54415
|
+
aggregatedItems = itemAggregator(aggregatedItems);
|
|
54416
|
+
}
|
|
54412
54417
|
}
|
|
54413
54418
|
const balanceCheckResult = await measureAsyncExecution(config, 'Time to run balance checks', balanceCheck(config, provider, ownerAddress, aggregatedItems, true));
|
|
54414
54419
|
const { sufficient } = balanceCheckResult;
|
package/dist/index.d.ts
CHANGED
|
@@ -26058,7 +26058,7 @@ interface SmartCheckoutParams {
|
|
|
26058
26058
|
/** The item requirements for the transaction. */
|
|
26059
26059
|
itemRequirements: (NativeItemRequirement | ERC20ItemRequirement | ERC721ItemRequirement)[];
|
|
26060
26060
|
/** The transaction or gas amount. */
|
|
26061
|
-
transactionOrGasAmount
|
|
26061
|
+
transactionOrGasAmount?: FulfillmentTransaction | GasAmount;
|
|
26062
26062
|
}
|
|
26063
26063
|
/**
|
|
26064
26064
|
* Represents a native item requirement for a transaction.
|
package/dist/index.js
CHANGED
|
@@ -159,7 +159,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
162
|
-
const SDK_VERSION$1 = '1.26.
|
|
162
|
+
const SDK_VERSION$1 = '1.26.8';
|
|
163
163
|
const getReferrer$1 = () => {
|
|
164
164
|
if (isNode$1()) {
|
|
165
165
|
return '';
|
|
@@ -14311,7 +14311,7 @@ class MultiRollupApiClients {
|
|
|
14311
14311
|
}
|
|
14312
14312
|
|
|
14313
14313
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14314
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.26.
|
|
14314
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.26.8' };
|
|
14315
14315
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
14316
14316
|
if (!basePath.trim()) {
|
|
14317
14317
|
throw Error('basePath can not be empty');
|
|
@@ -14383,7 +14383,7 @@ class APIError extends Error {
|
|
|
14383
14383
|
|
|
14384
14384
|
/* eslint-disable implicit-arrow-linebreak */
|
|
14385
14385
|
const defaultHeaders$1 = {
|
|
14386
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.26.
|
|
14386
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.26.8',
|
|
14387
14387
|
};
|
|
14388
14388
|
/**
|
|
14389
14389
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14857,7 +14857,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14857
14857
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14858
14858
|
class ApiConfiguration extends index$2.Configuration {
|
|
14859
14859
|
}
|
|
14860
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.
|
|
14860
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.8' };
|
|
14861
14861
|
/**
|
|
14862
14862
|
* @dev use createImmutableXConfiguration instead
|
|
14863
14863
|
*/
|
|
@@ -14896,7 +14896,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14896
14896
|
chainID,
|
|
14897
14897
|
coreContractAddress,
|
|
14898
14898
|
registrationContractAddress,
|
|
14899
|
-
sdkVersion: 'ts-immutable-sdk-1.26.
|
|
14899
|
+
sdkVersion: 'ts-immutable-sdk-1.26.8',
|
|
14900
14900
|
baseConfig,
|
|
14901
14901
|
});
|
|
14902
14902
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -46294,7 +46294,7 @@ const flattenProperties = (properties) => {
|
|
|
46294
46294
|
};
|
|
46295
46295
|
|
|
46296
46296
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
46297
|
-
const SDK_VERSION = '1.26.
|
|
46297
|
+
const SDK_VERSION = '1.26.8';
|
|
46298
46298
|
const getReferrer = () => {
|
|
46299
46299
|
if (isNode()) {
|
|
46300
46300
|
return '';
|
|
@@ -51489,7 +51489,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
51489
51489
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
51490
51490
|
};
|
|
51491
51491
|
|
|
51492
|
-
const SDK_VERSION_MARKER = '1.26.
|
|
51492
|
+
const SDK_VERSION_MARKER = '1.26.8';
|
|
51493
51493
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
51494
51494
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
51495
51495
|
|
|
@@ -52595,11 +52595,12 @@ const getERC721ApprovedAddress = async (provider, contractAddress, id) => {
|
|
|
52595
52595
|
}
|
|
52596
52596
|
};
|
|
52597
52597
|
const convertIdToNumber = (id, contractAddress) => {
|
|
52598
|
-
|
|
52599
|
-
|
|
52598
|
+
try {
|
|
52599
|
+
return BigNumber$1.from(id);
|
|
52600
|
+
}
|
|
52601
|
+
catch (e) {
|
|
52600
52602
|
throw new CheckoutError('Invalid ERC721 ID', CheckoutErrorType.GET_ERC721_ALLOWANCE_ERROR, { id, contractAddress });
|
|
52601
52603
|
}
|
|
52602
|
-
return parsedId;
|
|
52603
52604
|
};
|
|
52604
52605
|
const getApprovedCollections = async (provider, itemRequirements, owner) => {
|
|
52605
52606
|
const approvedCollections = new Map();
|
|
@@ -54383,10 +54384,14 @@ const smartCheckout = async (config, provider, itemRequirements, transactionOrGa
|
|
|
54383
54384
|
const erc721AllowancePromise = hasERC721Allowances(provider, ownerAddress, aggregatedItems);
|
|
54384
54385
|
const resolvedAllowances = await measureAsyncExecution(config, 'Time to calculate token allowances', Promise.all([erc20AllowancePromise, erc721AllowancePromise]));
|
|
54385
54386
|
const aggregatedAllowances = allowanceAggregator(resolvedAllowances[0], resolvedAllowances[1]);
|
|
54386
|
-
|
|
54387
|
-
|
|
54388
|
-
|
|
54389
|
-
|
|
54387
|
+
// Skip gas calculation if transactionOrGasAmount is not provided
|
|
54388
|
+
let gasItem = null;
|
|
54389
|
+
if (transactionOrGasAmount) {
|
|
54390
|
+
gasItem = await measureAsyncExecution(config, 'Time to run gas calculator', gasCalculator(provider, aggregatedAllowances, transactionOrGasAmount));
|
|
54391
|
+
if (gasItem !== null) {
|
|
54392
|
+
aggregatedItems.push(gasItem);
|
|
54393
|
+
aggregatedItems = itemAggregator(aggregatedItems);
|
|
54394
|
+
}
|
|
54390
54395
|
}
|
|
54391
54396
|
const balanceCheckResult = await measureAsyncExecution(config, 'Time to run balance checks', balanceCheck(config, provider, ownerAddress, aggregatedItems, true));
|
|
54392
54397
|
const { sufficient } = balanceCheckResult;
|
package/dist/orderbook.js
CHANGED
|
@@ -132,7 +132,7 @@ const flattenProperties = (properties) => {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
135
|
-
const SDK_VERSION = '1.26.
|
|
135
|
+
const SDK_VERSION = '1.26.8';
|
|
136
136
|
const getReferrer = () => {
|
|
137
137
|
if (isNode()) {
|
|
138
138
|
return '';
|
package/dist/passport.js
CHANGED
|
@@ -11563,7 +11563,7 @@ class MultiRollupApiClients {
|
|
|
11563
11563
|
}
|
|
11564
11564
|
|
|
11565
11565
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11566
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.26.
|
|
11566
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.26.8' };
|
|
11567
11567
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
11568
11568
|
if (!basePath.trim()) {
|
|
11569
11569
|
throw Error('basePath can not be empty');
|
|
@@ -11742,7 +11742,7 @@ const flattenProperties = (properties) => {
|
|
|
11742
11742
|
};
|
|
11743
11743
|
|
|
11744
11744
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
11745
|
-
const SDK_VERSION = '1.26.
|
|
11745
|
+
const SDK_VERSION = '1.26.8';
|
|
11746
11746
|
const getReferrer = () => {
|
|
11747
11747
|
if (isNode()) {
|
|
11748
11748
|
return '';
|
|
@@ -11992,7 +11992,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
11992
11992
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
11993
11993
|
class ApiConfiguration extends index$2.Configuration {
|
|
11994
11994
|
}
|
|
11995
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.
|
|
11995
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.8' };
|
|
11996
11996
|
/**
|
|
11997
11997
|
* @dev use createImmutableXConfiguration instead
|
|
11998
11998
|
*/
|
|
@@ -12031,7 +12031,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
12031
12031
|
chainID,
|
|
12032
12032
|
coreContractAddress,
|
|
12033
12033
|
registrationContractAddress,
|
|
12034
|
-
sdkVersion: 'ts-immutable-sdk-1.26.
|
|
12034
|
+
sdkVersion: 'ts-immutable-sdk-1.26.8',
|
|
12035
12035
|
baseConfig,
|
|
12036
12036
|
});
|
|
12037
12037
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/dist/x.js
CHANGED
|
@@ -9003,7 +9003,7 @@ const flattenProperties = (properties) => {
|
|
|
9003
9003
|
};
|
|
9004
9004
|
|
|
9005
9005
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
9006
|
-
const SDK_VERSION = '1.26.
|
|
9006
|
+
const SDK_VERSION = '1.26.8';
|
|
9007
9007
|
const getReferrer = () => {
|
|
9008
9008
|
if (isNode()) {
|
|
9009
9009
|
return '';
|
|
@@ -9246,7 +9246,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
9246
9246
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
9247
9247
|
class ApiConfiguration extends index$2.Configuration {
|
|
9248
9248
|
}
|
|
9249
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.
|
|
9249
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.26.8' };
|
|
9250
9250
|
/**
|
|
9251
9251
|
* @dev use createImmutableXConfiguration instead
|
|
9252
9252
|
*/
|
|
@@ -9285,7 +9285,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
9285
9285
|
chainID,
|
|
9286
9286
|
coreContractAddress,
|
|
9287
9287
|
registrationContractAddress,
|
|
9288
|
-
sdkVersion: 'ts-immutable-sdk-1.26.
|
|
9288
|
+
sdkVersion: 'ts-immutable-sdk-1.26.8',
|
|
9289
9289
|
baseConfig,
|
|
9290
9290
|
});
|
|
9291
9291
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/package.json
CHANGED