@latticexyz/utils 2.0.0-alpha.93 → 2.0.0-foundry-js-c7b0289b
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/CHANGELOG.md +92 -0
- package/dist/index.js +2 -995
- package/dist/index.js.map +1 -1
- package/package.json +25 -42
- package/src/CoordMap.spec.ts +57 -0
- package/src/CoordMap.ts +106 -0
- package/src/VoxelCoordMap.ts +76 -0
- package/src/area.ts +15 -0
- package/{dist/arrays.d.ts → src/arrays.ts} +8 -2
- package/src/bytes.spec.ts +77 -0
- package/src/bytes.ts +85 -0
- package/src/console.ts +62 -0
- package/src/cubic.spec.ts +14 -0
- package/src/cubic.ts +109 -0
- package/src/deferred.ts +14 -0
- package/src/distance.ts +11 -0
- package/src/enums.ts +13 -0
- package/src/eth.ts +42 -0
- package/src/guards.ts +10 -0
- package/{dist/index.d.ts → src/index.ts} +13 -2
- package/src/iterable.spec.ts +56 -0
- package/src/iterable.ts +59 -0
- package/{dist/math.d.ts → src/math.ts} +4 -1
- package/src/mobx.ts +26 -0
- package/src/objects.ts +16 -0
- package/src/pack.spec.ts +37 -0
- package/src/pack.ts +61 -0
- package/src/promise.ts +46 -0
- package/src/proxy.spec.ts +186 -0
- package/src/proxy.ts +101 -0
- package/{dist/random.d.ts → src/random.ts} +7 -2
- package/src/rx.spec.ts +45 -0
- package/src/rx.ts +124 -0
- package/src/sleep.ts +3 -0
- package/src/types.ts +48 -0
- package/src/uuid.ts +70 -0
- package/src/v2/arrayToHex.ts +3 -0
- package/src/v2/bytesToString.ts +1 -0
- package/src/v2/hexToArray.ts +12 -0
- package/{dist/v2/index.d.ts → src/v2/index.ts} +1 -3
- package/src/v2/isHex.ts +6 -0
- package/src/v2/stringToBytes.ts +9 -0
- package/src/worker.ts +16 -0
- package/dist/CoordMap.d.ts +0 -26
- package/dist/VoxelCoordMap.d.ts +0 -23
- package/dist/area.d.ts +0 -3
- package/dist/bytes.d.ts +0 -10
- package/dist/console.d.ts +0 -52
- package/dist/cubic.d.ts +0 -32
- package/dist/deferred.d.ts +0 -5
- package/dist/distance.d.ts +0 -8
- package/dist/enums.d.ts +0 -5
- package/dist/eth.d.ts +0 -22
- package/dist/guards.d.ts +0 -3
- package/dist/hash.d.ts +0 -8
- package/dist/iterable.d.ts +0 -10
- package/dist/mobx.d.ts +0 -6
- package/dist/objects.d.ts +0 -11
- package/dist/pack.d.ts +0 -16
- package/dist/promise.d.ts +0 -4
- package/dist/proxy.d.ts +0 -8
- package/dist/rx.d.ts +0 -30
- package/dist/sleep.d.ts +0 -1
- package/dist/types.d.ts +0 -40
- package/dist/uuid.d.ts +0 -19
- package/dist/v2/TableId.d.ts +0 -10
- package/dist/v2/arrayToHex.d.ts +0 -1
- package/dist/v2/bytesToString.d.ts +0 -1
- package/dist/v2/hexToArray.d.ts +0 -1
- package/dist/v2/isDefined.d.ts +0 -1
- package/dist/v2/isHex.d.ts +0 -1
- package/dist/v2/stringToBytes16.d.ts +0 -1
- package/dist/worker.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,100 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 2.0.0-foundry-js-c7b0289b
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 52182f70: Removed `keccak256` and `keccak256Coord` hash utils in favor of [viem's `keccak256`](https://viem.sh/docs/utilities/keccak256.html#keccak256).
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
- import { keccak256 } from "@latticexyz/utils";
|
|
11
|
+
+ import { keccak256, toHex } from "viem";
|
|
12
|
+
|
|
13
|
+
- const hash = keccak256("some string");
|
|
14
|
+
+ const hash = keccak256(toHex("some string"));
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```diff
|
|
18
|
+
- import { keccak256Coord } from "@latticexyz/utils";
|
|
19
|
+
+ import { encodeAbiParameters, keccak256, parseAbiParameters } from "viem";
|
|
20
|
+
|
|
21
|
+
const coord = { x: 1, y: 1 };
|
|
22
|
+
- const hash = keccak256Coord(coord);
|
|
23
|
+
+ const hash = keccak256(encodeAbiParameters(parseAbiParameters("int32, int32"), [coord.x, coord.y]));
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 4e4a3415: bump to latest TS version (5.1.6)
|
|
29
|
+
|
|
30
|
+
## 2.0.0-next.14
|
|
31
|
+
|
|
32
|
+
## 2.0.0-next.13
|
|
33
|
+
|
|
34
|
+
### Major Changes
|
|
35
|
+
|
|
36
|
+
- 52182f70: Removed `keccak256` and `keccak256Coord` hash utils in favor of [viem's `keccak256`](https://viem.sh/docs/utilities/keccak256.html#keccak256).
|
|
37
|
+
|
|
38
|
+
```diff
|
|
39
|
+
- import { keccak256 } from "@latticexyz/utils";
|
|
40
|
+
+ import { keccak256, toHex } from "viem";
|
|
41
|
+
|
|
42
|
+
- const hash = keccak256("some string");
|
|
43
|
+
+ const hash = keccak256(toHex("some string"));
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```diff
|
|
47
|
+
- import { keccak256Coord } from "@latticexyz/utils";
|
|
48
|
+
+ import { encodeAbiParameters, keccak256, parseAbiParameters } from "viem";
|
|
49
|
+
|
|
50
|
+
const coord = { x: 1, y: 1 };
|
|
51
|
+
- const hash = keccak256Coord(coord);
|
|
52
|
+
+ const hash = keccak256(encodeAbiParameters(parseAbiParameters("int32, int32"), [coord.x, coord.y]));
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 2.0.0-next.12
|
|
56
|
+
|
|
57
|
+
## 2.0.0-next.11
|
|
58
|
+
|
|
59
|
+
## 2.0.0-next.10
|
|
60
|
+
|
|
61
|
+
## 2.0.0-next.9
|
|
62
|
+
|
|
63
|
+
## 2.0.0-next.8
|
|
64
|
+
|
|
65
|
+
## 2.0.0-next.7
|
|
66
|
+
|
|
67
|
+
## 2.0.0-next.6
|
|
68
|
+
|
|
69
|
+
## 2.0.0-next.5
|
|
70
|
+
|
|
71
|
+
## 2.0.0-next.4
|
|
72
|
+
|
|
73
|
+
## 2.0.0-next.3
|
|
74
|
+
|
|
75
|
+
## 2.0.0-next.2
|
|
76
|
+
|
|
77
|
+
## 2.0.0-next.1
|
|
78
|
+
|
|
79
|
+
## 2.0.0-next.0
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- [#1165](https://github.com/latticexyz/mud/pull/1165) [`4e4a3415`](https://github.com/latticexyz/mud/commit/4e4a34150aeae988c8e61e25d55c227afb6c2d4b) Thanks [@holic](https://github.com/holic)! - bump to latest TS version (5.1.6)
|
|
84
|
+
|
|
85
|
+
- Updated dependencies [[`8d51a034`](https://github.com/latticexyz/mud/commit/8d51a03486bc20006d8cc982f798dfdfe16f169f), [`53522998`](https://github.com/latticexyz/mud/commit/535229984565539e6168042150b45fe0f9b48b0f), [`0c4f9fea`](https://github.com/latticexyz/mud/commit/0c4f9fea9e38ba122316cdd52c3d158c62f8cfee)]:
|
|
86
|
+
- @latticexyz/common@2.0.0-next.0
|
|
87
|
+
|
|
3
88
|
All notable changes to this project will be documented in this file.
|
|
4
89
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
90
|
|
|
91
|
+
# [1.42.0](https://github.com/latticexyz/mud/compare/v1.41.0...v1.42.0) (2023-04-13)
|
|
92
|
+
|
|
93
|
+
### Features
|
|
94
|
+
|
|
95
|
+
- **network:** integrate initial sync from MODE ([#493](https://github.com/latticexyz/mud/issues/493)) ([7d06c1b](https://github.com/latticexyz/mud/commit/7d06c1b5cf00df627000c907e78f60d3cd2415cd))
|
|
96
|
+
- v2 event decoding ([#415](https://github.com/latticexyz/mud/issues/415)) ([374ed54](https://github.com/latticexyz/mud/commit/374ed542c3387a4ec2b36ab68ae534419aa58763))
|
|
97
|
+
|
|
6
98
|
# [1.41.0](https://github.com/latticexyz/mud/compare/v1.40.0...v1.41.0) (2023-03-09)
|
|
7
99
|
|
|
8
100
|
**Note:** Version bump only for package @latticexyz/utils
|