@fuel-ts/account 0.100.6 → 0.101.0

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/index.mjs CHANGED
@@ -6136,6 +6136,11 @@ var TransactionResponse = class _TransactionResponse {
6136
6136
  if (statusChange.type === "PreconfirmationSuccessStatus" || statusChange.type === "PreconfirmationFailureStatus") {
6137
6137
  this.preConfirmationStatus = statusChange;
6138
6138
  this.resolveStatus("preConfirmation");
6139
+ const pendingConfirmationResolvers = this.statusResolvers.get("confirmation");
6140
+ if (!pendingConfirmationResolvers) {
6141
+ this.waitingForStreamData = false;
6142
+ break;
6143
+ }
6139
6144
  }
6140
6145
  if (statusChange.type === "SuccessStatus" || statusChange.type === "FailureStatus") {
6141
6146
  this.resolveStatus("confirmation");
@@ -7281,7 +7286,7 @@ var Provider = class _Provider {
7281
7286
  * @returns A promise that resolves to the transaction cost object.
7282
7287
  *
7283
7288
  * @deprecated Use provider.assembleTx instead
7284
- * Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
7289
+ * Check the migration guide https://docs.fuel.network/docs/fuels-ts/transactions/assemble-tx-migration-guide/ for more information.
7285
7290
  */
7286
7291
  async getTransactionCost(transactionRequestLike, { signatureCallback, gasPrice: gasPriceParam } = {}) {
7287
7292
  const txRequestClone = clone8(transactionRequestify(transactionRequestLike));
@@ -7425,7 +7430,7 @@ var Provider = class _Provider {
7425
7430
  requiredBalances,
7426
7431
  estimatePredicates,
7427
7432
  excludeInput,
7428
- reserveGas: reserveGas ? reserveGas.toString(10) : void 0
7433
+ reserveGas: reserveGas ? bn18(reserveGas).toString(10) : void 0
7429
7434
  });
7430
7435
  if (status.type === "DryRunFailureStatus") {
7431
7436
  const parsedReceipts = status.receipts.map(deserializeReceipt);
@@ -7437,8 +7442,8 @@ var Provider = class _Provider {
7437
7442
  if (gqlTransaction.policies?.maxFee) {
7438
7443
  request2.maxFee = bn18(gqlTransaction.policies.maxFee);
7439
7444
  }
7440
- if (gqlTransaction.scriptGasLimit) {
7441
- request2.gasLimit = bn18(gqlTransaction.scriptGasLimit);
7445
+ if (request2.type === TransactionType11.Script) {
7446
+ request2.gasLimit = bn18(gqlTransaction.scriptGasLimit).add(bn18(reserveGas));
7442
7447
  }
7443
7448
  const rawReceipts = status.receipts;
7444
7449
  const chainId = await this.getChainId();
@@ -8540,7 +8545,7 @@ var Account = class extends AbstractAccount {
8540
8545
  * @returns A promise that resolves to the funded transaction request.
8541
8546
  *
8542
8547
  * @deprecated Use provider.assembleTx instead
8543
- * Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
8548
+ * Check the migration guide https://docs.fuel.network/docs/fuels-ts/transactions/assemble-tx-migration-guide/ for more information.
8544
8549
  */
8545
8550
  async fund(request2, params) {
8546
8551
  const {
@@ -8959,7 +8964,7 @@ var Account = class extends AbstractAccount {
8959
8964
  * @returns A promise that resolves to the transaction cost object.
8960
8965
  *
8961
8966
  * @deprecated Use provider.assembleTx instead
8962
- * Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
8967
+ * Check the migration guide https://docs.fuel.network/docs/fuels-ts/transactions/assemble-tx-migration-guide/ for more information.
8963
8968
  */
8964
8969
  async getTransactionCost(transactionRequestLike, { signatureCallback, quantities = [], gasPrice } = {}) {
8965
8970
  const txRequestClone = clone9(transactionRequestify(transactionRequestLike));
@@ -13039,6 +13044,14 @@ var Predicate = class _Predicate extends Account {
13039
13044
  configurableConstants: overrides.configurableConstants ?? this.configurableConstants
13040
13045
  });
13041
13046
  }
13047
+ /**
13048
+ * Sets the predicate data.
13049
+ *
13050
+ * @param data - The data to be set for the predicate.
13051
+ */
13052
+ setData(data) {
13053
+ this.predicateData = data;
13054
+ }
13042
13055
  /**
13043
13056
  * Processes the predicate data and returns the altered bytecode and interface.
13044
13057
  *