@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.global.js +8 -7
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +8 -2
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/transaction-request/helpers.d.ts.map +1 -1
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.mjs
CHANGED
@@ -1681,12 +1681,7 @@ import { InputType as InputType2 } from "@fuel-ts/transactions";
|
|
1681
1681
|
var isRequestInputCoin = (input) => input.type === InputType2.Coin;
|
1682
1682
|
var isRequestInputMessage = (input) => input.type === InputType2.Message;
|
1683
1683
|
var isRequestInputResource = (input) => isRequestInputCoin(input) || isRequestInputMessage(input);
|
1684
|
-
var getRequestInputResourceOwner = (input) =>
|
1685
|
-
if (isRequestInputCoin(input)) {
|
1686
|
-
return input.owner;
|
1687
|
-
}
|
1688
|
-
return input.recipient;
|
1689
|
-
};
|
1684
|
+
var getRequestInputResourceOwner = (input) => isRequestInputCoin(input) ? input.owner : input.recipient;
|
1690
1685
|
var isRequestInputResourceFromOwner = (input, owner) => getRequestInputResourceOwner(input) === owner.toB256();
|
1691
1686
|
var cacheResources = (resources) => resources.reduce(
|
1692
1687
|
(cache2, resource) => {
|
@@ -8831,7 +8826,7 @@ var Predicate = class extends Account {
|
|
8831
8826
|
/**
|
8832
8827
|
* Retrieves resources satisfying the spend query for the account.
|
8833
8828
|
*
|
8834
|
-
* @param quantities -
|
8829
|
+
* @param quantities - Coins to retrieve.
|
8835
8830
|
* @param excludedIds - IDs of resources to be excluded from the query.
|
8836
8831
|
* @returns A promise that resolves to an array of Resources.
|
8837
8832
|
*/
|
@@ -8921,6 +8916,12 @@ var Predicate = class extends Account {
|
|
8921
8916
|
}
|
8922
8917
|
return mutatedBytes;
|
8923
8918
|
}
|
8919
|
+
/**
|
8920
|
+
* Returns the index of the witness placeholder that was added to this predicate.
|
8921
|
+
* If no witness placeholder was added, it returns -1.
|
8922
|
+
* @param request - The transaction request.
|
8923
|
+
* @returns The index of the witness placeholder, or -1 if there is no witness placeholder.
|
8924
|
+
*/
|
8924
8925
|
getIndexFromPlaceholderWitness(request) {
|
8925
8926
|
const predicateInputs = request.inputs.filter(isRequestInputResource).filter((input) => isRequestInputResourceFromOwner(input, this.address));
|
8926
8927
|
let index = -1;
|