@fuel-ts/account 0.0.0-rc-2238-20240514192918 → 0.0.0-rc-2143-20240514195947
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.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/dist/account.d.ts.map +1 -1
- package/dist/index.global.js +1146 -412
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +146 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +144 -108
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/coin.d.ts +1 -0
- package/dist/providers/coin.d.ts.map +1 -1
- package/dist/providers/message.d.ts +1 -0
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/transaction-request/input.d.ts +2 -0
- package/dist/providers/transaction-request/input.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +1 -0
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-summary/call.d.ts +1 -1
- package/dist/providers/transaction-summary/call.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts +4 -2
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils.global.js +8731 -5778
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +134 -111
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +125 -102
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
package/dist/test-utils.js
CHANGED
@@ -64,7 +64,7 @@ var import_utils31 = require("@fuel-ts/utils");
|
|
64
64
|
var import_address4 = require("@fuel-ts/address");
|
65
65
|
var import_errors16 = require("@fuel-ts/errors");
|
66
66
|
var import_interfaces = require("@fuel-ts/interfaces");
|
67
|
-
var
|
67
|
+
var import_math21 = require("@fuel-ts/math");
|
68
68
|
var import_utils28 = require("@fuel-ts/utils");
|
69
69
|
var import_ramda4 = require("ramda");
|
70
70
|
|
@@ -106,7 +106,7 @@ var addAmountToCoinQuantities = (params) => {
|
|
106
106
|
// src/providers/provider.ts
|
107
107
|
var import_address3 = require("@fuel-ts/address");
|
108
108
|
var import_errors14 = require("@fuel-ts/errors");
|
109
|
-
var
|
109
|
+
var import_math18 = require("@fuel-ts/math");
|
110
110
|
var import_transactions20 = require("@fuel-ts/transactions");
|
111
111
|
var import_utils22 = require("@fuel-ts/utils");
|
112
112
|
var import_versions = require("@fuel-ts/versions");
|
@@ -2296,6 +2296,15 @@ var BaseTransactionRequest = class {
|
|
2296
2296
|
}
|
2297
2297
|
});
|
2298
2298
|
}
|
2299
|
+
shiftPredicateData() {
|
2300
|
+
this.inputs.forEach((input) => {
|
2301
|
+
if ("predicateData" in input && "padPredicateData" in input && typeof input.padPredicateData === "function") {
|
2302
|
+
input.predicateData = input.padPredicateData(
|
2303
|
+
BaseTransactionRequest.getPolicyMeta(this).policies.length
|
2304
|
+
);
|
2305
|
+
}
|
2306
|
+
});
|
2307
|
+
}
|
2299
2308
|
};
|
2300
2309
|
|
2301
2310
|
// src/providers/transaction-request/create-transaction-request.ts
|
@@ -2718,12 +2727,12 @@ var transactionRequestify = (obj) => {
|
|
2718
2727
|
|
2719
2728
|
// src/providers/transaction-response/transaction-response.ts
|
2720
2729
|
var import_errors13 = require("@fuel-ts/errors");
|
2721
|
-
var
|
2730
|
+
var import_math17 = require("@fuel-ts/math");
|
2722
2731
|
var import_transactions19 = require("@fuel-ts/transactions");
|
2723
2732
|
var import_utils20 = require("@fuel-ts/utils");
|
2724
2733
|
|
2725
2734
|
// src/providers/transaction-summary/assemble-transaction-summary.ts
|
2726
|
-
var
|
2735
|
+
var import_math16 = require("@fuel-ts/math");
|
2727
2736
|
var import_transactions17 = require("@fuel-ts/transactions");
|
2728
2737
|
var import_utils18 = require("@fuel-ts/utils");
|
2729
2738
|
|
@@ -2800,32 +2809,43 @@ var calculateTXFeeForSummary = (params) => {
|
|
2800
2809
|
// src/providers/transaction-summary/operations.ts
|
2801
2810
|
var import_configs10 = require("@fuel-ts/address/configs");
|
2802
2811
|
var import_errors11 = require("@fuel-ts/errors");
|
2803
|
-
var
|
2812
|
+
var import_math14 = require("@fuel-ts/math");
|
2804
2813
|
var import_transactions15 = require("@fuel-ts/transactions");
|
2805
2814
|
|
2806
2815
|
// src/providers/transaction-summary/call.ts
|
2807
2816
|
var import_abi_coder4 = require("@fuel-ts/abi-coder");
|
2808
|
-
var
|
2817
|
+
var import_math13 = require("@fuel-ts/math");
|
2818
|
+
var getFunctionCall = ({ abi, receipt, rawPayload, maxInputs }) => {
|
2809
2819
|
const abiInterface = new import_abi_coder4.Interface(abi);
|
2810
2820
|
const callFunctionSelector = receipt.param1.toHex(8);
|
2811
2821
|
const functionFragment = abiInterface.getFunction(callFunctionSelector);
|
2812
2822
|
const inputs = functionFragment.jsonFn.inputs;
|
2813
|
-
|
2823
|
+
let encodedArgs;
|
2824
|
+
if (functionFragment.isInputDataPointer) {
|
2825
|
+
if (rawPayload) {
|
2826
|
+
const argsOffset = (0, import_math13.bn)(receipt.param2).sub((0, import_abi_coder4.calculateVmTxMemory)({ maxInputs: maxInputs.toNumber() })).toNumber();
|
2827
|
+
encodedArgs = `0x${rawPayload.slice(2).slice(argsOffset * 2)}`;
|
2828
|
+
}
|
2829
|
+
} else {
|
2830
|
+
encodedArgs = receipt.param2.toHex();
|
2831
|
+
}
|
2814
2832
|
let argumentsProvided;
|
2815
|
-
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
|
2824
|
-
|
2825
|
-
|
2826
|
-
|
2827
|
-
|
2828
|
-
|
2833
|
+
if (encodedArgs) {
|
2834
|
+
const data = functionFragment.decodeArguments(encodedArgs);
|
2835
|
+
if (data) {
|
2836
|
+
argumentsProvided = inputs.reduce((prev, input, index) => {
|
2837
|
+
const value = data[index];
|
2838
|
+
const name = input.name;
|
2839
|
+
if (name) {
|
2840
|
+
return {
|
2841
|
+
...prev,
|
2842
|
+
// reparse to remove bn
|
2843
|
+
[name]: JSON.parse(JSON.stringify(value))
|
2844
|
+
};
|
2845
|
+
}
|
2846
|
+
return prev;
|
2847
|
+
}, {});
|
2848
|
+
}
|
2829
2849
|
}
|
2830
2850
|
const call = {
|
2831
2851
|
functionSignature: functionFragment.signature,
|
@@ -2965,7 +2985,7 @@ var mergeAssets = (op1, op2) => {
|
|
2965
2985
|
if (!matchingAsset) {
|
2966
2986
|
return asset1;
|
2967
2987
|
}
|
2968
|
-
const mergedAmount = (0,
|
2988
|
+
const mergedAmount = (0, import_math14.bn)(asset1.amount).add(matchingAsset.amount);
|
2969
2989
|
return { ...asset1, amount: mergedAmount };
|
2970
2990
|
});
|
2971
2991
|
return mergedAssets.concat(filteredAssets);
|
@@ -3288,7 +3308,7 @@ var extractBurnedAssetsFromReceipts = (receipts) => {
|
|
3288
3308
|
|
3289
3309
|
// src/providers/transaction-summary/status.ts
|
3290
3310
|
var import_errors12 = require("@fuel-ts/errors");
|
3291
|
-
var
|
3311
|
+
var import_math15 = require("@fuel-ts/math");
|
3292
3312
|
var getTransactionStatusName = (gqlStatus) => {
|
3293
3313
|
switch (gqlStatus) {
|
3294
3314
|
case "FailureStatus":
|
@@ -3322,15 +3342,15 @@ var processGraphqlStatus = (gqlTransactionStatus) => {
|
|
3322
3342
|
time = gqlTransactionStatus.time;
|
3323
3343
|
blockId = gqlTransactionStatus.block.id;
|
3324
3344
|
isStatusSuccess = true;
|
3325
|
-
totalFee = (0,
|
3326
|
-
totalGas = (0,
|
3345
|
+
totalFee = (0, import_math15.bn)(gqlTransactionStatus.totalFee);
|
3346
|
+
totalGas = (0, import_math15.bn)(gqlTransactionStatus.totalGas);
|
3327
3347
|
break;
|
3328
3348
|
case "FailureStatus":
|
3329
3349
|
time = gqlTransactionStatus.time;
|
3330
3350
|
blockId = gqlTransactionStatus.block.id;
|
3331
3351
|
isStatusFailure = true;
|
3332
|
-
totalFee = (0,
|
3333
|
-
totalGas = (0,
|
3352
|
+
totalFee = (0, import_math15.bn)(gqlTransactionStatus.totalFee);
|
3353
|
+
totalGas = (0, import_math15.bn)(gqlTransactionStatus.totalGas);
|
3334
3354
|
break;
|
3335
3355
|
case "SubmittedStatus":
|
3336
3356
|
time = gqlTransactionStatus.time;
|
@@ -3380,7 +3400,7 @@ function assembleTransactionSummary(params) {
|
|
3380
3400
|
maxInputs
|
3381
3401
|
});
|
3382
3402
|
const typeName = getTransactionTypeName(transaction.type);
|
3383
|
-
const tip = (0,
|
3403
|
+
const tip = (0, import_math16.bn)(transaction.policies?.find((policy) => policy.type === import_transactions17.PolicyType.Tip)?.data);
|
3384
3404
|
const { isStatusFailure, isStatusPending, isStatusSuccess, blockId, status, time, totalFee } = processGraphqlStatus(gqlTransactionStatus);
|
3385
3405
|
const fee = calculateTXFeeForSummary({
|
3386
3406
|
totalFee,
|
@@ -3451,7 +3471,7 @@ var TransactionResponse = class {
|
|
3451
3471
|
/** Current provider */
|
3452
3472
|
provider;
|
3453
3473
|
/** Gas used on the transaction */
|
3454
|
-
gasUsed = (0,
|
3474
|
+
gasUsed = (0, import_math17.bn)(0);
|
3455
3475
|
/** The graphql Transaction with receipts object. */
|
3456
3476
|
gqlTransaction;
|
3457
3477
|
abis;
|
@@ -3685,47 +3705,47 @@ var processGqlChain = (chain) => {
|
|
3685
3705
|
} = consensusParameters;
|
3686
3706
|
return {
|
3687
3707
|
name,
|
3688
|
-
baseChainHeight: (0,
|
3708
|
+
baseChainHeight: (0, import_math18.bn)(daHeight),
|
3689
3709
|
consensusParameters: {
|
3690
3710
|
version,
|
3691
|
-
chainId: (0,
|
3711
|
+
chainId: (0, import_math18.bn)(chainId),
|
3692
3712
|
baseAssetId,
|
3693
3713
|
feeParameters: {
|
3694
3714
|
version: feeParams.version,
|
3695
|
-
gasPerByte: (0,
|
3696
|
-
gasPriceFactor: (0,
|
3715
|
+
gasPerByte: (0, import_math18.bn)(feeParams.gasPerByte),
|
3716
|
+
gasPriceFactor: (0, import_math18.bn)(feeParams.gasPriceFactor)
|
3697
3717
|
},
|
3698
3718
|
contractParameters: {
|
3699
3719
|
version: contractParams.version,
|
3700
|
-
contractMaxSize: (0,
|
3701
|
-
maxStorageSlots: (0,
|
3720
|
+
contractMaxSize: (0, import_math18.bn)(contractParams.contractMaxSize),
|
3721
|
+
maxStorageSlots: (0, import_math18.bn)(contractParams.maxStorageSlots)
|
3702
3722
|
},
|
3703
3723
|
txParameters: {
|
3704
3724
|
version: txParams.version,
|
3705
|
-
maxInputs: (0,
|
3706
|
-
maxOutputs: (0,
|
3707
|
-
maxWitnesses: (0,
|
3708
|
-
maxGasPerTx: (0,
|
3709
|
-
maxSize: (0,
|
3710
|
-
maxBytecodeSubsections: (0,
|
3725
|
+
maxInputs: (0, import_math18.bn)(txParams.maxInputs),
|
3726
|
+
maxOutputs: (0, import_math18.bn)(txParams.maxOutputs),
|
3727
|
+
maxWitnesses: (0, import_math18.bn)(txParams.maxWitnesses),
|
3728
|
+
maxGasPerTx: (0, import_math18.bn)(txParams.maxGasPerTx),
|
3729
|
+
maxSize: (0, import_math18.bn)(txParams.maxSize),
|
3730
|
+
maxBytecodeSubsections: (0, import_math18.bn)(txParams.maxBytecodeSubsections)
|
3711
3731
|
},
|
3712
3732
|
predicateParameters: {
|
3713
3733
|
version: predicateParams.version,
|
3714
|
-
maxPredicateLength: (0,
|
3715
|
-
maxPredicateDataLength: (0,
|
3716
|
-
maxGasPerPredicate: (0,
|
3717
|
-
maxMessageDataLength: (0,
|
3734
|
+
maxPredicateLength: (0, import_math18.bn)(predicateParams.maxPredicateLength),
|
3735
|
+
maxPredicateDataLength: (0, import_math18.bn)(predicateParams.maxPredicateDataLength),
|
3736
|
+
maxGasPerPredicate: (0, import_math18.bn)(predicateParams.maxGasPerPredicate),
|
3737
|
+
maxMessageDataLength: (0, import_math18.bn)(predicateParams.maxMessageDataLength)
|
3718
3738
|
},
|
3719
3739
|
scriptParameters: {
|
3720
3740
|
version: scriptParams.version,
|
3721
|
-
maxScriptLength: (0,
|
3722
|
-
maxScriptDataLength: (0,
|
3741
|
+
maxScriptLength: (0, import_math18.bn)(scriptParams.maxScriptLength),
|
3742
|
+
maxScriptDataLength: (0, import_math18.bn)(scriptParams.maxScriptDataLength)
|
3723
3743
|
},
|
3724
3744
|
gasCosts
|
3725
3745
|
},
|
3726
3746
|
latestBlock: {
|
3727
3747
|
id: latestBlock.id,
|
3728
|
-
height: (0,
|
3748
|
+
height: (0, import_math18.bn)(latestBlock.height),
|
3729
3749
|
time: latestBlock.header.time,
|
3730
3750
|
transactions: latestBlock.transactions.map((i) => ({
|
3731
3751
|
id: i.id
|
@@ -3921,7 +3941,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
3921
3941
|
*/
|
3922
3942
|
async getBlockNumber() {
|
3923
3943
|
const { chain } = await this.operations.getChain();
|
3924
|
-
return (0,
|
3944
|
+
return (0, import_math18.bn)(chain.latestBlock.height, 10);
|
3925
3945
|
}
|
3926
3946
|
/**
|
3927
3947
|
* Returns the chain information.
|
@@ -3931,8 +3951,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
3931
3951
|
async fetchNode() {
|
3932
3952
|
const { nodeInfo } = await this.operations.getNodeInfo();
|
3933
3953
|
const processedNodeInfo = {
|
3934
|
-
maxDepth: (0,
|
3935
|
-
maxTx: (0,
|
3954
|
+
maxDepth: (0, import_math18.bn)(nodeInfo.maxDepth),
|
3955
|
+
maxTx: (0, import_math18.bn)(nodeInfo.maxTx),
|
3936
3956
|
nodeVersion: nodeInfo.nodeVersion,
|
3937
3957
|
utxoValidation: nodeInfo.utxoValidation,
|
3938
3958
|
vmBacktrace: nodeInfo.vmBacktrace
|
@@ -4049,7 +4069,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4049
4069
|
async estimatePredicates(transactionRequest) {
|
4050
4070
|
const shouldEstimatePredicates = Boolean(
|
4051
4071
|
transactionRequest.inputs.find(
|
4052
|
-
(input) => "predicate" in input && input.predicate && !(0, import_utils23.equalBytes)((0, import_utils22.arrayify)(input.predicate), (0, import_utils22.arrayify)("0x")) && new
|
4072
|
+
(input) => "predicate" in input && input.predicate && !(0, import_utils23.equalBytes)((0, import_utils22.arrayify)(input.predicate), (0, import_utils22.arrayify)("0x")) && new import_math18.BN(input.predicateGasUsed).isZero()
|
4053
4073
|
)
|
4054
4074
|
);
|
4055
4075
|
if (!shouldEstimatePredicates) {
|
@@ -4064,7 +4084,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4064
4084
|
} = response;
|
4065
4085
|
if (inputs) {
|
4066
4086
|
inputs.forEach((input, index) => {
|
4067
|
-
if ("predicateGasUsed" in input && (0,
|
4087
|
+
if ("predicateGasUsed" in input && (0, import_math18.bn)(input.predicateGasUsed).gt(0)) {
|
4068
4088
|
transactionRequest.inputs[index].predicateGasUsed = input.predicateGasUsed;
|
4069
4089
|
}
|
4070
4090
|
});
|
@@ -4222,12 +4242,12 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4222
4242
|
gasPrice = await this.estimateGasPrice(10);
|
4223
4243
|
}
|
4224
4244
|
const minFee = calculateGasFee({
|
4225
|
-
gasPrice: (0,
|
4245
|
+
gasPrice: (0, import_math18.bn)(gasPrice),
|
4226
4246
|
gas: minGas,
|
4227
4247
|
priceFactor: gasPriceFactor,
|
4228
4248
|
tip: transactionRequest.tip
|
4229
4249
|
}).add(1);
|
4230
|
-
let gasLimit = (0,
|
4250
|
+
let gasLimit = (0, import_math18.bn)(0);
|
4231
4251
|
if (transactionRequest.type === import_transactions20.TransactionType.Script) {
|
4232
4252
|
gasLimit = transactionRequest.gasLimit;
|
4233
4253
|
if (transactionRequest.gasLimit.eq(0)) {
|
@@ -4240,7 +4260,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4240
4260
|
}
|
4241
4261
|
const maxGas = transactionRequest.calculateMaxGas(chainInfo, minGas);
|
4242
4262
|
const maxFee = calculateGasFee({
|
4243
|
-
gasPrice: (0,
|
4263
|
+
gasPrice: (0, import_math18.bn)(gasPrice),
|
4244
4264
|
gas: maxGas,
|
4245
4265
|
priceFactor: gasPriceFactor,
|
4246
4266
|
tip: transactionRequest.tip
|
@@ -4305,7 +4325,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4305
4325
|
const allQuantities = mergeQuantities(coinOutputsQuantities, quantitiesToContract);
|
4306
4326
|
txRequestClone.fundWithFakeUtxos(allQuantities, baseAssetId, resourcesOwner?.address);
|
4307
4327
|
if (isScriptTransaction) {
|
4308
|
-
txRequestClone.gasLimit = (0,
|
4328
|
+
txRequestClone.gasLimit = (0, import_math18.bn)(0);
|
4309
4329
|
}
|
4310
4330
|
if (resourcesOwner && "populateTransactionPredicateData" in resourcesOwner) {
|
4311
4331
|
resourcesOwner.populateTransactionPredicateData(txRequestClone);
|
@@ -4326,7 +4346,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4326
4346
|
let dryRunStatus;
|
4327
4347
|
let missingContractIds = [];
|
4328
4348
|
let outputVariables = 0;
|
4329
|
-
let gasUsed = (0,
|
4349
|
+
let gasUsed = (0, import_math18.bn)(0);
|
4330
4350
|
txRequestClone.maxFee = maxFee;
|
4331
4351
|
if (isScriptTransaction) {
|
4332
4352
|
txRequestClone.gasLimit = gasLimit;
|
@@ -4391,10 +4411,10 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4391
4411
|
return coins.map((coin) => ({
|
4392
4412
|
id: coin.utxoId,
|
4393
4413
|
assetId: coin.assetId,
|
4394
|
-
amount: (0,
|
4414
|
+
amount: (0, import_math18.bn)(coin.amount),
|
4395
4415
|
owner: import_address3.Address.fromAddressOrString(coin.owner),
|
4396
|
-
blockCreated: (0,
|
4397
|
-
txCreatedIdx: (0,
|
4416
|
+
blockCreated: (0, import_math18.bn)(coin.blockCreated),
|
4417
|
+
txCreatedIdx: (0, import_math18.bn)(coin.txCreatedIdx)
|
4398
4418
|
}));
|
4399
4419
|
}
|
4400
4420
|
/**
|
@@ -4431,9 +4451,9 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4431
4451
|
switch (coin.type) {
|
4432
4452
|
case "MessageCoin":
|
4433
4453
|
return {
|
4434
|
-
amount: (0,
|
4454
|
+
amount: (0, import_math18.bn)(coin.amount),
|
4435
4455
|
assetId: coin.assetId,
|
4436
|
-
daHeight: (0,
|
4456
|
+
daHeight: (0, import_math18.bn)(coin.daHeight),
|
4437
4457
|
sender: import_address3.Address.fromAddressOrString(coin.sender),
|
4438
4458
|
recipient: import_address3.Address.fromAddressOrString(coin.recipient),
|
4439
4459
|
nonce: coin.nonce
|
@@ -4441,11 +4461,11 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4441
4461
|
case "Coin":
|
4442
4462
|
return {
|
4443
4463
|
id: coin.utxoId,
|
4444
|
-
amount: (0,
|
4464
|
+
amount: (0, import_math18.bn)(coin.amount),
|
4445
4465
|
assetId: coin.assetId,
|
4446
4466
|
owner: import_address3.Address.fromAddressOrString(coin.owner),
|
4447
|
-
blockCreated: (0,
|
4448
|
-
txCreatedIdx: (0,
|
4467
|
+
blockCreated: (0, import_math18.bn)(coin.blockCreated),
|
4468
|
+
txCreatedIdx: (0, import_math18.bn)(coin.txCreatedIdx)
|
4449
4469
|
};
|
4450
4470
|
default:
|
4451
4471
|
return null;
|
@@ -4462,13 +4482,13 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4462
4482
|
async getBlock(idOrHeight) {
|
4463
4483
|
let variables;
|
4464
4484
|
if (typeof idOrHeight === "number") {
|
4465
|
-
variables = { height: (0,
|
4485
|
+
variables = { height: (0, import_math18.bn)(idOrHeight).toString(10) };
|
4466
4486
|
} else if (idOrHeight === "latest") {
|
4467
4487
|
variables = { height: (await this.getBlockNumber()).toString(10) };
|
4468
4488
|
} else if (idOrHeight.length === 66) {
|
4469
4489
|
variables = { blockId: idOrHeight };
|
4470
4490
|
} else {
|
4471
|
-
variables = { blockId: (0,
|
4491
|
+
variables = { blockId: (0, import_math18.bn)(idOrHeight).toString(10) };
|
4472
4492
|
}
|
4473
4493
|
const { block } = await this.operations.getBlock(variables);
|
4474
4494
|
if (!block) {
|
@@ -4476,7 +4496,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4476
4496
|
}
|
4477
4497
|
return {
|
4478
4498
|
id: block.id,
|
4479
|
-
height: (0,
|
4499
|
+
height: (0, import_math18.bn)(block.height),
|
4480
4500
|
time: block.header.time,
|
4481
4501
|
transactionIds: block.transactions.map((tx) => tx.id)
|
4482
4502
|
};
|
@@ -4491,7 +4511,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4491
4511
|
const { blocks: fetchedData } = await this.operations.getBlocks(params);
|
4492
4512
|
const blocks = fetchedData.edges.map(({ node: block }) => ({
|
4493
4513
|
id: block.id,
|
4494
|
-
height: (0,
|
4514
|
+
height: (0, import_math18.bn)(block.height),
|
4495
4515
|
time: block.header.time,
|
4496
4516
|
transactionIds: block.transactions.map((tx) => tx.id)
|
4497
4517
|
}));
|
@@ -4506,7 +4526,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4506
4526
|
async getBlockWithTransactions(idOrHeight) {
|
4507
4527
|
let variables;
|
4508
4528
|
if (typeof idOrHeight === "number") {
|
4509
|
-
variables = { blockHeight: (0,
|
4529
|
+
variables = { blockHeight: (0, import_math18.bn)(idOrHeight).toString(10) };
|
4510
4530
|
} else if (idOrHeight === "latest") {
|
4511
4531
|
variables = { blockHeight: (await this.getBlockNumber()).toString() };
|
4512
4532
|
} else {
|
@@ -4518,7 +4538,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4518
4538
|
}
|
4519
4539
|
return {
|
4520
4540
|
id: block.id,
|
4521
|
-
height: (0,
|
4541
|
+
height: (0, import_math18.bn)(block.height, 10),
|
4522
4542
|
time: block.header.time,
|
4523
4543
|
transactionIds: block.transactions.map((tx) => tx.id),
|
4524
4544
|
transactions: block.transactions.map(
|
@@ -4567,7 +4587,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4567
4587
|
contract: import_address3.Address.fromAddressOrString(contractId).toB256(),
|
4568
4588
|
asset: (0, import_utils22.hexlify)(assetId)
|
4569
4589
|
});
|
4570
|
-
return (0,
|
4590
|
+
return (0, import_math18.bn)(contractBalance.amount, 10);
|
4571
4591
|
}
|
4572
4592
|
/**
|
4573
4593
|
* Returns the balance for the given owner for the given asset ID.
|
@@ -4581,7 +4601,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4581
4601
|
owner: import_address3.Address.fromAddressOrString(owner).toB256(),
|
4582
4602
|
assetId: (0, import_utils22.hexlify)(assetId)
|
4583
4603
|
});
|
4584
|
-
return (0,
|
4604
|
+
return (0, import_math18.bn)(balance.amount, 10);
|
4585
4605
|
}
|
4586
4606
|
/**
|
4587
4607
|
* Returns balances for the given owner.
|
@@ -4599,7 +4619,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4599
4619
|
const balances = result.balances.edges.map((edge) => edge.node);
|
4600
4620
|
return balances.map((balance) => ({
|
4601
4621
|
assetId: balance.assetId,
|
4602
|
-
amount: (0,
|
4622
|
+
amount: (0, import_math18.bn)(balance.amount)
|
4603
4623
|
}));
|
4604
4624
|
}
|
4605
4625
|
/**
|
@@ -4621,15 +4641,15 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4621
4641
|
sender: message.sender,
|
4622
4642
|
recipient: message.recipient,
|
4623
4643
|
nonce: message.nonce,
|
4624
|
-
amount: (0,
|
4644
|
+
amount: (0, import_math18.bn)(message.amount),
|
4625
4645
|
data: message.data
|
4626
4646
|
}),
|
4627
4647
|
sender: import_address3.Address.fromAddressOrString(message.sender),
|
4628
4648
|
recipient: import_address3.Address.fromAddressOrString(message.recipient),
|
4629
4649
|
nonce: message.nonce,
|
4630
|
-
amount: (0,
|
4650
|
+
amount: (0, import_math18.bn)(message.amount),
|
4631
4651
|
data: import_transactions20.InputMessageCoder.decodeData(message.data),
|
4632
|
-
daHeight: (0,
|
4652
|
+
daHeight: (0, import_math18.bn)(message.daHeight)
|
4633
4653
|
}));
|
4634
4654
|
}
|
4635
4655
|
/**
|
@@ -4682,19 +4702,19 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4682
4702
|
} = result.messageProof;
|
4683
4703
|
return {
|
4684
4704
|
messageProof: {
|
4685
|
-
proofIndex: (0,
|
4705
|
+
proofIndex: (0, import_math18.bn)(messageProof.proofIndex),
|
4686
4706
|
proofSet: messageProof.proofSet
|
4687
4707
|
},
|
4688
4708
|
blockProof: {
|
4689
|
-
proofIndex: (0,
|
4709
|
+
proofIndex: (0, import_math18.bn)(blockProof.proofIndex),
|
4690
4710
|
proofSet: blockProof.proofSet
|
4691
4711
|
},
|
4692
4712
|
messageBlockHeader: {
|
4693
4713
|
id: messageBlockHeader.id,
|
4694
|
-
daHeight: (0,
|
4714
|
+
daHeight: (0, import_math18.bn)(messageBlockHeader.daHeight),
|
4695
4715
|
transactionsCount: Number(messageBlockHeader.transactionsCount),
|
4696
4716
|
transactionsRoot: messageBlockHeader.transactionsRoot,
|
4697
|
-
height: (0,
|
4717
|
+
height: (0, import_math18.bn)(messageBlockHeader.height),
|
4698
4718
|
prevRoot: messageBlockHeader.prevRoot,
|
4699
4719
|
time: messageBlockHeader.time,
|
4700
4720
|
applicationHash: messageBlockHeader.applicationHash,
|
@@ -4706,10 +4726,10 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4706
4726
|
},
|
4707
4727
|
commitBlockHeader: {
|
4708
4728
|
id: commitBlockHeader.id,
|
4709
|
-
daHeight: (0,
|
4729
|
+
daHeight: (0, import_math18.bn)(commitBlockHeader.daHeight),
|
4710
4730
|
transactionsCount: Number(commitBlockHeader.transactionsCount),
|
4711
4731
|
transactionsRoot: commitBlockHeader.transactionsRoot,
|
4712
|
-
height: (0,
|
4732
|
+
height: (0, import_math18.bn)(commitBlockHeader.height),
|
4713
4733
|
prevRoot: commitBlockHeader.prevRoot,
|
4714
4734
|
time: commitBlockHeader.time,
|
4715
4735
|
applicationHash: commitBlockHeader.applicationHash,
|
@@ -4722,19 +4742,19 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4722
4742
|
sender: import_address3.Address.fromAddressOrString(sender),
|
4723
4743
|
recipient: import_address3.Address.fromAddressOrString(recipient),
|
4724
4744
|
nonce,
|
4725
|
-
amount: (0,
|
4745
|
+
amount: (0, import_math18.bn)(amount),
|
4726
4746
|
data
|
4727
4747
|
};
|
4728
4748
|
}
|
4729
4749
|
async getLatestGasPrice() {
|
4730
4750
|
const { latestGasPrice } = await this.operations.getLatestGasPrice();
|
4731
|
-
return (0,
|
4751
|
+
return (0, import_math18.bn)(latestGasPrice.gasPrice);
|
4732
4752
|
}
|
4733
4753
|
async estimateGasPrice(blockHorizon) {
|
4734
4754
|
const { estimateGasPrice } = await this.operations.estimateGasPrice({
|
4735
4755
|
blockHorizon: String(blockHorizon)
|
4736
4756
|
});
|
4737
|
-
return (0,
|
4757
|
+
return (0, import_math18.bn)(estimateGasPrice.gasPrice);
|
4738
4758
|
}
|
4739
4759
|
/**
|
4740
4760
|
* Returns Message Proof for given transaction id and the message id from MessageOut receipt.
|
@@ -4755,10 +4775,10 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4755
4775
|
*/
|
4756
4776
|
async produceBlocks(amount, startTime) {
|
4757
4777
|
const { produceBlocks: latestBlockHeight } = await this.operations.produceBlocks({
|
4758
|
-
blocksToProduce: (0,
|
4778
|
+
blocksToProduce: (0, import_math18.bn)(amount).toString(10),
|
4759
4779
|
startTimestamp: startTime ? import_utils22.DateTime.fromUnixMilliseconds(startTime).toTai64() : void 0
|
4760
4780
|
});
|
4761
|
-
return (0,
|
4781
|
+
return (0, import_math18.bn)(latestBlockHeight);
|
4762
4782
|
}
|
4763
4783
|
// eslint-disable-next-line @typescript-eslint/require-await
|
4764
4784
|
async getTransactionResponse(transactionId) {
|
@@ -4804,7 +4824,7 @@ __publicField(Provider, "nodeInfoCache", {});
|
|
4804
4824
|
|
4805
4825
|
// src/providers/transaction-summary/get-transaction-summary.ts
|
4806
4826
|
var import_errors15 = require("@fuel-ts/errors");
|
4807
|
-
var
|
4827
|
+
var import_math19 = require("@fuel-ts/math");
|
4808
4828
|
var import_transactions21 = require("@fuel-ts/transactions");
|
4809
4829
|
var import_utils25 = require("@fuel-ts/utils");
|
4810
4830
|
|
@@ -4881,13 +4901,13 @@ var assets = resolveIconPaths(rawAssets, fuelAssetsBaseUrl);
|
|
4881
4901
|
|
4882
4902
|
// src/utils/formatTransferToContractScriptData.ts
|
4883
4903
|
var import_abi_coder6 = require("@fuel-ts/abi-coder");
|
4884
|
-
var
|
4904
|
+
var import_math20 = require("@fuel-ts/math");
|
4885
4905
|
var import_utils27 = require("@fuel-ts/utils");
|
4886
4906
|
var asm = __toESM(require("@fuels/vm-asm"));
|
4887
4907
|
var formatTransferToContractScriptData = (params) => {
|
4888
4908
|
const { assetId, amountToTransfer, hexlifiedContractId } = params;
|
4889
4909
|
const numberCoder = new import_abi_coder6.BigNumberCoder("u64");
|
4890
|
-
const encoded = numberCoder.encode(new
|
4910
|
+
const encoded = numberCoder.encode(new import_math20.BN(amountToTransfer).toNumber());
|
4891
4911
|
const scriptData = Uint8Array.from([
|
4892
4912
|
...(0, import_utils27.arrayify)(hexlifiedContractId),
|
4893
4913
|
...encoded,
|
@@ -5082,9 +5102,9 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5082
5102
|
const { addedSignatures, estimatedPredicates, requiredQuantities, updateMaxFee } = params;
|
5083
5103
|
const fee = request.maxFee;
|
5084
5104
|
const baseAssetId = this.provider.getBaseAssetId();
|
5085
|
-
const requiredInBaseAsset = requiredQuantities.find((quantity) => quantity.assetId === baseAssetId)?.amount || (0,
|
5105
|
+
const requiredInBaseAsset = requiredQuantities.find((quantity) => quantity.assetId === baseAssetId)?.amount || (0, import_math21.bn)(0);
|
5086
5106
|
const requiredQuantitiesWithFee = addAmountToCoinQuantities({
|
5087
|
-
amount: (0,
|
5107
|
+
amount: (0, import_math21.bn)(fee),
|
5088
5108
|
assetId: baseAssetId,
|
5089
5109
|
coinQuantities: requiredQuantities
|
5090
5110
|
});
|
@@ -5092,7 +5112,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5092
5112
|
requiredQuantitiesWithFee.forEach(({ amount, assetId }) => {
|
5093
5113
|
quantitiesDict[assetId] = {
|
5094
5114
|
required: amount,
|
5095
|
-
owned: (0,
|
5115
|
+
owned: (0, import_math21.bn)(0)
|
5096
5116
|
};
|
5097
5117
|
});
|
5098
5118
|
request.inputs.filter(isRequestInputResource).forEach((input) => {
|
@@ -5119,6 +5139,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5119
5139
|
cacheRequestInputsResourcesFromOwner(request.inputs, this.address)
|
5120
5140
|
);
|
5121
5141
|
request.addResources(resources);
|
5142
|
+
request.shiftPredicateData();
|
5122
5143
|
request.updatePredicateGasUsed(estimatedPredicates);
|
5123
5144
|
const requestToReestimate2 = (0, import_ramda4.clone)(request);
|
5124
5145
|
if (addedSignatures) {
|
@@ -5150,6 +5171,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5150
5171
|
}
|
5151
5172
|
fundingAttempts += 1;
|
5152
5173
|
}
|
5174
|
+
request.shiftPredicateData();
|
5153
5175
|
request.updatePredicateGasUsed(estimatedPredicates);
|
5154
5176
|
const requestToReestimate = (0, import_ramda4.clone)(request);
|
5155
5177
|
if (addedSignatures) {
|
@@ -5200,7 +5222,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5200
5222
|
* @returns A promise that resolves to the transaction response.
|
5201
5223
|
*/
|
5202
5224
|
async transfer(destination, amount, assetId, txParams = {}) {
|
5203
|
-
if ((0,
|
5225
|
+
if ((0, import_math21.bn)(amount).lte(0)) {
|
5204
5226
|
throw new import_errors16.FuelError(
|
5205
5227
|
import_errors16.ErrorCode.INVALID_TRANSFER_AMOUNT,
|
5206
5228
|
"Transfer amount must be a positive number."
|
@@ -5220,7 +5242,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5220
5242
|
* @returns A promise that resolves to the transaction response.
|
5221
5243
|
*/
|
5222
5244
|
async transferToContract(contractId, amount, assetId, txParams = {}) {
|
5223
|
-
if ((0,
|
5245
|
+
if ((0, import_math21.bn)(amount).lte(0)) {
|
5224
5246
|
throw new import_errors16.FuelError(
|
5225
5247
|
import_errors16.ErrorCode.INVALID_TRANSFER_AMOUNT,
|
5226
5248
|
"Transfer amount must be a positive number."
|
@@ -5230,7 +5252,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5230
5252
|
const assetIdToTransfer = assetId ?? this.provider.getBaseAssetId();
|
5231
5253
|
const { script, scriptData } = await assembleTransferToContractScript({
|
5232
5254
|
hexlifiedContractId: contractAddress.toB256(),
|
5233
|
-
amountToTransfer: (0,
|
5255
|
+
amountToTransfer: (0, import_math21.bn)(amount),
|
5234
5256
|
assetId: assetIdToTransfer
|
5235
5257
|
});
|
5236
5258
|
let request = new ScriptTransactionRequest({
|
@@ -5241,7 +5263,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5241
5263
|
request.addContractInputAndOutput(contractAddress);
|
5242
5264
|
const txCost = await this.provider.getTransactionCost(request, {
|
5243
5265
|
resourcesOwner: this,
|
5244
|
-
quantitiesToContract: [{ amount: (0,
|
5266
|
+
quantitiesToContract: [{ amount: (0, import_math21.bn)(amount), assetId: String(assetIdToTransfer) }]
|
5245
5267
|
});
|
5246
5268
|
request = this.validateGasLimitAndMaxFee({
|
5247
5269
|
transactionRequest: request,
|
@@ -5266,7 +5288,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5266
5288
|
"0x".concat(recipientAddress.toHexString().substring(2).padStart(64, "0"))
|
5267
5289
|
);
|
5268
5290
|
const amountDataArray = (0, import_utils28.arrayify)(
|
5269
|
-
"0x".concat((0,
|
5291
|
+
"0x".concat((0, import_math21.bn)(amount).toHex().substring(2).padStart(16, "0"))
|
5270
5292
|
);
|
5271
5293
|
const script = new Uint8Array([
|
5272
5294
|
...(0, import_utils28.arrayify)(withdrawScript.bytes),
|
@@ -5276,7 +5298,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5276
5298
|
const params = { script, ...txParams };
|
5277
5299
|
const baseAssetId = this.provider.getBaseAssetId();
|
5278
5300
|
let request = new ScriptTransactionRequest(params);
|
5279
|
-
const quantitiesToContract = [{ amount: (0,
|
5301
|
+
const quantitiesToContract = [{ amount: (0, import_math21.bn)(amount), assetId: baseAssetId }];
|
5280
5302
|
const txCost = await this.provider.getTransactionCost(request, { quantitiesToContract });
|
5281
5303
|
request = this.validateGasLimitAndMaxFee({
|
5282
5304
|
transactionRequest: request,
|
@@ -5373,7 +5395,7 @@ var Account = class extends import_interfaces.AbstractAccount {
|
|
5373
5395
|
var import_address5 = require("@fuel-ts/address");
|
5374
5396
|
var import_crypto2 = require("@fuel-ts/crypto");
|
5375
5397
|
var import_hasher2 = require("@fuel-ts/hasher");
|
5376
|
-
var
|
5398
|
+
var import_math22 = require("@fuel-ts/math");
|
5377
5399
|
var import_utils29 = require("@fuel-ts/utils");
|
5378
5400
|
var import_secp256k1 = require("@noble/curves/secp256k1");
|
5379
5401
|
var Signer = class {
|
@@ -5393,7 +5415,7 @@ var Signer = class {
|
|
5393
5415
|
privateKey = `0x${privateKey}`;
|
5394
5416
|
}
|
5395
5417
|
}
|
5396
|
-
const privateKeyBytes = (0,
|
5418
|
+
const privateKeyBytes = (0, import_math22.toBytes)(privateKey, 32);
|
5397
5419
|
this.privateKey = (0, import_utils29.hexlify)(privateKeyBytes);
|
5398
5420
|
this.publicKey = (0, import_utils29.hexlify)(import_secp256k1.secp256k1.getPublicKey(privateKeyBytes, false).slice(1));
|
5399
5421
|
this.compressedPublicKey = (0, import_utils29.hexlify)(import_secp256k1.secp256k1.getPublicKey(privateKeyBytes, true));
|
@@ -5411,8 +5433,8 @@ var Signer = class {
|
|
5411
5433
|
*/
|
5412
5434
|
sign(data) {
|
5413
5435
|
const signature = import_secp256k1.secp256k1.sign((0, import_utils29.arrayify)(data), (0, import_utils29.arrayify)(this.privateKey));
|
5414
|
-
const r = (0,
|
5415
|
-
const s = (0,
|
5436
|
+
const r = (0, import_math22.toBytes)(`0x${signature.r.toString(16)}`, 32);
|
5437
|
+
const s = (0, import_math22.toBytes)(`0x${signature.s.toString(16)}`, 32);
|
5416
5438
|
s[0] |= (signature.recovery || 0) << 7;
|
5417
5439
|
return (0, import_utils29.hexlify)((0, import_utils29.concat)([r, s]));
|
5418
5440
|
}
|
@@ -5685,7 +5707,7 @@ __publicField(BaseWalletUnlocked, "defaultPath", "m/44'/1179993420'/0'/0/0");
|
|
5685
5707
|
var import_crypto5 = require("@fuel-ts/crypto");
|
5686
5708
|
var import_errors20 = require("@fuel-ts/errors");
|
5687
5709
|
var import_hasher6 = require("@fuel-ts/hasher");
|
5688
|
-
var
|
5710
|
+
var import_math23 = require("@fuel-ts/math");
|
5689
5711
|
var import_utils35 = require("@fuel-ts/utils");
|
5690
5712
|
|
5691
5713
|
// src/mnemonic/mnemonic.ts
|
@@ -8143,13 +8165,13 @@ var HDWallet = class {
|
|
8143
8165
|
} else {
|
8144
8166
|
data.set((0, import_utils35.arrayify)(this.publicKey));
|
8145
8167
|
}
|
8146
|
-
data.set((0,
|
8168
|
+
data.set((0, import_math23.toBytes)(index, 4), 33);
|
8147
8169
|
const bytes = (0, import_utils35.arrayify)((0, import_crypto5.computeHmac)("sha512", chainCode, data));
|
8148
8170
|
const IL = bytes.slice(0, 32);
|
8149
8171
|
const IR = bytes.slice(32);
|
8150
8172
|
if (privateKey) {
|
8151
8173
|
const N = "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141";
|
8152
|
-
const ki = (0,
|
8174
|
+
const ki = (0, import_math23.bn)(IL).add(privateKey).mod(N).toBytes(32);
|
8153
8175
|
return new HDWallet({
|
8154
8176
|
privateKey: ki,
|
8155
8177
|
chainCode: IR,
|
@@ -8195,7 +8217,7 @@ var HDWallet = class {
|
|
8195
8217
|
const prefix = getExtendedKeyPrefix(this.privateKey == null || isPublic, testnet);
|
8196
8218
|
const depth = (0, import_utils35.hexlify)(Uint8Array.from([this.depth]));
|
8197
8219
|
const parentFingerprint = this.parentFingerprint;
|
8198
|
-
const index = (0,
|
8220
|
+
const index = (0, import_math23.toHex)(this.index, 4);
|
8199
8221
|
const chainCode = this.chainCode;
|
8200
8222
|
const key = this.privateKey != null && !isPublic ? (0, import_utils35.concat)(["0x00", this.privateKey]) : this.publicKey;
|
8201
8223
|
const extendedKey = (0, import_utils35.arrayify)((0, import_utils35.concat)([prefix, depth, parentFingerprint, index, chainCode, key]));
|
@@ -8215,7 +8237,7 @@ var HDWallet = class {
|
|
8215
8237
|
});
|
8216
8238
|
}
|
8217
8239
|
static fromExtendedKey(extendedKey) {
|
8218
|
-
const decoded = (0, import_utils35.hexlify)((0,
|
8240
|
+
const decoded = (0, import_utils35.hexlify)((0, import_math23.toBytes)((0, import_utils35.decodeBase58)(extendedKey)));
|
8219
8241
|
const bytes = (0, import_utils35.arrayify)(decoded);
|
8220
8242
|
const validChecksum = base58check(bytes.slice(0, 78)) === extendedKey;
|
8221
8243
|
if (bytes.length !== 82 || !isValidExtendedKey(bytes)) {
|
@@ -8490,6 +8512,7 @@ var launchNode = async ({
|
|
8490
8512
|
ip,
|
8491
8513
|
port,
|
8492
8514
|
args = [],
|
8515
|
+
fuelCorePath = void 0,
|
8493
8516
|
useSystemFuelCore = false,
|
8494
8517
|
loggingEnabled = true,
|
8495
8518
|
debugEnabled = false,
|
@@ -8510,7 +8533,7 @@ var launchNode = async ({
|
|
8510
8533
|
const poaInstantFlagValue = getFlagValueFromArgs(args, "--poa-instant");
|
8511
8534
|
const poaInstant = poaInstantFlagValue === "true" || poaInstantFlagValue === void 0;
|
8512
8535
|
const graphQLStartSubstring = "Binding GraphQL provider to";
|
8513
|
-
const binPath = (0, import_cli_utils.findBinPath)("fuels-core", __dirname);
|
8536
|
+
const binPath = fuelCorePath ?? (0, import_cli_utils.findBinPath)("fuels-core", __dirname);
|
8514
8537
|
const command = useSystemFuelCore ? "fuel-core" : binPath;
|
8515
8538
|
const ipToUse = ip || "0.0.0.0";
|
8516
8539
|
const portToUse = port || (await (0, import_portfinder.getPortPromise)({
|