@imtbl/sdk 0.15.1-alpha → 0.15.2-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.js +1 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.js +66 -76
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +6 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +70 -80
- package/dist/index.js +70 -80
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2420,7 +2420,7 @@ class MultiRollupApiClients {
|
|
|
2420
2420
|
}
|
|
2421
2421
|
|
|
2422
2422
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2423
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.15.
|
|
2423
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.15.2-alpha' };
|
|
2424
2424
|
const createConfig = ({ basePath, headers, }) => {
|
|
2425
2425
|
if (!basePath.trim()) {
|
|
2426
2426
|
throw Error('basePath can not be empty');
|
|
@@ -2480,7 +2480,7 @@ class APIError extends Error {
|
|
|
2480
2480
|
|
|
2481
2481
|
/* eslint-disable implicit-arrow-linebreak */
|
|
2482
2482
|
const defaultHeaders = {
|
|
2483
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.15.
|
|
2483
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.15.2-alpha',
|
|
2484
2484
|
};
|
|
2485
2485
|
/**
|
|
2486
2486
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -2752,7 +2752,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
2752
2752
|
chainID,
|
|
2753
2753
|
coreContractAddress,
|
|
2754
2754
|
registrationContractAddress,
|
|
2755
|
-
sdkVersion: 'ts-immutable-sdk-0.15.
|
|
2755
|
+
sdkVersion: 'ts-immutable-sdk-0.15.2-alpha',
|
|
2756
2756
|
});
|
|
2757
2757
|
/**
|
|
2758
2758
|
* Sets `sdkVersion` at the time of build
|
|
@@ -27276,13 +27276,6 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
|
|
|
27276
27276
|
GasTokenType["NATIVE"] = "NATIVE";
|
|
27277
27277
|
GasTokenType["ERC20"] = "ERC20";
|
|
27278
27278
|
})($4b58188d47aafe8d$export$537fa3efd10ed435 || ($4b58188d47aafe8d$export$537fa3efd10ed435 = {}));
|
|
27279
|
-
var $4b58188d47aafe8d$export$5d3b0ad129b9b98e;
|
|
27280
|
-
(function(TransactionRequirementType) {
|
|
27281
|
-
TransactionRequirementType["GAS"] = "GAS";
|
|
27282
|
-
TransactionRequirementType["NATIVE"] = "NATIVE";
|
|
27283
|
-
TransactionRequirementType["ERC20"] = "ERC20";
|
|
27284
|
-
TransactionRequirementType["ERC721"] = "ERC721";
|
|
27285
|
-
})($4b58188d47aafe8d$export$5d3b0ad129b9b98e || ($4b58188d47aafe8d$export$5d3b0ad129b9b98e = {}));
|
|
27286
27279
|
|
|
27287
27280
|
|
|
27288
27281
|
|
|
@@ -27736,13 +27729,19 @@ const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (web3Provider, transacti
|
|
|
27736
27729
|
|
|
27737
27730
|
|
|
27738
27731
|
|
|
27732
|
+
const $dff2555fa96dda9a$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
|
|
27733
|
+
const $dff2555fa96dda9a$export$aa28f3111c524ec5 = (feeData)=>{
|
|
27734
|
+
if ($dff2555fa96dda9a$var$doesChainSupportEIP1559(feeData)) return (ethers.BigNumber).from(feeData.maxFeePerGas).add((ethers.BigNumber).from(feeData.maxPriorityFeePerGas));
|
|
27735
|
+
if (feeData.gasPrice) return (ethers.BigNumber).from(feeData.gasPrice);
|
|
27736
|
+
return null;
|
|
27737
|
+
};
|
|
27738
|
+
|
|
27739
|
+
|
|
27739
27740
|
const $570856c68db0bd36$var$GAS_LIMIT = 140000;
|
|
27740
|
-
const $570856c68db0bd36$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
|
|
27741
|
-
const $570856c68db0bd36$var$getGasPriceInWei = (feeData)=>$570856c68db0bd36$var$doesChainSupportEIP1559(feeData) ? (ethers.BigNumber).from(feeData.maxFeePerGas).add((ethers.BigNumber).from(feeData.maxPriorityFeePerGas)) : feeData.gasPrice && (ethers.BigNumber).from(feeData.gasPrice);
|
|
27742
27741
|
const $570856c68db0bd36$var$getGasEstimates = async (provider)=>{
|
|
27743
27742
|
const txnGasLimitInWei = $570856c68db0bd36$var$GAS_LIMIT; // todo: fetch gasLimit from bridgeSDK when they add new fn
|
|
27744
27743
|
const feeData = await provider.getFeeData();
|
|
27745
|
-
const gasPriceInWei = $
|
|
27744
|
+
const gasPriceInWei = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
|
|
27746
27745
|
if (!gasPriceInWei) return undefined;
|
|
27747
27746
|
return gasPriceInWei.mul(txnGasLimitInWei);
|
|
27748
27747
|
};
|
|
@@ -28019,8 +28018,6 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
|
|
|
28019
28018
|
|
|
28020
28019
|
|
|
28021
28020
|
|
|
28022
|
-
|
|
28023
|
-
|
|
28024
28021
|
const $ddc6bcd0896481e5$export$2fbfa41a4de56a89 = (erc20allowances, erc721allowances)=>{
|
|
28025
28022
|
const aggregatedAllowances = [];
|
|
28026
28023
|
if (!erc20allowances.sufficient) {
|
|
@@ -28389,12 +28386,9 @@ const $aa6caea9a60d18c7$export$f96d1c819a615a64 = (itemRequirements)=>$aa6caea9a
|
|
|
28389
28386
|
|
|
28390
28387
|
const $73d2282a108cc7e2$export$ed7929b58bab85da = (itemRequirements)=>itemRequirements.map((itemRequirement)=>{
|
|
28391
28388
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
|
|
28392
|
-
name: "IMX",
|
|
28393
|
-
symbol: "IMX",
|
|
28394
28389
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28395
28390
|
};
|
|
28396
28391
|
return {
|
|
28397
|
-
name: itemRequirement.type,
|
|
28398
28392
|
address: itemRequirement.contractAddress
|
|
28399
28393
|
};
|
|
28400
28394
|
});
|
|
@@ -28410,6 +28404,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28410
28404
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (ethers.BigNumber).from(0));
|
|
28411
28405
|
let erc721BalanceResult = itemBalanceResult;
|
|
28412
28406
|
if (!erc721BalanceResult) erc721BalanceResult = {
|
|
28407
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28413
28408
|
balance: (ethers.BigNumber).from(0),
|
|
28414
28409
|
formattedBalance: "0",
|
|
28415
28410
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28417,7 +28412,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28417
28412
|
};
|
|
28418
28413
|
return {
|
|
28419
28414
|
sufficient: sufficient,
|
|
28420
|
-
type:
|
|
28415
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28421
28416
|
delta: {
|
|
28422
28417
|
balance: delta,
|
|
28423
28418
|
formattedBalance: delta.toString()
|
|
@@ -28437,23 +28432,30 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28437
28432
|
return balance.token?.address === itemRequirement.contractAddress;
|
|
28438
28433
|
});
|
|
28439
28434
|
else if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) itemBalanceResult = balances.find((balance)=>{
|
|
28440
|
-
return
|
|
28435
|
+
return balance.token?.address === "" || balance.token?.address === ($d85ad1457a3f1a83$export$b80040cb173ba6e9);
|
|
28441
28436
|
});
|
|
28442
28437
|
// Calculate the balance delta
|
|
28443
28438
|
const requiredBalance = itemRequirement.amount;
|
|
28444
28439
|
const sufficient = requiredBalance.isNegative() || requiredBalance.isZero() || (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
28445
28440
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (ethers.BigNumber).from(0));
|
|
28441
|
+
let name = "";
|
|
28442
|
+
let symbol = "";
|
|
28446
28443
|
let decimals = ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28447
|
-
if (itemBalanceResult)
|
|
28444
|
+
if (itemBalanceResult) {
|
|
28445
|
+
decimals = itemBalanceResult.token?.decimals ?? ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28446
|
+
name = itemBalanceResult.token.name;
|
|
28447
|
+
symbol = itemBalanceResult.token.symbol;
|
|
28448
|
+
}
|
|
28448
28449
|
let tokenBalanceResult = itemBalanceResult;
|
|
28449
28450
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) {
|
|
28450
28451
|
// No token balance so mark as zero native
|
|
28451
28452
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28453
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28452
28454
|
balance: (ethers.BigNumber).from(0),
|
|
28453
28455
|
formattedBalance: "0",
|
|
28454
28456
|
token: {
|
|
28455
|
-
name:
|
|
28456
|
-
symbol:
|
|
28457
|
+
name: name,
|
|
28458
|
+
symbol: symbol,
|
|
28457
28459
|
decimals: ($d85ad1457a3f1a83$export$903389470ba9433c),
|
|
28458
28460
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28459
28461
|
}
|
|
@@ -28465,9 +28467,13 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28465
28467
|
balance: delta,
|
|
28466
28468
|
formattedBalance: (ethers.utils).formatUnits(delta, decimals)
|
|
28467
28469
|
},
|
|
28468
|
-
current:
|
|
28470
|
+
current: {
|
|
28471
|
+
...tokenBalanceResult,
|
|
28472
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE
|
|
28473
|
+
},
|
|
28469
28474
|
required: {
|
|
28470
28475
|
...tokenBalanceResult,
|
|
28476
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28471
28477
|
balance: (ethers.BigNumber).from(itemRequirement.amount),
|
|
28472
28478
|
formattedBalance: (ethers.utils).formatUnits(itemRequirement.amount, decimals)
|
|
28473
28479
|
}
|
|
@@ -28475,10 +28481,14 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28475
28481
|
}
|
|
28476
28482
|
// No token balance so mark as zero
|
|
28477
28483
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28484
|
+
type: itemRequirement.type,
|
|
28478
28485
|
balance: (ethers.BigNumber).from(0),
|
|
28479
28486
|
formattedBalance: "0",
|
|
28480
28487
|
token: {
|
|
28481
|
-
|
|
28488
|
+
name: name,
|
|
28489
|
+
symbol: symbol,
|
|
28490
|
+
address: itemRequirement.contractAddress,
|
|
28491
|
+
decimals: decimals
|
|
28482
28492
|
}
|
|
28483
28493
|
};
|
|
28484
28494
|
return {
|
|
@@ -28520,11 +28530,11 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28520
28530
|
// Setup maps to be able to link data back to the associated promises
|
|
28521
28531
|
const erc721s = new Map();
|
|
28522
28532
|
const erc721OwnershipPromises = new Map();
|
|
28523
|
-
itemRequirements.
|
|
28524
|
-
|
|
28525
|
-
const contract = new (ethers.Contract)(
|
|
28526
|
-
erc721s.set(
|
|
28527
|
-
erc721OwnershipPromises.set(
|
|
28533
|
+
itemRequirements.forEach((itemRequirement)=>{
|
|
28534
|
+
if (itemRequirement.type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721) return;
|
|
28535
|
+
const contract = new (ethers.Contract)(itemRequirement.contractAddress, JSON.stringify(($d85ad1457a3f1a83$export$8b8be7a2a654f23e)), provider);
|
|
28536
|
+
erc721s.set(itemRequirement.contractAddress, itemRequirement);
|
|
28537
|
+
erc721OwnershipPromises.set(itemRequirement.contractAddress, contract.ownerOf(itemRequirement.id));
|
|
28528
28538
|
});
|
|
28529
28539
|
try {
|
|
28530
28540
|
// Convert ERC721 ownership into a balance result
|
|
@@ -28535,6 +28545,7 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28535
28545
|
let itemCount = 0;
|
|
28536
28546
|
if (itemRequirement && ownerAddress === erc721OwnerAddress) itemCount = 1;
|
|
28537
28547
|
erc721Balances.push({
|
|
28548
|
+
type: (0, $4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28538
28549
|
balance: (0, ethers.BigNumber).from(itemCount),
|
|
28539
28550
|
formattedBalance: itemCount.toString(),
|
|
28540
28551
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28586,7 +28597,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28586
28597
|
}, true);
|
|
28587
28598
|
return {
|
|
28588
28599
|
sufficient: sufficient,
|
|
28589
|
-
|
|
28600
|
+
balanceRequirements: balanceRequirements
|
|
28590
28601
|
};
|
|
28591
28602
|
};
|
|
28592
28603
|
|
|
@@ -28597,12 +28608,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28597
28608
|
|
|
28598
28609
|
|
|
28599
28610
|
|
|
28600
|
-
|
|
28601
|
-
const $7d1bfafb81e64d74$var$getGasPriceInWei = (feeData)=>{
|
|
28602
|
-
if ($7d1bfafb81e64d74$var$doesChainSupportEIP1559(feeData)) return (ethers.BigNumber).from(feeData.maxFeePerGas).add((ethers.BigNumber).from(feeData.maxPriorityFeePerGas));
|
|
28603
|
-
if (feeData.gasPrice) return (ethers.BigNumber).from(feeData.gasPrice);
|
|
28604
|
-
return undefined;
|
|
28605
|
-
};
|
|
28611
|
+
|
|
28606
28612
|
const $7d1bfafb81e64d74$export$e0580ae1f48db848 = async (provider, transaction)=>{
|
|
28607
28613
|
try {
|
|
28608
28614
|
return await provider.estimateGas(transaction);
|
|
@@ -28635,9 +28641,11 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28635
28641
|
if (transactionOrGas.type === ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION) estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, transactionOrGas.transaction));
|
|
28636
28642
|
else {
|
|
28637
28643
|
const feeData = await provider.getFeeData();
|
|
28638
|
-
const gasPrice = $
|
|
28639
|
-
|
|
28640
|
-
|
|
28644
|
+
const gasPrice = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
|
|
28645
|
+
if (gasPrice !== null) {
|
|
28646
|
+
const gas = gasPrice?.mul(transactionOrGas.gasToken.limit);
|
|
28647
|
+
if (gas) totalGas = totalGas.add(gas);
|
|
28648
|
+
}
|
|
28641
28649
|
}
|
|
28642
28650
|
// Get the gas estimates for all the transactions and calculate the total gas
|
|
28643
28651
|
const gasEstimatePromises = await Promise.all(estimateGasPromises);
|
|
@@ -28649,57 +28657,39 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28649
28657
|
};
|
|
28650
28658
|
|
|
28651
28659
|
|
|
28660
|
+
|
|
28661
|
+
|
|
28662
|
+
const $0e7419077c373b24$export$4a2a19d99fef3b1b = (balanceCheckResult)=>{
|
|
28663
|
+
let sufficient = true;
|
|
28664
|
+
const transactionRequirements = [];
|
|
28665
|
+
for (const balance of balanceCheckResult.balanceRequirements){
|
|
28666
|
+
if (!balance.sufficient) sufficient = false;
|
|
28667
|
+
transactionRequirements.push({
|
|
28668
|
+
type: balance.type,
|
|
28669
|
+
sufficient: balance.sufficient,
|
|
28670
|
+
required: balance.required,
|
|
28671
|
+
current: balance.current,
|
|
28672
|
+
delta: balance.delta
|
|
28673
|
+
});
|
|
28674
|
+
}
|
|
28675
|
+
return {
|
|
28676
|
+
sufficient: sufficient,
|
|
28677
|
+
transactionRequirements: transactionRequirements
|
|
28678
|
+
};
|
|
28679
|
+
};
|
|
28652
28680
|
const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemRequirements, transactionOrGasAmount)=>{
|
|
28653
|
-
// eslint-disable-next-line no-console
|
|
28654
|
-
console.log(provider, itemRequirements, transactionOrGasAmount);
|
|
28655
28681
|
const ownerAddress = await provider.getSigner().getAddress();
|
|
28656
28682
|
let aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(itemRequirements);
|
|
28657
28683
|
const erc20Allowances = await ($fc8b338399d890f3$export$d93c00812189e36)(provider, ownerAddress, aggregatedItems);
|
|
28658
28684
|
const erc721Allowances = await ($35c3fc7013888ba5$export$be546c525d418988)(provider, ownerAddress, aggregatedItems);
|
|
28659
|
-
// eslint-disable-next-line no-console
|
|
28660
|
-
console.log("ERC20 Allowances", erc20Allowances);
|
|
28661
|
-
// eslint-disable-next-line no-console
|
|
28662
|
-
console.log("ERC721 Allowances", erc721Allowances);
|
|
28663
28685
|
const aggregatedAllowances = ($ddc6bcd0896481e5$export$2fbfa41a4de56a89)(erc20Allowances, erc721Allowances);
|
|
28664
28686
|
const gasItem = await ($7d1bfafb81e64d74$export$3a4140bd9e983e4e)(provider, aggregatedAllowances, transactionOrGasAmount);
|
|
28665
28687
|
if (gasItem !== null) {
|
|
28666
28688
|
aggregatedItems.push(gasItem);
|
|
28667
28689
|
aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(aggregatedItems);
|
|
28668
28690
|
}
|
|
28669
|
-
// eslint-disable-next-line no-console
|
|
28670
|
-
console.log("Aggregated Items", aggregatedItems);
|
|
28671
28691
|
const balanceRequirements = await ($beb896e098e41faf$export$ddfc885f43c3cb6e)(config, provider, ownerAddress, aggregatedItems);
|
|
28672
|
-
|
|
28673
|
-
console.log("Balance Requirements", balanceRequirements);
|
|
28674
|
-
return {
|
|
28675
|
-
sufficient: true,
|
|
28676
|
-
transactionRequirements: [
|
|
28677
|
-
{
|
|
28678
|
-
type: ($4b58188d47aafe8d$export$5d3b0ad129b9b98e).GAS,
|
|
28679
|
-
sufficient: true,
|
|
28680
|
-
required: {
|
|
28681
|
-
balance: (ethers.BigNumber).from(0),
|
|
28682
|
-
formattedBalance: "0",
|
|
28683
|
-
token: {
|
|
28684
|
-
name: "IMX",
|
|
28685
|
-
symbol: "IMX",
|
|
28686
|
-
address: "0x0",
|
|
28687
|
-
decimals: 18
|
|
28688
|
-
}
|
|
28689
|
-
},
|
|
28690
|
-
current: {
|
|
28691
|
-
balance: (ethers.BigNumber).from(1),
|
|
28692
|
-
formattedBalance: "1",
|
|
28693
|
-
token: {
|
|
28694
|
-
name: "IMX",
|
|
28695
|
-
symbol: "IMX",
|
|
28696
|
-
address: "0x0",
|
|
28697
|
-
decimals: 18
|
|
28698
|
-
}
|
|
28699
|
-
}
|
|
28700
|
-
}
|
|
28701
|
-
]
|
|
28702
|
-
};
|
|
28692
|
+
return $0e7419077c373b24$export$4a2a19d99fef3b1b(balanceRequirements);
|
|
28703
28693
|
};
|
|
28704
28694
|
|
|
28705
28695
|
|
|
@@ -28999,7 +28989,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
|
|
|
28999
28989
|
function $parcel$export(e, n, v, s) {
|
|
29000
28990
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
29001
28991
|
}
|
|
29002
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.
|
|
28992
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.2-alpha";
|
|
29003
28993
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
29004
28994
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
29005
28995
|
|
package/dist/index.js
CHANGED
|
@@ -2398,7 +2398,7 @@ class MultiRollupApiClients {
|
|
|
2398
2398
|
}
|
|
2399
2399
|
|
|
2400
2400
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2401
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.15.
|
|
2401
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.15.2-alpha' };
|
|
2402
2402
|
const createConfig = ({ basePath, headers, }) => {
|
|
2403
2403
|
if (!basePath.trim()) {
|
|
2404
2404
|
throw Error('basePath can not be empty');
|
|
@@ -2458,7 +2458,7 @@ class APIError extends Error {
|
|
|
2458
2458
|
|
|
2459
2459
|
/* eslint-disable implicit-arrow-linebreak */
|
|
2460
2460
|
const defaultHeaders = {
|
|
2461
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.15.
|
|
2461
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.15.2-alpha',
|
|
2462
2462
|
};
|
|
2463
2463
|
/**
|
|
2464
2464
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -2730,7 +2730,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
2730
2730
|
chainID,
|
|
2731
2731
|
coreContractAddress,
|
|
2732
2732
|
registrationContractAddress,
|
|
2733
|
-
sdkVersion: 'ts-immutable-sdk-0.15.
|
|
2733
|
+
sdkVersion: 'ts-immutable-sdk-0.15.2-alpha',
|
|
2734
2734
|
});
|
|
2735
2735
|
/**
|
|
2736
2736
|
* Sets `sdkVersion` at the time of build
|
|
@@ -27254,13 +27254,6 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
|
|
|
27254
27254
|
GasTokenType["NATIVE"] = "NATIVE";
|
|
27255
27255
|
GasTokenType["ERC20"] = "ERC20";
|
|
27256
27256
|
})($4b58188d47aafe8d$export$537fa3efd10ed435 || ($4b58188d47aafe8d$export$537fa3efd10ed435 = {}));
|
|
27257
|
-
var $4b58188d47aafe8d$export$5d3b0ad129b9b98e;
|
|
27258
|
-
(function(TransactionRequirementType) {
|
|
27259
|
-
TransactionRequirementType["GAS"] = "GAS";
|
|
27260
|
-
TransactionRequirementType["NATIVE"] = "NATIVE";
|
|
27261
|
-
TransactionRequirementType["ERC20"] = "ERC20";
|
|
27262
|
-
TransactionRequirementType["ERC721"] = "ERC721";
|
|
27263
|
-
})($4b58188d47aafe8d$export$5d3b0ad129b9b98e || ($4b58188d47aafe8d$export$5d3b0ad129b9b98e = {}));
|
|
27264
27257
|
|
|
27265
27258
|
|
|
27266
27259
|
|
|
@@ -27714,13 +27707,19 @@ const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (web3Provider, transacti
|
|
|
27714
27707
|
|
|
27715
27708
|
|
|
27716
27709
|
|
|
27710
|
+
const $dff2555fa96dda9a$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
|
|
27711
|
+
const $dff2555fa96dda9a$export$aa28f3111c524ec5 = (feeData)=>{
|
|
27712
|
+
if ($dff2555fa96dda9a$var$doesChainSupportEIP1559(feeData)) return (BigNumber$1).from(feeData.maxFeePerGas).add((BigNumber$1).from(feeData.maxPriorityFeePerGas));
|
|
27713
|
+
if (feeData.gasPrice) return (BigNumber$1).from(feeData.gasPrice);
|
|
27714
|
+
return null;
|
|
27715
|
+
};
|
|
27716
|
+
|
|
27717
|
+
|
|
27717
27718
|
const $570856c68db0bd36$var$GAS_LIMIT = 140000;
|
|
27718
|
-
const $570856c68db0bd36$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
|
|
27719
|
-
const $570856c68db0bd36$var$getGasPriceInWei = (feeData)=>$570856c68db0bd36$var$doesChainSupportEIP1559(feeData) ? (BigNumber$1).from(feeData.maxFeePerGas).add((BigNumber$1).from(feeData.maxPriorityFeePerGas)) : feeData.gasPrice && (BigNumber$1).from(feeData.gasPrice);
|
|
27720
27719
|
const $570856c68db0bd36$var$getGasEstimates = async (provider)=>{
|
|
27721
27720
|
const txnGasLimitInWei = $570856c68db0bd36$var$GAS_LIMIT; // todo: fetch gasLimit from bridgeSDK when they add new fn
|
|
27722
27721
|
const feeData = await provider.getFeeData();
|
|
27723
|
-
const gasPriceInWei = $
|
|
27722
|
+
const gasPriceInWei = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
|
|
27724
27723
|
if (!gasPriceInWei) return undefined;
|
|
27725
27724
|
return gasPriceInWei.mul(txnGasLimitInWei);
|
|
27726
27725
|
};
|
|
@@ -27997,8 +27996,6 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
|
|
|
27997
27996
|
|
|
27998
27997
|
|
|
27999
27998
|
|
|
28000
|
-
|
|
28001
|
-
|
|
28002
27999
|
const $ddc6bcd0896481e5$export$2fbfa41a4de56a89 = (erc20allowances, erc721allowances)=>{
|
|
28003
28000
|
const aggregatedAllowances = [];
|
|
28004
28001
|
if (!erc20allowances.sufficient) {
|
|
@@ -28367,12 +28364,9 @@ const $aa6caea9a60d18c7$export$f96d1c819a615a64 = (itemRequirements)=>$aa6caea9a
|
|
|
28367
28364
|
|
|
28368
28365
|
const $73d2282a108cc7e2$export$ed7929b58bab85da = (itemRequirements)=>itemRequirements.map((itemRequirement)=>{
|
|
28369
28366
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
|
|
28370
|
-
name: "IMX",
|
|
28371
|
-
symbol: "IMX",
|
|
28372
28367
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28373
28368
|
};
|
|
28374
28369
|
return {
|
|
28375
|
-
name: itemRequirement.type,
|
|
28376
28370
|
address: itemRequirement.contractAddress
|
|
28377
28371
|
};
|
|
28378
28372
|
});
|
|
@@ -28388,6 +28382,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28388
28382
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (BigNumber$1).from(0));
|
|
28389
28383
|
let erc721BalanceResult = itemBalanceResult;
|
|
28390
28384
|
if (!erc721BalanceResult) erc721BalanceResult = {
|
|
28385
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28391
28386
|
balance: (BigNumber$1).from(0),
|
|
28392
28387
|
formattedBalance: "0",
|
|
28393
28388
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28395,7 +28390,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28395
28390
|
};
|
|
28396
28391
|
return {
|
|
28397
28392
|
sufficient: sufficient,
|
|
28398
|
-
type:
|
|
28393
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28399
28394
|
delta: {
|
|
28400
28395
|
balance: delta,
|
|
28401
28396
|
formattedBalance: delta.toString()
|
|
@@ -28415,23 +28410,30 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28415
28410
|
return balance.token?.address === itemRequirement.contractAddress;
|
|
28416
28411
|
});
|
|
28417
28412
|
else if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) itemBalanceResult = balances.find((balance)=>{
|
|
28418
|
-
return
|
|
28413
|
+
return balance.token?.address === "" || balance.token?.address === ($d85ad1457a3f1a83$export$b80040cb173ba6e9);
|
|
28419
28414
|
});
|
|
28420
28415
|
// Calculate the balance delta
|
|
28421
28416
|
const requiredBalance = itemRequirement.amount;
|
|
28422
28417
|
const sufficient = requiredBalance.isNegative() || requiredBalance.isZero() || (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
28423
28418
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (BigNumber$1).from(0));
|
|
28419
|
+
let name = "";
|
|
28420
|
+
let symbol = "";
|
|
28424
28421
|
let decimals = ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28425
|
-
if (itemBalanceResult)
|
|
28422
|
+
if (itemBalanceResult) {
|
|
28423
|
+
decimals = itemBalanceResult.token?.decimals ?? ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28424
|
+
name = itemBalanceResult.token.name;
|
|
28425
|
+
symbol = itemBalanceResult.token.symbol;
|
|
28426
|
+
}
|
|
28426
28427
|
let tokenBalanceResult = itemBalanceResult;
|
|
28427
28428
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) {
|
|
28428
28429
|
// No token balance so mark as zero native
|
|
28429
28430
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28431
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28430
28432
|
balance: (BigNumber$1).from(0),
|
|
28431
28433
|
formattedBalance: "0",
|
|
28432
28434
|
token: {
|
|
28433
|
-
name:
|
|
28434
|
-
symbol:
|
|
28435
|
+
name: name,
|
|
28436
|
+
symbol: symbol,
|
|
28435
28437
|
decimals: ($d85ad1457a3f1a83$export$903389470ba9433c),
|
|
28436
28438
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28437
28439
|
}
|
|
@@ -28443,9 +28445,13 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28443
28445
|
balance: delta,
|
|
28444
28446
|
formattedBalance: (utils$1).formatUnits(delta, decimals)
|
|
28445
28447
|
},
|
|
28446
|
-
current:
|
|
28448
|
+
current: {
|
|
28449
|
+
...tokenBalanceResult,
|
|
28450
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE
|
|
28451
|
+
},
|
|
28447
28452
|
required: {
|
|
28448
28453
|
...tokenBalanceResult,
|
|
28454
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28449
28455
|
balance: (BigNumber$1).from(itemRequirement.amount),
|
|
28450
28456
|
formattedBalance: (utils$1).formatUnits(itemRequirement.amount, decimals)
|
|
28451
28457
|
}
|
|
@@ -28453,10 +28459,14 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28453
28459
|
}
|
|
28454
28460
|
// No token balance so mark as zero
|
|
28455
28461
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28462
|
+
type: itemRequirement.type,
|
|
28456
28463
|
balance: (BigNumber$1).from(0),
|
|
28457
28464
|
formattedBalance: "0",
|
|
28458
28465
|
token: {
|
|
28459
|
-
|
|
28466
|
+
name: name,
|
|
28467
|
+
symbol: symbol,
|
|
28468
|
+
address: itemRequirement.contractAddress,
|
|
28469
|
+
decimals: decimals
|
|
28460
28470
|
}
|
|
28461
28471
|
};
|
|
28462
28472
|
return {
|
|
@@ -28498,11 +28508,11 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28498
28508
|
// Setup maps to be able to link data back to the associated promises
|
|
28499
28509
|
const erc721s = new Map();
|
|
28500
28510
|
const erc721OwnershipPromises = new Map();
|
|
28501
|
-
itemRequirements.
|
|
28502
|
-
|
|
28503
|
-
const contract = new (Contract$1)(
|
|
28504
|
-
erc721s.set(
|
|
28505
|
-
erc721OwnershipPromises.set(
|
|
28511
|
+
itemRequirements.forEach((itemRequirement)=>{
|
|
28512
|
+
if (itemRequirement.type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721) return;
|
|
28513
|
+
const contract = new (Contract$1)(itemRequirement.contractAddress, JSON.stringify(($d85ad1457a3f1a83$export$8b8be7a2a654f23e)), provider);
|
|
28514
|
+
erc721s.set(itemRequirement.contractAddress, itemRequirement);
|
|
28515
|
+
erc721OwnershipPromises.set(itemRequirement.contractAddress, contract.ownerOf(itemRequirement.id));
|
|
28506
28516
|
});
|
|
28507
28517
|
try {
|
|
28508
28518
|
// Convert ERC721 ownership into a balance result
|
|
@@ -28513,6 +28523,7 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28513
28523
|
let itemCount = 0;
|
|
28514
28524
|
if (itemRequirement && ownerAddress === erc721OwnerAddress) itemCount = 1;
|
|
28515
28525
|
erc721Balances.push({
|
|
28526
|
+
type: (0, $4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28516
28527
|
balance: (0, BigNumber$1).from(itemCount),
|
|
28517
28528
|
formattedBalance: itemCount.toString(),
|
|
28518
28529
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28564,7 +28575,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28564
28575
|
}, true);
|
|
28565
28576
|
return {
|
|
28566
28577
|
sufficient: sufficient,
|
|
28567
|
-
|
|
28578
|
+
balanceRequirements: balanceRequirements
|
|
28568
28579
|
};
|
|
28569
28580
|
};
|
|
28570
28581
|
|
|
@@ -28575,12 +28586,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28575
28586
|
|
|
28576
28587
|
|
|
28577
28588
|
|
|
28578
|
-
|
|
28579
|
-
const $7d1bfafb81e64d74$var$getGasPriceInWei = (feeData)=>{
|
|
28580
|
-
if ($7d1bfafb81e64d74$var$doesChainSupportEIP1559(feeData)) return (BigNumber$1).from(feeData.maxFeePerGas).add((BigNumber$1).from(feeData.maxPriorityFeePerGas));
|
|
28581
|
-
if (feeData.gasPrice) return (BigNumber$1).from(feeData.gasPrice);
|
|
28582
|
-
return undefined;
|
|
28583
|
-
};
|
|
28589
|
+
|
|
28584
28590
|
const $7d1bfafb81e64d74$export$e0580ae1f48db848 = async (provider, transaction)=>{
|
|
28585
28591
|
try {
|
|
28586
28592
|
return await provider.estimateGas(transaction);
|
|
@@ -28613,9 +28619,11 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28613
28619
|
if (transactionOrGas.type === ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION) estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, transactionOrGas.transaction));
|
|
28614
28620
|
else {
|
|
28615
28621
|
const feeData = await provider.getFeeData();
|
|
28616
|
-
const gasPrice = $
|
|
28617
|
-
|
|
28618
|
-
|
|
28622
|
+
const gasPrice = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
|
|
28623
|
+
if (gasPrice !== null) {
|
|
28624
|
+
const gas = gasPrice?.mul(transactionOrGas.gasToken.limit);
|
|
28625
|
+
if (gas) totalGas = totalGas.add(gas);
|
|
28626
|
+
}
|
|
28619
28627
|
}
|
|
28620
28628
|
// Get the gas estimates for all the transactions and calculate the total gas
|
|
28621
28629
|
const gasEstimatePromises = await Promise.all(estimateGasPromises);
|
|
@@ -28627,57 +28635,39 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28627
28635
|
};
|
|
28628
28636
|
|
|
28629
28637
|
|
|
28638
|
+
|
|
28639
|
+
|
|
28640
|
+
const $0e7419077c373b24$export$4a2a19d99fef3b1b = (balanceCheckResult)=>{
|
|
28641
|
+
let sufficient = true;
|
|
28642
|
+
const transactionRequirements = [];
|
|
28643
|
+
for (const balance of balanceCheckResult.balanceRequirements){
|
|
28644
|
+
if (!balance.sufficient) sufficient = false;
|
|
28645
|
+
transactionRequirements.push({
|
|
28646
|
+
type: balance.type,
|
|
28647
|
+
sufficient: balance.sufficient,
|
|
28648
|
+
required: balance.required,
|
|
28649
|
+
current: balance.current,
|
|
28650
|
+
delta: balance.delta
|
|
28651
|
+
});
|
|
28652
|
+
}
|
|
28653
|
+
return {
|
|
28654
|
+
sufficient: sufficient,
|
|
28655
|
+
transactionRequirements: transactionRequirements
|
|
28656
|
+
};
|
|
28657
|
+
};
|
|
28630
28658
|
const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemRequirements, transactionOrGasAmount)=>{
|
|
28631
|
-
// eslint-disable-next-line no-console
|
|
28632
|
-
console.log(provider, itemRequirements, transactionOrGasAmount);
|
|
28633
28659
|
const ownerAddress = await provider.getSigner().getAddress();
|
|
28634
28660
|
let aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(itemRequirements);
|
|
28635
28661
|
const erc20Allowances = await ($fc8b338399d890f3$export$d93c00812189e36)(provider, ownerAddress, aggregatedItems);
|
|
28636
28662
|
const erc721Allowances = await ($35c3fc7013888ba5$export$be546c525d418988)(provider, ownerAddress, aggregatedItems);
|
|
28637
|
-
// eslint-disable-next-line no-console
|
|
28638
|
-
console.log("ERC20 Allowances", erc20Allowances);
|
|
28639
|
-
// eslint-disable-next-line no-console
|
|
28640
|
-
console.log("ERC721 Allowances", erc721Allowances);
|
|
28641
28663
|
const aggregatedAllowances = ($ddc6bcd0896481e5$export$2fbfa41a4de56a89)(erc20Allowances, erc721Allowances);
|
|
28642
28664
|
const gasItem = await ($7d1bfafb81e64d74$export$3a4140bd9e983e4e)(provider, aggregatedAllowances, transactionOrGasAmount);
|
|
28643
28665
|
if (gasItem !== null) {
|
|
28644
28666
|
aggregatedItems.push(gasItem);
|
|
28645
28667
|
aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(aggregatedItems);
|
|
28646
28668
|
}
|
|
28647
|
-
// eslint-disable-next-line no-console
|
|
28648
|
-
console.log("Aggregated Items", aggregatedItems);
|
|
28649
28669
|
const balanceRequirements = await ($beb896e098e41faf$export$ddfc885f43c3cb6e)(config, provider, ownerAddress, aggregatedItems);
|
|
28650
|
-
|
|
28651
|
-
console.log("Balance Requirements", balanceRequirements);
|
|
28652
|
-
return {
|
|
28653
|
-
sufficient: true,
|
|
28654
|
-
transactionRequirements: [
|
|
28655
|
-
{
|
|
28656
|
-
type: ($4b58188d47aafe8d$export$5d3b0ad129b9b98e).GAS,
|
|
28657
|
-
sufficient: true,
|
|
28658
|
-
required: {
|
|
28659
|
-
balance: (BigNumber$1).from(0),
|
|
28660
|
-
formattedBalance: "0",
|
|
28661
|
-
token: {
|
|
28662
|
-
name: "IMX",
|
|
28663
|
-
symbol: "IMX",
|
|
28664
|
-
address: "0x0",
|
|
28665
|
-
decimals: 18
|
|
28666
|
-
}
|
|
28667
|
-
},
|
|
28668
|
-
current: {
|
|
28669
|
-
balance: (BigNumber$1).from(1),
|
|
28670
|
-
formattedBalance: "1",
|
|
28671
|
-
token: {
|
|
28672
|
-
name: "IMX",
|
|
28673
|
-
symbol: "IMX",
|
|
28674
|
-
address: "0x0",
|
|
28675
|
-
decimals: 18
|
|
28676
|
-
}
|
|
28677
|
-
}
|
|
28678
|
-
}
|
|
28679
|
-
]
|
|
28680
|
-
};
|
|
28670
|
+
return $0e7419077c373b24$export$4a2a19d99fef3b1b(balanceRequirements);
|
|
28681
28671
|
};
|
|
28682
28672
|
|
|
28683
28673
|
|
|
@@ -28977,7 +28967,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
|
|
|
28977
28967
|
function $parcel$export(e, n, v, s) {
|
|
28978
28968
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
28979
28969
|
}
|
|
28980
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.
|
|
28970
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.2-alpha";
|
|
28981
28971
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
28982
28972
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
28983
28973
|
|
package/dist/passport.js
CHANGED
|
@@ -1457,7 +1457,7 @@ class MultiRollupApiClients {
|
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
1459
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1460
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.15.
|
|
1460
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.15.2-alpha' };
|
|
1461
1461
|
const createConfig = ({ basePath, headers, }) => {
|
|
1462
1462
|
if (!basePath.trim()) {
|
|
1463
1463
|
throw Error('basePath can not be empty');
|
|
@@ -1513,7 +1513,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
1513
1513
|
chainID,
|
|
1514
1514
|
coreContractAddress,
|
|
1515
1515
|
registrationContractAddress,
|
|
1516
|
-
sdkVersion: 'ts-immutable-sdk-0.15.
|
|
1516
|
+
sdkVersion: 'ts-immutable-sdk-0.15.2-alpha',
|
|
1517
1517
|
});
|
|
1518
1518
|
/**
|
|
1519
1519
|
* Sets `sdkVersion` at the time of build
|
package/package.json
CHANGED