@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.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
|
|
@@ -3257,6 +3257,7 @@ class ImmutableXClient {
|
|
|
3257
3257
|
|
|
3258
3258
|
var immutablex_client = /*#__PURE__*/Object.freeze({
|
|
3259
3259
|
__proto__: null,
|
|
3260
|
+
IMXError: coreSdk.IMXError,
|
|
3260
3261
|
ImmutableXClient: ImmutableXClient,
|
|
3261
3262
|
imxClientCreateStarkSigner: coreSdk.createStarkSigner,
|
|
3262
3263
|
imxClientGenerateLegacyStarkPrivateKey: coreSdk.generateLegacyStarkPrivateKey
|
|
@@ -26986,7 +26987,8 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
|
|
|
26986
26987
|
nativeCurrency: {
|
|
26987
26988
|
name: "IMX",
|
|
26988
26989
|
symbol: "IMX",
|
|
26989
|
-
decimals: 18
|
|
26990
|
+
decimals: 18,
|
|
26991
|
+
address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
|
|
26990
26992
|
}
|
|
26991
26993
|
}
|
|
26992
26994
|
]
|
|
@@ -27021,7 +27023,8 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
|
|
|
27021
27023
|
nativeCurrency: {
|
|
27022
27024
|
name: "IMX",
|
|
27023
27025
|
symbol: "IMX",
|
|
27024
|
-
decimals: 18
|
|
27026
|
+
decimals: 18,
|
|
27027
|
+
address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
|
|
27025
27028
|
}
|
|
27026
27029
|
}
|
|
27027
27030
|
]
|
|
@@ -27056,7 +27059,8 @@ const $d85ad1457a3f1a83$export$3a9ebede6a150274 = new Map([
|
|
|
27056
27059
|
nativeCurrency: {
|
|
27057
27060
|
name: "IMX",
|
|
27058
27061
|
symbol: "IMX",
|
|
27059
|
-
decimals: 18
|
|
27062
|
+
decimals: 18,
|
|
27063
|
+
address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
|
|
27060
27064
|
}
|
|
27061
27065
|
}
|
|
27062
27066
|
]
|
|
@@ -27272,13 +27276,6 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
|
|
|
27272
27276
|
GasTokenType["NATIVE"] = "NATIVE";
|
|
27273
27277
|
GasTokenType["ERC20"] = "ERC20";
|
|
27274
27278
|
})($4b58188d47aafe8d$export$537fa3efd10ed435 || ($4b58188d47aafe8d$export$537fa3efd10ed435 = {}));
|
|
27275
|
-
var $4b58188d47aafe8d$export$5d3b0ad129b9b98e;
|
|
27276
|
-
(function(TransactionRequirementType) {
|
|
27277
|
-
TransactionRequirementType["GAS"] = "GAS";
|
|
27278
|
-
TransactionRequirementType["NATIVE"] = "NATIVE";
|
|
27279
|
-
TransactionRequirementType["ERC20"] = "ERC20";
|
|
27280
|
-
TransactionRequirementType["ERC721"] = "ERC721";
|
|
27281
|
-
})($4b58188d47aafe8d$export$5d3b0ad129b9b98e || ($4b58188d47aafe8d$export$5d3b0ad129b9b98e = {}));
|
|
27282
27279
|
|
|
27283
27280
|
|
|
27284
27281
|
|
|
@@ -27732,13 +27729,19 @@ const $dbe95599a4661140$export$8e0e7ffc78696d30 = async (web3Provider, transacti
|
|
|
27732
27729
|
|
|
27733
27730
|
|
|
27734
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
|
+
|
|
27735
27740
|
const $570856c68db0bd36$var$GAS_LIMIT = 140000;
|
|
27736
|
-
const $570856c68db0bd36$var$doesChainSupportEIP1559 = (feeData)=>!!feeData.maxFeePerGas && !!feeData.maxPriorityFeePerGas;
|
|
27737
|
-
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);
|
|
27738
27741
|
const $570856c68db0bd36$var$getGasEstimates = async (provider)=>{
|
|
27739
27742
|
const txnGasLimitInWei = $570856c68db0bd36$var$GAS_LIMIT; // todo: fetch gasLimit from bridgeSDK when they add new fn
|
|
27740
27743
|
const feeData = await provider.getFeeData();
|
|
27741
|
-
const gasPriceInWei = $
|
|
27744
|
+
const gasPriceInWei = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
|
|
27742
27745
|
if (!gasPriceInWei) return undefined;
|
|
27743
27746
|
return gasPriceInWei.mul(txnGasLimitInWei);
|
|
27744
27747
|
};
|
|
@@ -28015,8 +28018,6 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
|
|
|
28015
28018
|
|
|
28016
28019
|
|
|
28017
28020
|
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
28021
|
const $ddc6bcd0896481e5$export$2fbfa41a4de56a89 = (erc20allowances, erc721allowances)=>{
|
|
28021
28022
|
const aggregatedAllowances = [];
|
|
28022
28023
|
if (!erc20allowances.sufficient) {
|
|
@@ -28385,12 +28386,9 @@ const $aa6caea9a60d18c7$export$f96d1c819a615a64 = (itemRequirements)=>$aa6caea9a
|
|
|
28385
28386
|
|
|
28386
28387
|
const $73d2282a108cc7e2$export$ed7929b58bab85da = (itemRequirements)=>itemRequirements.map((itemRequirement)=>{
|
|
28387
28388
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
|
|
28388
|
-
name: "IMX",
|
|
28389
|
-
symbol: "IMX",
|
|
28390
28389
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28391
28390
|
};
|
|
28392
28391
|
return {
|
|
28393
|
-
name: itemRequirement.type,
|
|
28394
28392
|
address: itemRequirement.contractAddress
|
|
28395
28393
|
};
|
|
28396
28394
|
});
|
|
@@ -28406,6 +28404,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28406
28404
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (ethers.BigNumber).from(0));
|
|
28407
28405
|
let erc721BalanceResult = itemBalanceResult;
|
|
28408
28406
|
if (!erc721BalanceResult) erc721BalanceResult = {
|
|
28407
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28409
28408
|
balance: (ethers.BigNumber).from(0),
|
|
28410
28409
|
formattedBalance: "0",
|
|
28411
28410
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28413,7 +28412,7 @@ const $73d2282a108cc7e2$export$9b757e40b19984c3 = (itemRequirement, balances)=>{
|
|
|
28413
28412
|
};
|
|
28414
28413
|
return {
|
|
28415
28414
|
sufficient: sufficient,
|
|
28416
|
-
type:
|
|
28415
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28417
28416
|
delta: {
|
|
28418
28417
|
balance: delta,
|
|
28419
28418
|
formattedBalance: delta.toString()
|
|
@@ -28433,23 +28432,30 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28433
28432
|
return balance.token?.address === itemRequirement.contractAddress;
|
|
28434
28433
|
});
|
|
28435
28434
|
else if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) itemBalanceResult = balances.find((balance)=>{
|
|
28436
|
-
return
|
|
28435
|
+
return balance.token?.address === "" || balance.token?.address === ($d85ad1457a3f1a83$export$b80040cb173ba6e9);
|
|
28437
28436
|
});
|
|
28438
28437
|
// Calculate the balance delta
|
|
28439
28438
|
const requiredBalance = itemRequirement.amount;
|
|
28440
28439
|
const sufficient = requiredBalance.isNegative() || requiredBalance.isZero() || (itemBalanceResult?.balance.gte(requiredBalance) ?? false);
|
|
28441
28440
|
const delta = requiredBalance.sub(itemBalanceResult?.balance ?? (ethers.BigNumber).from(0));
|
|
28441
|
+
let name = "";
|
|
28442
|
+
let symbol = "";
|
|
28442
28443
|
let decimals = ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28443
|
-
if (itemBalanceResult)
|
|
28444
|
+
if (itemBalanceResult) {
|
|
28445
|
+
decimals = itemBalanceResult.token?.decimals ?? ($d85ad1457a3f1a83$export$903389470ba9433c);
|
|
28446
|
+
name = itemBalanceResult.token.name;
|
|
28447
|
+
symbol = itemBalanceResult.token.symbol;
|
|
28448
|
+
}
|
|
28444
28449
|
let tokenBalanceResult = itemBalanceResult;
|
|
28445
28450
|
if (itemRequirement.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) {
|
|
28446
28451
|
// No token balance so mark as zero native
|
|
28447
28452
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28453
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28448
28454
|
balance: (ethers.BigNumber).from(0),
|
|
28449
28455
|
formattedBalance: "0",
|
|
28450
28456
|
token: {
|
|
28451
|
-
name:
|
|
28452
|
-
symbol:
|
|
28457
|
+
name: name,
|
|
28458
|
+
symbol: symbol,
|
|
28453
28459
|
decimals: ($d85ad1457a3f1a83$export$903389470ba9433c),
|
|
28454
28460
|
address: ($d85ad1457a3f1a83$export$b80040cb173ba6e9)
|
|
28455
28461
|
}
|
|
@@ -28461,9 +28467,13 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28461
28467
|
balance: delta,
|
|
28462
28468
|
formattedBalance: (ethers.utils).formatUnits(delta, decimals)
|
|
28463
28469
|
},
|
|
28464
|
-
current:
|
|
28470
|
+
current: {
|
|
28471
|
+
...tokenBalanceResult,
|
|
28472
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE
|
|
28473
|
+
},
|
|
28465
28474
|
required: {
|
|
28466
28475
|
...tokenBalanceResult,
|
|
28476
|
+
type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
|
|
28467
28477
|
balance: (ethers.BigNumber).from(itemRequirement.amount),
|
|
28468
28478
|
formattedBalance: (ethers.utils).formatUnits(itemRequirement.amount, decimals)
|
|
28469
28479
|
}
|
|
@@ -28471,10 +28481,14 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28471
28481
|
}
|
|
28472
28482
|
// No token balance so mark as zero
|
|
28473
28483
|
if (!tokenBalanceResult) tokenBalanceResult = {
|
|
28484
|
+
type: itemRequirement.type,
|
|
28474
28485
|
balance: (ethers.BigNumber).from(0),
|
|
28475
28486
|
formattedBalance: "0",
|
|
28476
28487
|
token: {
|
|
28477
|
-
|
|
28488
|
+
name: name,
|
|
28489
|
+
symbol: symbol,
|
|
28490
|
+
address: itemRequirement.contractAddress,
|
|
28491
|
+
decimals: decimals
|
|
28478
28492
|
}
|
|
28479
28493
|
};
|
|
28480
28494
|
return {
|
|
@@ -28516,11 +28530,11 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28516
28530
|
// Setup maps to be able to link data back to the associated promises
|
|
28517
28531
|
const erc721s = new Map();
|
|
28518
28532
|
const erc721OwnershipPromises = new Map();
|
|
28519
|
-
itemRequirements.
|
|
28520
|
-
|
|
28521
|
-
const contract = new (ethers.Contract)(
|
|
28522
|
-
erc721s.set(
|
|
28523
|
-
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));
|
|
28524
28538
|
});
|
|
28525
28539
|
try {
|
|
28526
28540
|
// Convert ERC721 ownership into a balance result
|
|
@@ -28531,6 +28545,7 @@ const $73d2282a108cc7e2$export$6ab9757fda54db7e = (itemRequirement, balances)=>{
|
|
|
28531
28545
|
let itemCount = 0;
|
|
28532
28546
|
if (itemRequirement && ownerAddress === erc721OwnerAddress) itemCount = 1;
|
|
28533
28547
|
erc721Balances.push({
|
|
28548
|
+
type: (0, $4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
|
|
28534
28549
|
balance: (0, ethers.BigNumber).from(itemCount),
|
|
28535
28550
|
formattedBalance: itemCount.toString(),
|
|
28536
28551
|
contractAddress: itemRequirement.contractAddress,
|
|
@@ -28582,7 +28597,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28582
28597
|
}, true);
|
|
28583
28598
|
return {
|
|
28584
28599
|
sufficient: sufficient,
|
|
28585
|
-
|
|
28600
|
+
balanceRequirements: balanceRequirements
|
|
28586
28601
|
};
|
|
28587
28602
|
};
|
|
28588
28603
|
|
|
@@ -28593,12 +28608,7 @@ const $beb896e098e41faf$export$ddfc885f43c3cb6e = async (config, provider, owner
|
|
|
28593
28608
|
|
|
28594
28609
|
|
|
28595
28610
|
|
|
28596
|
-
|
|
28597
|
-
const $7d1bfafb81e64d74$var$getGasPriceInWei = (feeData)=>{
|
|
28598
|
-
if ($7d1bfafb81e64d74$var$doesChainSupportEIP1559(feeData)) return (ethers.BigNumber).from(feeData.maxFeePerGas).add((ethers.BigNumber).from(feeData.maxPriorityFeePerGas));
|
|
28599
|
-
if (feeData.gasPrice) return (ethers.BigNumber).from(feeData.gasPrice);
|
|
28600
|
-
return undefined;
|
|
28601
|
-
};
|
|
28611
|
+
|
|
28602
28612
|
const $7d1bfafb81e64d74$export$e0580ae1f48db848 = async (provider, transaction)=>{
|
|
28603
28613
|
try {
|
|
28604
28614
|
return await provider.estimateGas(transaction);
|
|
@@ -28631,9 +28641,11 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28631
28641
|
if (transactionOrGas.type === ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION) estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, transactionOrGas.transaction));
|
|
28632
28642
|
else {
|
|
28633
28643
|
const feeData = await provider.getFeeData();
|
|
28634
|
-
const gasPrice = $
|
|
28635
|
-
|
|
28636
|
-
|
|
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
|
+
}
|
|
28637
28649
|
}
|
|
28638
28650
|
// Get the gas estimates for all the transactions and calculate the total gas
|
|
28639
28651
|
const gasEstimatePromises = await Promise.all(estimateGasPromises);
|
|
@@ -28645,57 +28657,39 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
|
|
|
28645
28657
|
};
|
|
28646
28658
|
|
|
28647
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
|
+
};
|
|
28648
28680
|
const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemRequirements, transactionOrGasAmount)=>{
|
|
28649
|
-
// eslint-disable-next-line no-console
|
|
28650
|
-
console.log(provider, itemRequirements, transactionOrGasAmount);
|
|
28651
28681
|
const ownerAddress = await provider.getSigner().getAddress();
|
|
28652
28682
|
let aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(itemRequirements);
|
|
28653
28683
|
const erc20Allowances = await ($fc8b338399d890f3$export$d93c00812189e36)(provider, ownerAddress, aggregatedItems);
|
|
28654
28684
|
const erc721Allowances = await ($35c3fc7013888ba5$export$be546c525d418988)(provider, ownerAddress, aggregatedItems);
|
|
28655
|
-
// eslint-disable-next-line no-console
|
|
28656
|
-
console.log("ERC20 Allowances", erc20Allowances);
|
|
28657
|
-
// eslint-disable-next-line no-console
|
|
28658
|
-
console.log("ERC721 Allowances", erc721Allowances);
|
|
28659
28685
|
const aggregatedAllowances = ($ddc6bcd0896481e5$export$2fbfa41a4de56a89)(erc20Allowances, erc721Allowances);
|
|
28660
28686
|
const gasItem = await ($7d1bfafb81e64d74$export$3a4140bd9e983e4e)(provider, aggregatedAllowances, transactionOrGasAmount);
|
|
28661
28687
|
if (gasItem !== null) {
|
|
28662
28688
|
aggregatedItems.push(gasItem);
|
|
28663
28689
|
aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(aggregatedItems);
|
|
28664
28690
|
}
|
|
28665
|
-
// eslint-disable-next-line no-console
|
|
28666
|
-
console.log("Aggregated Items", aggregatedItems);
|
|
28667
28691
|
const balanceRequirements = await ($beb896e098e41faf$export$ddfc885f43c3cb6e)(config, provider, ownerAddress, aggregatedItems);
|
|
28668
|
-
|
|
28669
|
-
console.log("Balance Requirements", balanceRequirements);
|
|
28670
|
-
return {
|
|
28671
|
-
sufficient: true,
|
|
28672
|
-
transactionRequirements: [
|
|
28673
|
-
{
|
|
28674
|
-
type: ($4b58188d47aafe8d$export$5d3b0ad129b9b98e).GAS,
|
|
28675
|
-
sufficient: true,
|
|
28676
|
-
required: {
|
|
28677
|
-
balance: (ethers.BigNumber).from(0),
|
|
28678
|
-
formattedBalance: "0",
|
|
28679
|
-
token: {
|
|
28680
|
-
name: "IMX",
|
|
28681
|
-
symbol: "IMX",
|
|
28682
|
-
address: "0x0",
|
|
28683
|
-
decimals: 18
|
|
28684
|
-
}
|
|
28685
|
-
},
|
|
28686
|
-
current: {
|
|
28687
|
-
balance: (ethers.BigNumber).from(1),
|
|
28688
|
-
formattedBalance: "1",
|
|
28689
|
-
token: {
|
|
28690
|
-
name: "IMX",
|
|
28691
|
-
symbol: "IMX",
|
|
28692
|
-
address: "0x0",
|
|
28693
|
-
decimals: 18
|
|
28694
|
-
}
|
|
28695
|
-
}
|
|
28696
|
-
}
|
|
28697
|
-
]
|
|
28698
|
-
};
|
|
28692
|
+
return $0e7419077c373b24$export$4a2a19d99fef3b1b(balanceRequirements);
|
|
28699
28693
|
};
|
|
28700
28694
|
|
|
28701
28695
|
|
|
@@ -28995,7 +28989,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
|
|
|
28995
28989
|
function $parcel$export(e, n, v, s) {
|
|
28996
28990
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
28997
28991
|
}
|
|
28998
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.
|
|
28992
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.15.2-alpha";
|
|
28999
28993
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
29000
28994
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
29001
28995
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1876,7 +1876,7 @@ interface OpenAPIError extends BasicAPIError {
|
|
|
1876
1876
|
/**
|
|
1877
1877
|
* Custom Error class that is returned from the API when a request fails
|
|
1878
1878
|
*/
|
|
1879
|
-
declare class APIError extends Error {
|
|
1879
|
+
declare class APIError$1 extends Error {
|
|
1880
1880
|
readonly code: string;
|
|
1881
1881
|
readonly details: {
|
|
1882
1882
|
[key: string]: any;
|
|
@@ -1983,15 +1983,13 @@ interface BlockchainDataModuleConfiguration extends ModuleConfiguration<APIConfi
|
|
|
1983
1983
|
|
|
1984
1984
|
type ActivityType = ActivityType$1;
|
|
1985
1985
|
|
|
1986
|
-
type blockchain_data_d_APIError = APIError;
|
|
1987
|
-
declare const blockchain_data_d_APIError: typeof APIError;
|
|
1988
1986
|
type blockchain_data_d_ActivityType = ActivityType;
|
|
1989
1987
|
type blockchain_data_d_BlockchainData = BlockchainData;
|
|
1990
1988
|
declare const blockchain_data_d_BlockchainData: typeof BlockchainData;
|
|
1991
1989
|
type blockchain_data_d_BlockchainDataModuleConfiguration = BlockchainDataModuleConfiguration;
|
|
1992
1990
|
declare namespace blockchain_data_d {
|
|
1993
1991
|
export {
|
|
1994
|
-
|
|
1992
|
+
APIError$1 as APIError,
|
|
1995
1993
|
blockchain_data_d_ActivityType as ActivityType,
|
|
1996
1994
|
blockchain_data_d_BlockchainData as BlockchainData,
|
|
1997
1995
|
blockchain_data_d_BlockchainDataModuleConfiguration as BlockchainDataModuleConfiguration,
|
|
@@ -2943,6 +2941,43 @@ declare class BaseAPI {
|
|
|
2943
2941
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
2944
2942
|
}
|
|
2945
2943
|
|
|
2944
|
+
/**
|
|
2945
|
+
* Immutable X API
|
|
2946
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2947
|
+
*
|
|
2948
|
+
* The version of the OpenAPI document: 3.0
|
|
2949
|
+
* Contact: support@immutable.com
|
|
2950
|
+
*
|
|
2951
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2952
|
+
* https://openapi-generator.tech
|
|
2953
|
+
* Do not edit the class manually.
|
|
2954
|
+
*/
|
|
2955
|
+
/**
|
|
2956
|
+
*
|
|
2957
|
+
* @export
|
|
2958
|
+
* @interface APIError
|
|
2959
|
+
*/
|
|
2960
|
+
interface APIError {
|
|
2961
|
+
/**
|
|
2962
|
+
* The error code
|
|
2963
|
+
* @type {string}
|
|
2964
|
+
* @memberof APIError
|
|
2965
|
+
*/
|
|
2966
|
+
'code': string;
|
|
2967
|
+
/**
|
|
2968
|
+
* The error details
|
|
2969
|
+
* @type {string}
|
|
2970
|
+
* @memberof APIError
|
|
2971
|
+
*/
|
|
2972
|
+
'details'?: string;
|
|
2973
|
+
/**
|
|
2974
|
+
* The error message
|
|
2975
|
+
* @type {string}
|
|
2976
|
+
* @memberof APIError
|
|
2977
|
+
*/
|
|
2978
|
+
'message': string;
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2946
2981
|
/**
|
|
2947
2982
|
* Immutable X API
|
|
2948
2983
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -12318,6 +12353,18 @@ interface NftTransferDetails {
|
|
|
12318
12353
|
tokenAddress: string;
|
|
12319
12354
|
}
|
|
12320
12355
|
|
|
12356
|
+
/**
|
|
12357
|
+
* Custom Error class that is returned from the API when a request fails
|
|
12358
|
+
*/
|
|
12359
|
+
declare class IMXError extends Error {
|
|
12360
|
+
/**
|
|
12361
|
+
* [See a list of thrown error codes](https://docs.x.immutable.com/docs/error-codes/)
|
|
12362
|
+
*/
|
|
12363
|
+
readonly code: string;
|
|
12364
|
+
readonly details?: string;
|
|
12365
|
+
constructor({ code, details, message }: APIError);
|
|
12366
|
+
}
|
|
12367
|
+
|
|
12321
12368
|
/**
|
|
12322
12369
|
* Creates a new Stark Signer
|
|
12323
12370
|
* @params starkPrivateKey - the private key as a hex string
|
|
@@ -12699,13 +12746,46 @@ declare class ImmutableXClient {
|
|
|
12699
12746
|
getNftPrimaryTransactions(request: NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest): Promise<NftprimarytransactionListTransactionsResponse>;
|
|
12700
12747
|
}
|
|
12701
12748
|
|
|
12749
|
+
type immutablex_client_d_AnyToken = AnyToken;
|
|
12750
|
+
type immutablex_client_d_ERC20Amount = ERC20Amount;
|
|
12751
|
+
type immutablex_client_d_ERC20Token = ERC20Token;
|
|
12752
|
+
type immutablex_client_d_ERC721Token = ERC721Token;
|
|
12753
|
+
type immutablex_client_d_ETHAmount = ETHAmount;
|
|
12754
|
+
type immutablex_client_d_ETHToken = ETHToken;
|
|
12755
|
+
type immutablex_client_d_ExchangeTokenAmount = ExchangeTokenAmount;
|
|
12756
|
+
type immutablex_client_d_IMXError = IMXError;
|
|
12757
|
+
declare const immutablex_client_d_IMXError: typeof IMXError;
|
|
12702
12758
|
type immutablex_client_d_ImmutableXClient = ImmutableXClient;
|
|
12703
12759
|
declare const immutablex_client_d_ImmutableXClient: typeof ImmutableXClient;
|
|
12760
|
+
type immutablex_client_d_NftTransferDetails = NftTransferDetails;
|
|
12761
|
+
type immutablex_client_d_StarkSigner = StarkSigner;
|
|
12762
|
+
type immutablex_client_d_TokenAmount = TokenAmount;
|
|
12763
|
+
type immutablex_client_d_UnsignedExchangeTransferRequest = UnsignedExchangeTransferRequest;
|
|
12764
|
+
type immutablex_client_d_UnsignedMintRequest = UnsignedMintRequest;
|
|
12765
|
+
type immutablex_client_d_UnsignedOrderRequest = UnsignedOrderRequest;
|
|
12766
|
+
type immutablex_client_d_UnsignedTransferRequest = UnsignedTransferRequest;
|
|
12767
|
+
type immutablex_client_d_WalletConnection = WalletConnection;
|
|
12704
12768
|
declare namespace immutablex_client_d {
|
|
12705
12769
|
export {
|
|
12770
|
+
immutablex_client_d_AnyToken as AnyToken,
|
|
12771
|
+
immutablex_client_d_ERC20Amount as ERC20Amount,
|
|
12772
|
+
immutablex_client_d_ERC20Token as ERC20Token,
|
|
12773
|
+
immutablex_client_d_ERC721Token as ERC721Token,
|
|
12774
|
+
immutablex_client_d_ETHAmount as ETHAmount,
|
|
12775
|
+
immutablex_client_d_ETHToken as ETHToken,
|
|
12776
|
+
immutablex_client_d_ExchangeTokenAmount as ExchangeTokenAmount,
|
|
12777
|
+
immutablex_client_d_IMXError as IMXError,
|
|
12706
12778
|
immutablex_client_d_ImmutableXClient as ImmutableXClient,
|
|
12707
12779
|
ImxModuleConfiguration as ImxClientModuleConfiguration,
|
|
12708
12780
|
WalletConnection as ImxClientWalletConnection,
|
|
12781
|
+
immutablex_client_d_NftTransferDetails as NftTransferDetails,
|
|
12782
|
+
immutablex_client_d_StarkSigner as StarkSigner,
|
|
12783
|
+
immutablex_client_d_TokenAmount as TokenAmount,
|
|
12784
|
+
immutablex_client_d_UnsignedExchangeTransferRequest as UnsignedExchangeTransferRequest,
|
|
12785
|
+
immutablex_client_d_UnsignedMintRequest as UnsignedMintRequest,
|
|
12786
|
+
immutablex_client_d_UnsignedOrderRequest as UnsignedOrderRequest,
|
|
12787
|
+
immutablex_client_d_UnsignedTransferRequest as UnsignedTransferRequest,
|
|
12788
|
+
immutablex_client_d_WalletConnection as WalletConnection,
|
|
12709
12789
|
createStarkSigner as imxClientCreateStarkSigner,
|
|
12710
12790
|
generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey,
|
|
12711
12791
|
};
|