@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.js CHANGED
@@ -6336,6 +6336,11 @@ var TransactionResponse = class _TransactionResponse {
6336
6336
  if (statusChange.type === "PreconfirmationSuccessStatus" || statusChange.type === "PreconfirmationFailureStatus") {
6337
6337
  this.preConfirmationStatus = statusChange;
6338
6338
  this.resolveStatus("preConfirmation");
6339
+ const pendingConfirmationResolvers = this.statusResolvers.get("confirmation");
6340
+ if (!pendingConfirmationResolvers) {
6341
+ this.waitingForStreamData = false;
6342
+ break;
6343
+ }
6339
6344
  }
6340
6345
  if (statusChange.type === "SuccessStatus" || statusChange.type === "FailureStatus") {
6341
6346
  this.resolveStatus("confirmation");
@@ -7481,7 +7486,7 @@ var Provider = class _Provider {
7481
7486
  * @returns A promise that resolves to the transaction cost object.
7482
7487
  *
7483
7488
  * @deprecated Use provider.assembleTx instead
7484
- * Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
7489
+ * Check the migration guide https://docs.fuel.network/docs/fuels-ts/transactions/assemble-tx-migration-guide/ for more information.
7485
7490
  */
7486
7491
  async getTransactionCost(transactionRequestLike, { signatureCallback, gasPrice: gasPriceParam } = {}) {
7487
7492
  const txRequestClone = (0, import_ramda8.clone)(transactionRequestify(transactionRequestLike));
@@ -7625,7 +7630,7 @@ var Provider = class _Provider {
7625
7630
  requiredBalances,
7626
7631
  estimatePredicates,
7627
7632
  excludeInput,
7628
- reserveGas: reserveGas ? reserveGas.toString(10) : void 0
7633
+ reserveGas: reserveGas ? (0, import_math19.bn)(reserveGas).toString(10) : void 0
7629
7634
  });
7630
7635
  if (status.type === "DryRunFailureStatus") {
7631
7636
  const parsedReceipts = status.receipts.map(deserializeReceipt);
@@ -7637,8 +7642,8 @@ var Provider = class _Provider {
7637
7642
  if (gqlTransaction.policies?.maxFee) {
7638
7643
  request2.maxFee = (0, import_math19.bn)(gqlTransaction.policies.maxFee);
7639
7644
  }
7640
- if (gqlTransaction.scriptGasLimit) {
7641
- request2.gasLimit = (0, import_math19.bn)(gqlTransaction.scriptGasLimit);
7645
+ if (request2.type === import_transactions25.TransactionType.Script) {
7646
+ request2.gasLimit = (0, import_math19.bn)(gqlTransaction.scriptGasLimit).add((0, import_math19.bn)(reserveGas));
7642
7647
  }
7643
7648
  const rawReceipts = status.receipts;
7644
7649
  const chainId = await this.getChainId();
@@ -8740,7 +8745,7 @@ var Account = class extends AbstractAccount {
8740
8745
  * @returns A promise that resolves to the funded transaction request.
8741
8746
  *
8742
8747
  * @deprecated Use provider.assembleTx instead
8743
- * Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
8748
+ * Check the migration guide https://docs.fuel.network/docs/fuels-ts/transactions/assemble-tx-migration-guide/ for more information.
8744
8749
  */
8745
8750
  async fund(request2, params) {
8746
8751
  const {
@@ -9159,7 +9164,7 @@ var Account = class extends AbstractAccount {
9159
9164
  * @returns A promise that resolves to the transaction cost object.
9160
9165
  *
9161
9166
  * @deprecated Use provider.assembleTx instead
9162
- * Check the migration guide https://docs.fuel.network/guide/assembling-transactions/migration-guide.html for more information.
9167
+ * Check the migration guide https://docs.fuel.network/docs/fuels-ts/transactions/assemble-tx-migration-guide/ for more information.
9163
9168
  */
9164
9169
  async getTransactionCost(transactionRequestLike, { signatureCallback, quantities = [], gasPrice } = {}) {
9165
9170
  const txRequestClone = (0, import_ramda9.clone)(transactionRequestify(transactionRequestLike));
@@ -13230,6 +13235,14 @@ var Predicate = class _Predicate extends Account {
13230
13235
  configurableConstants: overrides.configurableConstants ?? this.configurableConstants
13231
13236
  });
13232
13237
  }
13238
+ /**
13239
+ * Sets the predicate data.
13240
+ *
13241
+ * @param data - The data to be set for the predicate.
13242
+ */
13243
+ setData(data) {
13244
+ this.predicateData = data;
13245
+ }
13233
13246
  /**
13234
13247
  * Processes the predicate data and returns the altered bytecode and interface.
13235
13248
  *