@latticexyz/utils 2.0.0-main-4c58005e → 2.0.0-main-d3edec28

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- ## 2.0.0-main-4c58005e
3
+ ## 2.0.0-main-d3edec28
4
4
 
5
5
  ### Major Changes
6
6
 
@@ -27,6 +27,29 @@
27
27
 
28
28
  - 4e4a3415: bump to latest TS version (5.1.6)
29
29
 
30
+ ## 2.0.0-next.13
31
+
32
+ ### Major Changes
33
+
34
+ - 52182f70: Removed `keccak256` and `keccak256Coord` hash utils in favor of [viem's `keccak256`](https://viem.sh/docs/utilities/keccak256.html#keccak256).
35
+
36
+ ```diff
37
+ - import { keccak256 } from "@latticexyz/utils";
38
+ + import { keccak256, toHex } from "viem";
39
+
40
+ - const hash = keccak256("some string");
41
+ + const hash = keccak256(toHex("some string"));
42
+ ```
43
+
44
+ ```diff
45
+ - import { keccak256Coord } from "@latticexyz/utils";
46
+ + import { encodeAbiParameters, keccak256, parseAbiParameters } from "viem";
47
+
48
+ const coord = { x: 1, y: 1 };
49
+ - const hash = keccak256Coord(coord);
50
+ + const hash = keccak256(encodeAbiParameters(parseAbiParameters("int32, int32"), [coord.x, coord.y]));
51
+ ```
52
+
30
53
  ## 2.0.0-next.12
31
54
 
32
55
  ## 2.0.0-next.11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/utils",
3
- "version": "2.0.0-main-4c58005e",
3
+ "version": "2.0.0-main-d3edec28",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/latticexyz/mud.git",