@fuel-ts/account 0.0.0-rc-2238-20240514192918 → 0.0.0-rc-2143-20240514211533

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.

@@ -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 import_math20 = require("@fuel-ts/math");
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 import_math17 = require("@fuel-ts/math");
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 import_math16 = require("@fuel-ts/math");
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 import_math15 = require("@fuel-ts/math");
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 import_math13 = require("@fuel-ts/math");
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 getFunctionCall = ({ abi, receipt }) => {
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
- const encodedArgs = receipt.param2.toHex();
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
- const data = functionFragment.decodeArguments(encodedArgs);
2816
- if (data) {
2817
- argumentsProvided = inputs.reduce((prev, input, index) => {
2818
- const value = data[index];
2819
- const name = input.name;
2820
- if (name) {
2821
- return {
2822
- ...prev,
2823
- // reparse to remove bn
2824
- [name]: JSON.parse(JSON.stringify(value))
2825
- };
2826
- }
2827
- return prev;
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, import_math13.bn)(asset1.amount).add(matchingAsset.amount);
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 import_math14 = require("@fuel-ts/math");
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, import_math14.bn)(gqlTransactionStatus.totalFee);
3326
- totalGas = (0, import_math14.bn)(gqlTransactionStatus.totalGas);
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, import_math14.bn)(gqlTransactionStatus.totalFee);
3333
- totalGas = (0, import_math14.bn)(gqlTransactionStatus.totalGas);
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, import_math15.bn)(transaction.policies?.find((policy) => policy.type === import_transactions17.PolicyType.Tip)?.data);
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, import_math16.bn)(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, import_math17.bn)(daHeight),
3708
+ baseChainHeight: (0, import_math18.bn)(daHeight),
3689
3709
  consensusParameters: {
3690
3710
  version,
3691
- chainId: (0, import_math17.bn)(chainId),
3711
+ chainId: (0, import_math18.bn)(chainId),
3692
3712
  baseAssetId,
3693
3713
  feeParameters: {
3694
3714
  version: feeParams.version,
3695
- gasPerByte: (0, import_math17.bn)(feeParams.gasPerByte),
3696
- gasPriceFactor: (0, import_math17.bn)(feeParams.gasPriceFactor)
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, import_math17.bn)(contractParams.contractMaxSize),
3701
- maxStorageSlots: (0, import_math17.bn)(contractParams.maxStorageSlots)
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, import_math17.bn)(txParams.maxInputs),
3706
- maxOutputs: (0, import_math17.bn)(txParams.maxOutputs),
3707
- maxWitnesses: (0, import_math17.bn)(txParams.maxWitnesses),
3708
- maxGasPerTx: (0, import_math17.bn)(txParams.maxGasPerTx),
3709
- maxSize: (0, import_math17.bn)(txParams.maxSize),
3710
- maxBytecodeSubsections: (0, import_math17.bn)(txParams.maxBytecodeSubsections)
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, import_math17.bn)(predicateParams.maxPredicateLength),
3715
- maxPredicateDataLength: (0, import_math17.bn)(predicateParams.maxPredicateDataLength),
3716
- maxGasPerPredicate: (0, import_math17.bn)(predicateParams.maxGasPerPredicate),
3717
- maxMessageDataLength: (0, import_math17.bn)(predicateParams.maxMessageDataLength)
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, import_math17.bn)(scriptParams.maxScriptLength),
3722
- maxScriptDataLength: (0, import_math17.bn)(scriptParams.maxScriptDataLength)
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, import_math17.bn)(latestBlock.height),
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, import_math17.bn)(chain.latestBlock.height, 10);
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, import_math17.bn)(nodeInfo.maxDepth),
3935
- maxTx: (0, import_math17.bn)(nodeInfo.maxTx),
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 import_math17.BN(input.predicateGasUsed).isZero()
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, import_math17.bn)(input.predicateGasUsed).gt(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, import_math17.bn)(gasPrice),
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, import_math17.bn)(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, import_math17.bn)(gasPrice),
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, import_math17.bn)(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, import_math17.bn)(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, import_math17.bn)(coin.amount),
4414
+ amount: (0, import_math18.bn)(coin.amount),
4395
4415
  owner: import_address3.Address.fromAddressOrString(coin.owner),
4396
- blockCreated: (0, import_math17.bn)(coin.blockCreated),
4397
- txCreatedIdx: (0, import_math17.bn)(coin.txCreatedIdx)
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, import_math17.bn)(coin.amount),
4454
+ amount: (0, import_math18.bn)(coin.amount),
4435
4455
  assetId: coin.assetId,
4436
- daHeight: (0, import_math17.bn)(coin.daHeight),
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, import_math17.bn)(coin.amount),
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, import_math17.bn)(coin.blockCreated),
4448
- txCreatedIdx: (0, import_math17.bn)(coin.txCreatedIdx)
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, import_math17.bn)(idOrHeight).toString(10) };
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, import_math17.bn)(idOrHeight).toString(10) };
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, import_math17.bn)(block.height),
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, import_math17.bn)(block.height),
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, import_math17.bn)(idOrHeight).toString(10) };
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, import_math17.bn)(block.height, 10),
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, import_math17.bn)(contractBalance.amount, 10);
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, import_math17.bn)(balance.amount, 10);
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, import_math17.bn)(balance.amount)
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, import_math17.bn)(message.amount),
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, import_math17.bn)(message.amount),
4650
+ amount: (0, import_math18.bn)(message.amount),
4631
4651
  data: import_transactions20.InputMessageCoder.decodeData(message.data),
