@imtbl/sdk 0.15.0-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 +72 -79
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.d.ts +115 -1
- package/dist/immutablex_client.js +2 -2
- package/dist/index.browser.js +6 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +77 -83
- package/dist/index.d.ts +84 -4
- package/dist/index.js +78 -84
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import globalAxios$1 from 'axios';
|
|
2
|
-
import { ImmutableX, Config, createStarkSigner, generateLegacyStarkPrivateKey, TransfersApi, OrdersApi as OrdersApi$1, UsersApi, Contracts, TradesApi, ExchangesApi, WithdrawalsApi, MintsApi, DepositsApi, EncodingApi, TokensApi as TokensApi$1 } from '@imtbl/core-sdk';
|
|
2
|
+
import { ImmutableX, Config, IMXError, createStarkSigner, generateLegacyStarkPrivateKey, TransfersApi, OrdersApi as OrdersApi$1, UsersApi, Contracts, TradesApi, ExchangesApi, WithdrawalsApi, MintsApi, DepositsApi, EncodingApi, TokensApi as TokensApi$1 } from '@imtbl/core-sdk';
|
|
3
3
|
import { UserManager } from 'oidc-client-ts';
|
|
4
4
|
import jwt_decode from 'jwt-decode';
|
|
5
5
|
import * as crypto from 'crypto';
|
|
@@ -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
|
|
@@ -3235,6 +3235,7 @@ class ImmutableXClient {
|
|
|
3235
3235
|
|
|
3236
3236
|
var immutablex_client = /*#__PURE__*/Object.freeze({
|
|
3237
3237
|
__proto__: null,
|
|
3238
|
+
IMXError: IMXError,
|
|
3238
3239
|
ImmutableXClient: ImmutableXClient,
|
|
3239
3240
|
imxClientCreateStarkSigner: createStarkSigner,
|
|
3240
3241
|
imxClientGenerateLegacyStarkPrivateKey: generateLegacyStarkPrivateKey
|
|
@@ -26964,7 +26965,8 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
|
|
|
26964
26965
|
nativeCurrency: {
|
|
26965
26966
|
name: "IMX",
|
|
26966
26967
|
symbol: "IMX",
|
|
26967
|
-
decimals: 18
|
|
26968
|
+
decimals: 18,
|
|
26969
|
+
address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
|
|
26968
26970
|
}
|
|
26969
26971
|
}
|
|
26970
26972
|
]
|
|
@@ -26999,7 +27001,8 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
|
|
|
26999
27001
|
nativeCurrency: {
|
|
27000
27002
|
name: "IMX",
|
|
27001
27003
|
symbol: "IMX",
|
|
27002
|
-
decimals: 18
|
|
27004
|
+
decimals: 18,
|
|
27005
|
+
address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
|
|
27003
27006
|
}
|
|
27004
27007
|
}
|
|
27005
27008
|
]
|
|
@@ -27034,7 +27037,8 @@ const $d85ad1457a3f1a83$export$3a9ebede6a150274 = new Map([
|
|
|
27034
27037
|
nativeCurrency: {
|
|
27035
27038
|
name: "IMX",
|
|
27036
27039
|
symbol: "IMX",
|
|
27037
|
-
decimals: 18
|
|
27040
|
+
decimals: 18,
|
|
27041
|
+
address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
|
|
27038
27042
|
}
|
|
27039
27043
|
}
|
|
27040
27044
|
]
|
|
@@ -27250,13 +27254,6 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
|
|
|
27250
27254
|
GasTokenType["NATIVE"] = "NATIVE";
|
|
27251
27255
|
GasTokenType["ERC20"] = "ERC20";
|
|
27252
27256
|
})($4b58188d47aafe8d$export$537fa3efd10ed435 || ($4b58188d47aafe8d$export$537fa3efd10ed435 = {}));
|
|
27253
|
-
var $4b58188d47aafe8d$export$5d3b0ad129b9b98e;
|
|
27254
|
-
(function(TransactionRequirementType) {
|
|
27255
|
-
TransactionRequirementType["GAS"] = "GAS";
|
|
27256
|
-
TransactionRequirementType["NATIVE"] = "NATIVE";
|
|
27257
|
-
TransactionRequirementType["ERC20"] = "ERC20";
|
|
27258
|
-
TransactionRequirementType["ERC721"] = "ERC721";
|
|
27259
|
-
})($4b58188d47aafe8d$export$5d3b0ad129b9b98e || ($4b58188d47aafe8d$export$5d3b0ad129b9b98e = {}));
|
|
27260
27257
|
|
|
27261
27258
|
|
|
27262
27259
|
|
|
@@ -27710,13 +27707,19 @@ const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (web3Provider, transacti
|
|
|
27710
27707
|
|
|
27711
27708
|
|
|
27712
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
|
+
|
|
27713
27718
|
const $570856c68db0bd36$var$GAS_LIMIT = 140000;
|
|
27714
|
-
const $570856c68db0bd36$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
|
|
27715
|
-
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);
|
|
27716
27719
|
const $570856c68db0bd36$var$getGasEstimates = async (provider)=>{
|
|
27717
27720
|
const txnGasLimitInWei = $570856c68db0bd36$var$GAS_LIMIT; // todo: fetch gasLimit from bridgeSDK when they add new fn
|
|
27718
27721
|
const feeData = await provider.getFeeData();
|
|
27719
|
-
const gasPriceInWei = $
|
|
27722
|
+
const gasPriceInWei = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
|
|
27720
27723
|
if (!gasPriceInWei) return undefined;
|
|
27721
27724
|
return gasPriceInWei.mul(txnGasLimitInWei);
|
|
27722
27725
|
};
|
|
@@ -27993,8 +27996,6 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
|
|
|
27993
27996
|
|
|
27994
27997
|
|
|
27995
27998
|
|
|
27996
|
-
|
|
27997
|
-
|
|
27998
27999
|
const $ddc6bcd0896481e5$export$2fbfa41a4de56a89 = (erc20allowances, erc721allowances)=>{
|
|
27999
28000
|
const aggregatedAllowances = [];
|
|
28000
28001
|
if (!erc20allowances.sufficient) {
|
|
@@ -28363,12 +28364,9 @@ const $aa6caea9a60d18c7$export$f96d1c819a615a64 = (itemRequirements)=>$aa6caea9a
|
|
|
28363
28364
|
|
|
28364
28365
|
const $73d2282a108cc7e2$export$ed7929b58bab85da = (itemRequirements)=>itemRequirements.map((itemRequirement)=>{
|
|
28365
28366
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
|
|
28366
|
-
name: "IMX",
|
|
28367
|
-
symbol: "IMX",
|
|
28368
28367
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28369
28368
|
};
|
|
28370
28369
|
return {
|
|
28371
|
-
name: itemRequirement.type,
|
|
28372
28370
|
address: itemRequirement.contractAddress
|
|
28373
28371
|
};
|
|
28374
28372
|
});
|
|
@@ -28384,6 +28382,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28384
28382
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (BigNumber$1).from(0));
|
|
28385
28383
|
let erc721BalanceResult = itemBalanceResult;
|
|
28386
28384
|
if (!erc721BalanceResult) erc721BalanceResult = {
|
|
28385
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28387
28386
|
balance: (BigNumber$1).from(0),
|
|
28388
28387
|
formattedBalance: "0",
|
|
28389
28388
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28391,7 +28390,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28391
28390
|
};
|
|
28392
28391
|
return {
|
|
28393
28392
|
sufficient: sufficient,
|
|
28394
|
-
type:
|
|
28393
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28395
28394
|
delta: {
|
|
28396
28395
|
balance: delta,
|
|
28397
28396
|
formattedBalance: delta.toString()
|
|
@@ -28411,23 +28410,30 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28411
28410
|
return balance.token?.address === itemRequirement.contractAddress;
|
|
28412
28411
|
});
|
|
28413
28412
|
else if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) itemBalanceResult = balances.find((balance)=>{
|
|
28414
|
-
return
|
|
28413
|
+
return balance.token?.address === "" || balance.token?.address === ($d85ad1457a3f1a83$export$b80040cb173ba6e9);
|
|
28415
28414
|
});
|
|
28416
28415
|
// Calculate the balance delta
|
|
28417
28416
|
const requiredBalance = itemRequirement.amount;
|
|
28418
28417
|
const sufficient = requiredBalance.isNegative() || requiredBalance.isZero() || (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
28419
28418
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (BigNumber$1).from(0));
|
|
28419
|
+
let name = "";
|
|
28420
|
+
let symbol = "";
|
|
28420
28421
|
let decimals = ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28421
|
-
if (itemBalanceResult)
|
|
28422
|
+
if (itemBalanceResult) {
|
|
28423
|
+
decimals = itemBalanceResult.token?.decimals ?? ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28424
|
+
name = itemBalanceResult.token.name;
|
|
28425
|
+
symbol = itemBalanceResult.token.symbol;
|
|
28426
|
+
}
|
|
28422
28427
|
let tokenBalanceResult = itemBalanceResult;
|
|
28423
28428
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) {
|
|
28424
28429
|
// No token balance so mark as zero native
|
|
28425
28430
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28431
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28426
28432
|
balance: (BigNumber$1).from(0),
|
|
28427
28433
|
formattedBalance: "0",
|
|
28428
28434
|
token: {
|
|
28429
|
-
name:
|
|
28430
|
-
symbol:
|
|
28435
|
+
name: name,
|
|
28436
|
+
symbol: symbol,
|
|
28431
28437
|
decimals: ($d85ad1457a3f1a83$export$903389470ba9433c),
|
|
28432
28438
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28433
28439
|
}
|
|
@@ -28439,9 +28445,13 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28439
28445
|
balance: delta,
|
|
28440
28446
|
formattedBalance: (utils$1).formatUnits(delta, decimals)
|
|
28441
28447
|
},
|
|
28442
|
-
current:
|
|
28448
|
+
current: {
|
|
28449
|
+
...tokenBalanceResult,
|
|
28450
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE
|
|
28451
|
+
},
|
|
28443
28452
|
required: {
|
|
28444
28453
|
...tokenBalanceResult,
|
|
28454
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28445
28455
|
balance: (BigNumber$1).from(itemRequirement.amount),
|
|
28446
28456
|
formattedBalance: (utils$1).formatUnits(itemRequirement.amount, decimals)
|
|
28447
28457
|
}
|
|
@@ -28449,10 +28459,14 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28449
28459
|
}
|
|
28450
28460
|
// No token balance so mark as zero
|
|
28451
28461
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28462
|
+
type: itemRequirement.type,
|
|
28452
28463
|
balance: (BigNumber$1).from(0),
|
|
28453
28464
|
formattedBalance: "0",
|
|
28454
28465
|
token: {
|
|
28455
|
-
|
|
28466
|
+
name: name,
|
|
28467
|
+
symbol: symbol,
|
|
28468
|
+
address: itemRequirement.contractAddress,
|
|
28469
|
+
decimals: decimals
|
|
28456
28470
|
}
|
|
28457
28471
|
};
|
|
28458
28472
|
return {
|
|
@@ -28494,11 +28508,11 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28494
28508
|
// Setup maps to be able to link data back to the associated promises
|
|
28495
28509
|
const erc721s = new Map();
|
|
28496
28510
|
const erc721OwnershipPromises = new Map();
|
|
28497
|
-
itemRequirements.
|
|
28498
|
-
|
|
28499
|
-
const contract = new (Contract$1)(
|
|
28500
|
-
erc721s.set(
|
|
28501
|
-
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));
|
|
28502
28516
|
});
|
|
28503
28517
|
try {
|
|
28504
28518
|
// Convert ERC721 ownership into a balance result
|
|
@@ -28509,6 +28523,7 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28509
28523
|
let itemCount = 0;
|
|
28510
28524
|
if (itemRequirement && ownerAddress === erc721OwnerAddress) itemCount = 1;
|
|
28511
28525
|
erc721Balances.push({
|
|
28526
|
+
type: (0, $4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28512
28527
|
balance: (0, BigNumber$1).from(itemCount),
|
|
28513
28528
|
formattedBalance: itemCount.toString(),
|
|
28514
28529
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28560,7 +28575,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28560
28575
|
}, true);
|
|
28561
28576
|
return {
|
|
28562
28577
|
sufficient: sufficient,
|
|
28563
|
-
|
|
28578
|
+
balanceRequirements: balanceRequirements
|
|
28564
28579
|
};
|
|
28565
28580
|
};
|
|
28566
28581
|
|
|
@@ -28571,12 +28586,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28571
28586
|
|
|
28572
28587
|
|
|
28573
28588
|
|
|
28574
|
-
|
|
28575
|
-
const $7d1bfafb81e64d74$var$getGasPriceInWei = (feeData)=>{
|
|
28576
|
-
if ($7d1bfafb81e64d74$var$doesChainSupportEIP1559(feeData)) return (BigNumber$1).from(feeData.maxFeePerGas).add((BigNumber$1).from(feeData.maxPriorityFeePerGas));
|
|
28577
|
-
if (feeData.gasPrice) return (BigNumber$1).from(feeData.gasPrice);
|
|
28578
|
-
return undefined;
|
|
28579
|
-
};
|
|
28589
|
+
|
|
28580
28590
|
const $7d1bfafb81e64d74$export$e0580ae1f48db848 = async (provider, transaction)=>{
|
|
28581
28591
|
try {
|
|
28582
28592
|
return await provider.estimateGas(transaction);
|
|
@@ -28609,9 +28619,11 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28609
28619
|
if (transactionOrGas.type === ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION) estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, transactionOrGas.transaction));
|
|
28610
28620
|
else {
|
|
28611
28621
|
const feeData = await provider.getFeeData();
|
|
28612
|
-
const gasPrice = $
|
|
28613
|
-
|
|
28614
|
-
|
|
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
|
+
}
|
|
28615
28627
|
}
|
|
28616
28628
|
// Get the gas estimates for all the transactions and calculate the total gas
|
|
28617
28629
|
const gasEstimatePromises = await Promise.all(estimateGasPromises);
|
|
@@ -28623,57 +28635,39 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28623
28635
|
};
|
|
28624
28636
|
|
|
28625
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
|
+
};
|
|
28626
28658
|
const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemRequirements, transactionOrGasAmount)=>{
|
|
28627
|
-
// eslint-disable-next-line no-console
|
|
28628
|
-
console.log(provider, itemRequirements, transactionOrGasAmount);
|
|
28629
28659
|
const ownerAddress = await provider.getSigner().getAddress();
|
|
28630
28660
|
let aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(itemRequirements);
|
|
28631
28661
|
const erc20Allowances = await ($fc8b338399d890f3$export$d93c00812189e36)(provider, ownerAddress, aggregatedItems);
|
|
28632
28662
|
const erc721Allowances = await ($35c3fc7013888ba5$export$be546c525d418988)(provider, ownerAddress, aggregatedItems);
|
|
28633
|
-
// eslint-disable-next-line no-console
|
|
28634
|
-
console.log("ERC20 Allowances", erc20Allowances);
|
|
28635
|
-
// eslint-disable-next-line no-console
|
|
28636
|
-
console.log("ERC721 Allowances", erc721Allowances);
|
|
28637
28663
|
const aggregatedAllowances = ($ddc6bcd0896481e5$export$2fbfa41a4de56a89)(erc20Allowances, erc721Allowances);
|
|
28638
28664
|
const gasItem = await ($7d1bfafb81e64d74$export$3a4140bd9e983e4e)(provider, aggregatedAllowances, transactionOrGasAmount);
|
|
28639
28665
|
if (gasItem !== null) {
|
|
28640
28666
|
aggregatedItems.push(gasItem);
|
|
28641
28667
|
aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(aggregatedItems);
|
|
28642
28668
|
}
|
|
28643
|
-
// eslint-disable-next-line no-console
|
|
28644
|
-
console.log("Aggregated Items", aggregatedItems);
|
|
28645
28669
|
const balanceRequirements = await ($beb896e098e41faf$export$ddfc885f43c3cb6e)(config, provider, ownerAddress, aggregatedItems);
|
|
28646
|
-
|
|
28647
|
-
console.log("Balance Requirements", balanceRequirements);
|
|
28648
|
-
return {
|
|
28649
|
-
sufficient: true,
|
|
28650
|
-
transactionRequirements: [
|
|
28651
|
-
{
|
|
28652
|
-
type: ($4b58188d47aafe8d$export$5d3b0ad129b9b98e).GAS,
|
|
28653
|
-
sufficient: true,
|
|
28654
|
-
required: {
|
|
28655
|
-
balance: (BigNumber$1).from(0),
|
|
28656
|
-
formattedBalance: "0",
|
|
28657
|
-
token: {
|
|
28658
|
-
name: "IMX",
|
|
28659
|
-
symbol: "IMX",
|
|
28660
|
-
address: "0x0",
|
|
28661
|
-
decimals: 18
|
|
28662
|
-
}
|
|
28663
|
-
},
|
|
28664
|
-
current: {
|
|
28665
|
-
balance: (BigNumber$1).from(1),
|
|
28666
|
-
formattedBalance: "1",
|
|
28667
|
-
token: {
|
|
28668
|
-
name: "IMX",
|
|
28669
|
-
symbol: "IMX",
|
|
28670
|
-
address: "0x0",
|
|
28671
|
-
decimals: 18
|
|
28672
|
-
}
|
|
28673
|
-
}
|
|
28674
|
-
}
|
|
28675
|
-
]
|
|
28676
|
-
};
|
|
28670
|
+
return $0e7419077c373b24$export$4a2a19d99fef3b1b(balanceRequirements);
|
|
28677
28671
|
};
|
|
28678
28672
|
|
|
28679
28673
|
|
|
@@ -28973,7 +28967,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
|
|
|
28973
28967
|
function $parcel$export(e, n, v, s) {
|
|
28974
28968
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
28975
28969
|
}
|
|
28976
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.
|
|
28970
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.2-alpha";
|
|
28977
28971
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
28978
28972
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
28979
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