@fuel-ts/account 0.0.0-rc-2037-20240418115444 → 0.0.0-rc-2037-20240418115909

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/index.js CHANGED
@@ -1818,12 +1818,7 @@ var import_transactions6 = require("@fuel-ts/transactions");
1818
1818
  var isRequestInputCoin = (input) => input.type === import_transactions6.InputType.Coin;
1819
1819
  var isRequestInputMessage = (input) => input.type === import_transactions6.InputType.Message;
1820
1820
  var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
1821
- var getRequestInputResourceOwner = (input) => {
1822
- if (isRequestInputCoin(input)) {
1823
- return input.owner;
1824
- }
1825
- return input.recipient;
1826
- };
1821
+ var getRequestInputResourceOwner = (input) => isRequestInputCoin(input) ? input.owner : input.recipient;
1827
1822
  var isRequestInputResourceFromOwner = (input, owner) => getRequestInputResourceOwner(input) === owner.toB256();
1828
1823
  var cacheResources = (resources) => resources.reduce(
1829
1824
  (cache2, resource) => {
@@ -8954,7 +8949,7 @@ var Predicate = class extends Account {
8954
8949
  /**
8955
8950
  * Retrieves resources satisfying the spend query for the account.
8956
8951
  *
8957
- * @param quantities - IDs of coins to exclude.
8952
+ * @param quantities - Coins to retrieve.
8958
8953
  * @param excludedIds - IDs of resources to be excluded from the query.
8959
8954
  * @returns A promise that resolves to an array of Resources.
8960
8955
  */
@@ -9044,6 +9039,12 @@ var Predicate = class extends Account {
9044
9039
  }
9045
9040
  return mutatedBytes;
9046
9041
  }
9042
+ /**
9043
+ * Returns the index of the witness placeholder that was added to this predicate.
9044
+ * If no witness placeholder was added, it returns -1.
9045
+ * @param request - The transaction request.
9046
+ * @returns The index of the witness placeholder, or -1 if there is no witness placeholder.
9047
+ */
9047
9048
  getIndexFromPlaceholderWitness(request) {
9048
9049
  const predicateInputs = request.inputs.filter(isRequestInputResource).filter((input) => isRequestInputResourceFromOwner(input, this.address));
9049
9050
  let index = -1;