4632
- daHeight: (0, import_math17.bn)(message.daHeight)
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, import_math17.bn)(messageProof.proofIndex),
4705
+ proofIndex: (0, import_math18.bn)(messageProof.proofIndex),
4686
4706
  proofSet: messageProof.proofSet
4687
4707
  },
4688
4708
  blockProof: {
4689
- proofIndex: (0, import_math17.bn)(blockProof.proofIndex),
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, import_math17.bn)(messageBlockHeader.daHeight),
4714
+ daHeight: (0, import_math18.bn)(messageBlockHeader.daHeight),
4695
4715
  transactionsCount: Number(messageBlockHeader.transactionsCount),
4696
4716
  transactionsRoot: messageBlockHeader.transactionsRoot,
4697
- height: (0, import_math17.bn)(messageBlockHeader.height),
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, import_math17.bn)(commitBlockHeader.daHeight),
4729
+ daHeight: (0, import_math18.bn)(commitBlockHeader.daHeight),
4710
4730
  transactionsCount: Number(commitBlockHeader.transactionsCount),
4711
4731
  transactionsRoot: commitBlockHeader.transactionsRoot,
4712
- height: (0, import_math17.bn)(commitBlockHeader.height),
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, import_math17.bn)(amount),
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, import_math17.bn)(latestGasPrice.gasPrice);
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, import_math17.bn)(estimateGasPrice.gasPrice);
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, import_math17.bn)(amount).toString(10),
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, import_math17.bn)(latestBlockHeight);
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 import_math18 = require("@fuel-ts/math");
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 import_math19 = require("@fuel-ts/math");
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 import_math19.BN(amountToTransfer).toNumber());
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, import_math20.bn)(0);
5105
+ const requiredInBaseAsset = requiredQuantities.find((quantity) => quantity.assetId === baseAssetId)?.amount || (0, import_math21.bn)(0);
5086
5106
  const requiredQuantitiesWithFee = addAmountToCoinQuantities({
5087
- amount: (0, import_math20.bn)(fee),
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, import_math20.bn)(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, import_math20.bn)(amount).lte(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, import_math20.bn)(amount).lte(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, import_math20.bn)(amount),
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, import_math20.bn)(amount), assetId: String(assetIdToTransfer) }]
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, import_math20.bn)(amount).toHex().substring(2).padStart(16, "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, import_math20.bn)(amount), assetId: baseAssetId }];
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 import_math21 = require("@fuel-ts/math");
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, import_math21.toBytes)(privateKey, 32);
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, import_math21.toBytes)(`0x${signature.r.toString(16)}`, 32);
5415
- const s = (0, import_math21.toBytes)(`0x${signature.s.toString(16)}`, 32);
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 import_math22 = require("@fuel-ts/math");
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
@@ -7750,38 +7772,6 @@ var english = [
7750
7772
  var import_errors18 = require("@fuel-ts/errors");
7751
7773
  var import_hasher4 = require("@fuel-ts/hasher");
7752
7774
  var import_utils32 = require("@fuel-ts/utils");
7753
- function toUtf8Bytes(stri) {
7754
- const str = stri.normalize("NFKD");
7755
- const result = [];
7756
- for (let i = 0; i < str.length; i += 1) {
7757
- const c = str.charCodeAt(i);
7758
- if (c < 128) {
7759
- result.push(c);
7760
- } else if (c < 2048) {
7761
- result.push(c >> 6 | 192);
7762
- result.push(c & 63 | 128);
7763
- } else if ((c & 64512) === 55296) {
7764
- i += 1;
7765
- const c2 = str.charCodeAt(i);
7766
- if (i >= str.length || (c2 & 64512) !== 56320) {
7767
- throw new import_errors18.FuelError(
7768
- import_errors18.ErrorCode.INVALID_INPUT_PARAMETERS,
7769
- "Invalid UTF-8 in the input string."
7770
- );
7771
- }
7772
- const pair = 65536 + ((c & 1023) << 10) + (c2 & 1023);
7773
- result.push(pair >> 18 | 240);
7774
- result.push(pair >> 12 & 63 | 128);
7775
- result.push(pair >> 6 & 63 | 128);
7776
- result.push(pair & 63 | 128);
7777
- } else {
7778
- result.push(c >> 12 | 224);
7779
- result.push(c >> 6 & 63 | 128);
7780
- result.push(c & 63 | 128);
7781
- }
7782
- }
7783
- return Uint8Array.from(result);
7784
- }
7785
7775
  function getLowerMask(bits) {
7786
7776
  return (1 << bits) - 1;
7787
7777
  }
@@ -7854,7 +7844,7 @@ function mnemonicWordsToEntropy(words, wordlist) {
7854
7844
  }
7855
7845
 
7856
7846
  // src/mnemonic/mnemonic.ts
7857
- var MasterSecret = toUtf8Bytes("Bitcoin seed");
7847
+ var MasterSecret = (0, import_utils33.toUtf8Bytes)("Bitcoin seed");
7858
7848
  var MainnetPRV = "0x0488ade4";
7859
7849
  var TestnetPRV = "0x04358394";
7860
7850
  var MNEMONIC_SIZES = [12, 15, 18, 21, 24];
@@ -7938,8 +7928,8 @@ var Mnemonic = class {
7938
7928
  */
7939
7929
  static mnemonicToSeed(phrase, passphrase = "") {
7940
7930
  assertMnemonic(getWords(phrase));
7941
- const phraseBytes = toUtf8Bytes(getPhrase(phrase));
7942
- const salt = toUtf8Bytes(`mnemonic${passphrase}`);
7931
+ const phraseBytes = (0, import_utils33.toUtf8Bytes)(getPhrase(phrase));
7932
+ const salt = (0, import_utils33.toUtf8Bytes)(`mnemonic${passphrase}`);
7943
7933
  return (0, import_crypto4.pbkdf2)(phraseBytes, salt, 2048, 64, "sha512");
7944
7934
  }
7945
7935
  /**
@@ -8143,13 +8133,13 @@ var HDWallet = class {
8143
8133
  } else {
8144
8134
  data.set((0, import_utils35.arrayify)(this.publicKey));
8145
8135
  }
8146
- data.set((0, import_math22.toBytes)(index, 4), 33);
8136
+ data.set((0, import_math23.toBytes)(index, 4), 33);
8147
8137
  const bytes = (0, import_utils35.arrayify)((0, import_crypto5.computeHmac)("sha512", chainCode, data));
8148
8138
  const IL = bytes.slice(0, 32);
8149
8139
  const IR = bytes.slice(32);
8150
8140
  if (privateKey) {
8151
8141
  const N = "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141";
8152
- const ki = (0, import_math22.bn)(IL).add(privateKey).mod(N).toBytes(32);
8142
+ const ki = (0, import_math23.bn)(IL).add(privateKey).mod(N).toBytes(32);
8153
8143
  return new HDWallet({
8154
8144
  privateKey: ki,
8155
8145
  chainCode: IR,
@@ -8195,7 +8185,7 @@ var HDWallet = class {
8195
8185
  const prefix = getExtendedKeyPrefix(this.privateKey == null || isPublic, testnet);
8196
8186
  const depth = (0, import_utils35.hexlify)(Uint8Array.from([this.depth]));
8197
8187
  const parentFingerprint = this.parentFingerprint;
8198
- const index = (0, import_math22.toHex)(this.index, 4);
8188
+ const index = (0, import_math23.toHex)(this.index, 4);
8199
8189
  const chainCode = this.chainCode;
8200
8190
  const key = this.privateKey != null && !isPublic ? (0, import_utils35.concat)(["0x00", this.privateKey]) : this.publicKey;
8201
8191
  const extendedKey = (0, import_utils35.arrayify)((0, import_utils35.concat)([prefix, depth, parentFingerprint, index, chainCode, key]));
@@ -8215,7 +8205,7 @@ var HDWallet = class {
8215
8205
  });
8216
8206
  }
8217
8207
  static fromExtendedKey(extendedKey) {
8218
- const decoded = (0, import_utils35.hexlify)((0, import_math22.toBytes)((0, import_utils35.decodeBase58)(extendedKey)));
8208
+ const decoded = (0, import_utils35.hexlify)((0, import_math23.toBytes)((0, import_utils35.decodeBase58)(extendedKey)));
8219
8209
  const bytes = (0, import_utils35.arrayify)(decoded);
8220
8210
  const validChecksum = base58check(bytes.slice(0, 78)) === extendedKey;
8221
8211
  if (bytes.length !== 82 || !isValidExtendedKey(bytes)) {
@@ -8490,6 +8480,7 @@ var launchNode = async ({
8490
8480
  ip,
8491
8481
  port,
8492
8482
  args = [],
8483
+ fuelCorePath = void 0,
8493
8484
  useSystemFuelCore = false,
8494
8485
  loggingEnabled = true,
8495
8486
  debugEnabled = false,
@@ -8510,7 +8501,7 @@ var launchNode = async ({
8510
8501
  const poaInstantFlagValue = getFlagValueFromArgs(args, "--poa-instant");
8511
8502
  const poaInstant = poaInstantFlagValue === "true" || poaInstantFlagValue === void 0;
8512
8503
  const graphQLStartSubstring = "Binding GraphQL provider to";
8513
- const binPath = (0, import_cli_utils.findBinPath)("fuels-core", __dirname);
8504
+ const binPath = fuelCorePath ?? (0, import_cli_utils.findBinPath)("fuels-core", __dirname);
8514
8505
  const command = useSystemFuelCore ? "fuel-core" : binPath;
8515
8506
  const ipToUse = ip || "0.0.0.0";
8516
8507
  const portToUse = port || (await (0, import_portfinder.getPortPromise)({