starknet 8.5.1 → 8.5.2

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.
package/dist/index.js CHANGED
@@ -1907,7 +1907,8 @@ var CairoBytes31 = class _CairoBytes31 {
1907
1907
  return new TextDecoder().decode(this.data);
1908
1908
  }
1909
1909
  toHexString() {
1910
- return addHexPrefix(this.toBigInt().toString(16));
1910
+ const hexValue = this.data.length === 0 ? "0" : buf2hex(this.data);
1911
+ return addHexPrefix(hexValue);
1911
1912
  }
1912
1913
  static validate(data) {
1913
1914
  const byteLength = _CairoBytes31.__processData(data).length;