@fuel-ts/account 0.0.0-pr-2044-20240411144204 → 0.0.0-pr-2017-20240411150316
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 +20 -9
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -5
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +0 -1
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/test-utils.global.js +20 -8
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +2 -4
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +2 -4
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +16 -16
package/dist/index.global.js
CHANGED
@@ -28952,7 +28952,7 @@ spurious results.`);
|
|
28952
28952
|
// ../versions/dist/index.mjs
|
28953
28953
|
function getBuiltinVersions() {
|
28954
28954
|
return {
|
28955
|
-
FORC: "0.
|
28955
|
+
FORC: "0.52.1",
|
28956
28956
|
FUEL_CORE: "0.22.1",
|
28957
28957
|
FUELS: "0.79.0"
|
28958
28958
|
};
|
@@ -31764,6 +31764,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
31764
31764
|
const padding = new Uint8Array(WORD_SIZE - encoded.length % WORD_SIZE);
|
31765
31765
|
return concatBytes2([encoded, padding]);
|
31766
31766
|
};
|
31767
|
+
var isUint8Array = (value) => value instanceof Uint8Array;
|
31767
31768
|
var ArrayCoder = class extends Coder {
|
31768
31769
|
coder;
|
31769
31770
|
length;
|
@@ -32305,8 +32306,11 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32305
32306
|
this.coder = coder;
|
32306
32307
|
}
|
32307
32308
|
encode(value) {
|
32308
|
-
if (!Array.isArray(value)) {
|
32309
|
-
throw new FuelError(
|
32309
|
+
if (!Array.isArray(value) && !isUint8Array(value)) {
|
32310
|
+
throw new FuelError(
|
32311
|
+
ErrorCode.ENCODE_ERROR,
|
32312
|
+
`Expected array value, or a Uint8Array. You can use arrayify to convert a value to a Uint8Array.`
|
32313
|
+
);
|
32310
32314
|
}
|
32311
32315
|
const parts = [];
|
32312
32316
|
const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
|
@@ -33225,6 +33229,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33225
33229
|
});
|
33226
33230
|
return coder.decode(bytes3, 0);
|
33227
33231
|
}
|
33232
|
+
/**
|
33233
|
+
* Checks if the function is read-only i.e. it only reads from storage, does not write to it.
|
33234
|
+
*
|
33235
|
+
* @returns True if the function is read-only or pure, false otherwise.
|
33236
|
+
*/
|
33237
|
+
isReadOnly() {
|
33238
|
+
const storageAttribute = this.attributes.find((attr) => attr.name === "storage");
|
33239
|
+
return !storageAttribute?.arguments.includes("write");
|
33240
|
+
}
|
33228
33241
|
};
|
33229
33242
|
var Interface = class {
|
33230
33243
|
functions;
|
@@ -33288,7 +33301,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
33288
33301
|
}
|
33289
33302
|
return AbiCoder.encode(this.jsonAbi, configurable.configurableType, value, {
|
33290
33303
|
isRightPadded: true,
|
33291
|
-
|
33304
|
+
// TODO: Review support for configurables in v1 encoding when it becomes available
|
33305
|
+
encoding: ENCODING_V0
|
33292
33306
|
});
|
33293
33307
|
}
|
33294
33308
|
getTypeById(typeId) {
|
@@ -39759,8 +39773,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
39759
39773
|
assetId,
|
39760
39774
|
txPointer: "0x00000000000000000000000000000000",
|
39761
39775
|
witnessIndex,
|
39762
|
-
predicate: predicate?.bytes
|
39763
|
-
predicateData: predicate?.predicateDataBytes
|
39776
|
+
predicate: predicate?.bytes
|
39764
39777
|
};
|
39765
39778
|
this.pushInput(input);
|
39766
39779
|
this.addChangeOutput(owner, assetId);
|
@@ -39792,8 +39805,7 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
39792
39805
|
recipient: recipient.toB256(),
|
39793
39806
|
amount,
|
39794
39807
|
witnessIndex,
|
39795
|
-
predicate: predicate?.bytes
|
39796
|
-
predicateData: predicate?.predicateDataBytes
|
39808
|
+
predicate: predicate?.bytes
|
39797
39809
|
};
|
39798
39810
|
this.pushInput(input);
|
39799
39811
|
this.addChangeOutput(recipient, assetId);
|
@@ -47785,7 +47797,6 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
47785
47797
|
// src/predicate/predicate.ts
|
47786
47798
|
var Predicate = class extends Account {
|
47787
47799
|
bytes;
|
47788
|
-
predicateDataBytes = Uint8Array.from([]);
|
47789
47800
|
predicateData = [];
|
47790
47801
|
interface;
|
47791
47802
|
/**
|