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.mjs CHANGED
@@ -1733,7 +1733,8 @@ var CairoBytes31 = class _CairoBytes31 {
1733
1733
  return new TextDecoder().decode(this.data);
1734
1734
  }
1735
1735
  toHexString() {
1736
- return addHexPrefix(this.toBigInt().toString(16));
1736
+ const hexValue = this.data.length === 0 ? "0" : buf2hex(this.data);
1737
+ return addHexPrefix(hexValue);
1737
1738
  }
1738
1739
  static validate(data) {
1739
1740
  const byteLength = _CairoBytes31.__processData(data).length;