@imtbl/sdk 0.45.0 → 0.45.2
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.d.ts +1 -1
- package/dist/blockchain_data.js +1 -1
- package/dist/browser/checkout/sdk.js +5 -5
- package/dist/browser/checkout/widgets.js +1 -1
- package/dist/checkout.js +16 -10
- package/dist/index.browser.js +11 -11
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +18 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -12
- package/dist/passport.js +2 -2
- package/dist/x.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10641,7 +10641,7 @@ class MultiRollupApiClients {
|
|
|
10641
10641
|
}
|
|
10642
10642
|
|
|
10643
10643
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10644
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.45.
|
|
10644
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.45.2' };
|
|
10645
10645
|
const createConfig = ({ basePath, headers, }) => {
|
|
10646
10646
|
if (!basePath.trim()) {
|
|
10647
10647
|
throw Error('basePath can not be empty');
|
|
@@ -10713,7 +10713,7 @@ class APIError extends Error {
|
|
|
10713
10713
|
|
|
10714
10714
|
/* eslint-disable implicit-arrow-linebreak */
|
|
10715
10715
|
const defaultHeaders = {
|
|
10716
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.45.
|
|
10716
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.45.2',
|
|
10717
10717
|
};
|
|
10718
10718
|
/**
|
|
10719
10719
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -11152,7 +11152,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
11152
11152
|
chainID,
|
|
11153
11153
|
coreContractAddress,
|
|
11154
11154
|
registrationContractAddress,
|
|
11155
|
-
sdkVersion: 'ts-immutable-sdk-0.45.
|
|
11155
|
+
sdkVersion: 'ts-immutable-sdk-0.45.2',
|
|
11156
11156
|
});
|
|
11157
11157
|
/**
|
|
11158
11158
|
* Sets `sdkVersion` at the time of build
|
|
@@ -40903,13 +40903,13 @@ const ERC721ABI = [
|
|
|
40903
40903
|
},
|
|
40904
40904
|
];
|
|
40905
40905
|
// Gas overrides -- Anti-spam mechanism for when the baseFee drops low
|
|
40906
|
-
// https://
|
|
40907
|
-
const
|
|
40908
|
-
maxFeePerGas: ethers.BigNumber.from(
|
|
40909
|
-
maxPriorityFeePerGas: ethers.BigNumber.from(
|
|
40906
|
+
// https://docs.immutable.com/docs/zkEVM/architecture/gas-config
|
|
40907
|
+
const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
40908
|
+
maxFeePerGas: ethers.BigNumber.from(15e9),
|
|
40909
|
+
maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
|
|
40910
40910
|
};
|
|
40911
40911
|
|
|
40912
|
-
const SDK_VERSION_MARKER = '0.45.
|
|
40912
|
+
const SDK_VERSION_MARKER = '0.45.2';
|
|
40913
40913
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
40914
40914
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
40915
40915
|
|
|
@@ -41057,6 +41057,9 @@ class CheckoutConfiguration {
|
|
|
41057
41057
|
}
|
|
41058
41058
|
|
|
41059
41059
|
const isMatchingAddress = (addressA = '', addressB = '') => (addressA.toLowerCase() === addressB.toLowerCase());
|
|
41060
|
+
const isZkEvmChainId = (chainId) => chainId === ChainId.IMTBL_ZKEVM_DEVNET
|
|
41061
|
+
|| chainId === ChainId.IMTBL_ZKEVM_TESTNET
|
|
41062
|
+
|| chainId === ChainId.IMTBL_ZKEVM_MAINNET;
|
|
41060
41063
|
|
|
41061
41064
|
const getTokenAllowList = async (config, { type = TokenFilterTypes.ALL, chainId, exclude, }) => {
|
|
41062
41065
|
let tokens = [];
|
|
@@ -41593,16 +41596,19 @@ async function getWalletAllowList(params) {
|
|
|
41593
41596
|
};
|
|
41594
41597
|
}
|
|
41595
41598
|
|
|
41596
|
-
const setTransactionGasLimits = (transaction) => {
|
|
41599
|
+
const setTransactionGasLimits = async (web3Provider, transaction) => {
|
|
41597
41600
|
const rawTx = transaction;
|
|
41598
|
-
|
|
41599
|
-
|
|
41601
|
+
const { chainId } = await web3Provider.getNetwork();
|
|
41602
|
+
if (!isZkEvmChainId(chainId))
|
|
41603
|
+
return rawTx;
|
|
41604
|
+
rawTx.maxFeePerGas = IMMUTABLE_ZKVEM_GAS_OVERRIDES.maxFeePerGas;
|
|
41605
|
+
rawTx.maxPriorityFeePerGas = IMMUTABLE_ZKVEM_GAS_OVERRIDES.maxPriorityFeePerGas;
|
|
41600
41606
|
return rawTx;
|
|
41601
41607
|
};
|
|
41602
41608
|
const sendTransaction = async (web3Provider, transaction) => {
|
|
41603
41609
|
try {
|
|
41604
41610
|
const signer = web3Provider.getSigner();
|
|
41605
|
-
const rawTx = setTransactionGasLimits(transaction);
|
|
41611
|
+
const rawTx = await setTransactionGasLimits(web3Provider, transaction);
|
|
41606
41612
|
const transactionResponse = await signer.sendTransaction(rawTx);
|
|
41607
41613
|
return {
|
|
41608
41614
|
transactionResponse,
|
package/dist/index.d.ts
CHANGED
|
@@ -12071,7 +12071,7 @@ interface Collection$1 {
|
|
|
12071
12071
|
* @type {string}
|
|
12072
12072
|
* @memberof Collection
|
|
12073
12073
|
*/
|
|
12074
|
-
'
|
|
12074
|
+
'metadata_synced_at': string | null;
|
|
12075
12075
|
}
|
|
12076
12076
|
|
|
12077
12077
|
/**
|
package/dist/index.js
CHANGED
|
@@ -10619,7 +10619,7 @@ class MultiRollupApiClients {
|
|
|
10619
10619
|
}
|
|
10620
10620
|
|
|
10621
10621
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10622
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.45.
|
|
10622
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.45.2' };
|
|
10623
10623
|
const createConfig = ({ basePath, headers, }) => {
|
|
10624
10624
|
if (!basePath.trim()) {
|
|
10625
10625
|
throw Error('basePath can not be empty');
|
|
@@ -10691,7 +10691,7 @@ class APIError extends Error {
|
|
|
10691
10691
|
|
|
10692
10692
|
/* eslint-disable implicit-arrow-linebreak */
|
|
10693
10693
|
const defaultHeaders = {
|
|
10694
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.45.
|
|
10694
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.45.2',
|
|
10695
10695
|
};
|
|
10696
10696
|
/**
|
|
10697
10697
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -11130,7 +11130,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
11130
11130
|
chainID,
|
|
11131
11131
|
coreContractAddress,
|
|
11132
11132
|
registrationContractAddress,
|
|
11133
|
-
sdkVersion: 'ts-immutable-sdk-0.45.
|
|
11133
|
+
sdkVersion: 'ts-immutable-sdk-0.45.2',
|
|
11134
11134
|
});
|
|
11135
11135
|
/**
|
|
11136
11136
|
* Sets `sdkVersion` at the time of build
|
|
@@ -40881,13 +40881,13 @@ const ERC721ABI = [
|
|
|
40881
40881
|
},
|
|
40882
40882
|
];
|
|
40883
40883
|
// Gas overrides -- Anti-spam mechanism for when the baseFee drops low
|
|
40884
|
-
// https://
|
|
40885
|
-
const
|
|
40886
|
-
maxFeePerGas: BigNumber$1.from(
|
|
40887
|
-
maxPriorityFeePerGas: BigNumber$1.from(
|
|
40884
|
+
// https://docs.immutable.com/docs/zkEVM/architecture/gas-config
|
|
40885
|
+
const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
40886
|
+
maxFeePerGas: BigNumber$1.from(15e9),
|
|
40887
|
+
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
40888
40888
|
};
|
|
40889
40889
|
|
|
40890
|
-
const SDK_VERSION_MARKER = '0.45.
|
|
40890
|
+
const SDK_VERSION_MARKER = '0.45.2';
|
|
40891
40891
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
40892
40892
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
40893
40893
|
|
|
@@ -41035,6 +41035,9 @@ class CheckoutConfiguration {
|
|
|
41035
41035
|
}
|
|
41036
41036
|
|
|
41037
41037
|
const isMatchingAddress = (addressA = '', addressB = '') => (addressA.toLowerCase() === addressB.toLowerCase());
|
|
41038
|
+
const isZkEvmChainId = (chainId) => chainId === ChainId.IMTBL_ZKEVM_DEVNET
|
|
41039
|
+
|| chainId === ChainId.IMTBL_ZKEVM_TESTNET
|
|
41040
|
+
|| chainId === ChainId.IMTBL_ZKEVM_MAINNET;
|
|
41038
41041
|
|
|
41039
41042
|
const getTokenAllowList = async (config, { type = TokenFilterTypes.ALL, chainId, exclude, }) => {
|
|
41040
41043
|
let tokens = [];
|
|
@@ -41571,16 +41574,19 @@ async function getWalletAllowList(params) {
|
|
|
41571
41574
|
};
|
|
41572
41575
|
}
|
|
41573
41576
|
|
|
41574
|
-
const setTransactionGasLimits = (transaction) => {
|
|
41577
|
+
const setTransactionGasLimits = async (web3Provider, transaction) => {
|
|
41575
41578
|
const rawTx = transaction;
|
|
41576
|
-
|
|
41577
|
-
|
|
41579
|
+
const { chainId } = await web3Provider.getNetwork();
|
|
41580
|
+
if (!isZkEvmChainId(chainId))
|
|
41581
|
+
return rawTx;
|
|
41582
|
+
rawTx.maxFeePerGas = IMMUTABLE_ZKVEM_GAS_OVERRIDES.maxFeePerGas;
|
|
41583
|
+
rawTx.maxPriorityFeePerGas = IMMUTABLE_ZKVEM_GAS_OVERRIDES.maxPriorityFeePerGas;
|
|
41578
41584
|
return rawTx;
|
|
41579
41585
|
};
|
|
41580
41586
|
const sendTransaction = async (web3Provider, transaction) => {
|
|
41581
41587
|
try {
|
|
41582
41588
|
const signer = web3Provider.getSigner();
|
|
41583
|
-
const rawTx = setTransactionGasLimits(transaction);
|
|
41589
|
+
const rawTx = await setTransactionGasLimits(web3Provider, transaction);
|
|
41584
41590
|
const transactionResponse = await signer.sendTransaction(rawTx);
|
|
41585
41591
|
return {
|
|
41586
41592
|
transactionResponse,
|
package/dist/passport.js
CHANGED
|
@@ -8724,7 +8724,7 @@ class MultiRollupApiClients {
|
|
|
8724
8724
|
}
|
|
8725
8725
|
|
|
8726
8726
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8727
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.45.
|
|
8727
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.45.2' };
|
|
8728
8728
|
const createConfig = ({ basePath, headers, }) => {
|
|
8729
8729
|
if (!basePath.trim()) {
|
|
8730
8730
|
throw Error('basePath can not be empty');
|
|
@@ -8792,7 +8792,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
8792
8792
|
chainID,
|
|
8793
8793
|
coreContractAddress,
|
|
8794
8794
|
registrationContractAddress,
|
|
8795
|
-
sdkVersion: 'ts-immutable-sdk-0.45.
|
|
8795
|
+
sdkVersion: 'ts-immutable-sdk-0.45.2',
|
|
8796
8796
|
});
|
|
8797
8797
|
/**
|
|
8798
8798
|
* Sets `sdkVersion` at the time of build
|
package/dist/x.js
CHANGED
|
@@ -23,7 +23,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
23
23
|
chainID,
|
|
24
24
|
coreContractAddress,
|
|
25
25
|
registrationContractAddress,
|
|
26
|
-
sdkVersion: 'ts-immutable-sdk-0.45.
|
|
26
|
+
sdkVersion: 'ts-immutable-sdk-0.45.2',
|
|
27
27
|
});
|
|
28
28
|
/**
|
|
29
29
|
* Sets `sdkVersion` at the time of build
|
package/package.json
CHANGED