@fuel-ts/account 0.0.0-rc-1356-20240511074927 → 0.0.0-rc-2143-20240513161105

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.

@@ -29985,13 +29985,6 @@ This unreleased fuel-core build may include features and updates not yet support
29985
29985
  };
29986
29986
  var DateTime = _DateTime;
29987
29987
  __publicField3(DateTime, "TAI64_NULL", "");
29988
- function sleep(time) {
29989
- return new Promise((resolve) => {
29990
- setTimeout(() => {
29991
- resolve(true);
29992
- }, time);
29993
- });
29994
- }
29995
29988
  function isDefined(value) {
29996
29989
  return value !== void 0;
29997
29990
  }
@@ -32512,11 +32505,18 @@ This unreleased fuel-core build may include features and updates not yet support
32512
32505
  this.#isOptionVec = this.coder instanceof OptionCoder2;
32513
32506
  }
32514
32507
  encode(value) {
32515
- if (!Array.isArray(value)) {
32516
- throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
32508
+ if (!Array.isArray(value) && !isUint8Array(value)) {
32509
+ throw new FuelError(
32510
+ ErrorCode.ENCODE_ERROR,
32511
+ `Expected array value, or a Uint8Array. You can use arrayify to convert a value to a Uint8Array.`
32512
+ );
32513
+ }
32514
+ const lengthCoder = new BigNumberCoder("u64");
32515
+ if (isUint8Array(value)) {
32516
+ return new Uint8Array([...lengthCoder.encode(value.length), ...value]);
32517
32517
  }
32518
32518
  const bytes2 = value.map((v) => this.coder.encode(v));
32519
- const lengthBytes = new BigNumberCoder("u64").encode(value.length);
32519
+ const lengthBytes = lengthCoder.encode(value.length);
32520
32520
  return new Uint8Array([...lengthBytes, ...concatBytes2(bytes2)]);
32521
32521
  }
32522
32522
  decode(data, offset) {
@@ -39198,6 +39198,15 @@ ${MessageCoinFragmentDoc}`;
39198
39198
  return normalize2(clone_default(root));
39199
39199
  }
39200
39200
 
39201
+ // src/providers/utils/sleep.ts
39202
+ function sleep(time) {
39203
+ return new Promise((resolve) => {
39204
+ setTimeout(() => {
39205
+ resolve(true);
39206
+ }, time);
39207
+ });
39208
+ }
39209
+
39201
39210
  // src/providers/utils/extract-tx-error.ts
39202
39211
  var assemblePanicError = (status) => {
39203
39212
  let errorMessage = `The transaction reverted with reason: "${status.reason}".`;