@fuel-ts/account 0.0.0-rc-2034-20240410113328 → 0.0.0-rc-2034-20240410132048

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.

@@ -31785,6 +31785,7 @@ This unreleased fuel-core build may include features and updates not yet support
31785
31785
  const padding = new Uint8Array(WORD_SIZE - encoded.length % WORD_SIZE);
31786
31786
  return concatBytes2([encoded, padding]);
31787
31787
  };
31788
+ var isUint8Array = (value) => value instanceof Uint8Array;
31788
31789
  var ArrayCoder = class extends Coder {
31789
31790
  coder;
31790
31791
  length;
@@ -32326,8 +32327,11 @@ This unreleased fuel-core build may include features and updates not yet support
32326
32327
  this.coder = coder;
32327
32328
  }
32328
32329
  encode(value) {
32329
- if (!Array.isArray(value)) {
32330
- throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
32330
+ if (!Array.isArray(value) && !isUint8Array(value)) {
32331
+ throw new FuelError(
32332
+ ErrorCode.ENCODE_ERROR,
32333
+ `Expected array value, or a Uint8Array. You can use arrayify to convert a value to a Uint8Array.`
32334
+ );
32331
32335
  }
32332
32336
  const parts = [];
32333
32337
  const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);