starknet 11.10.2 → 11.10.4
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 +12 -0
- package/dist/index.global.js +4 -3
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [11.10.4](https://github.com/starknet-io/starknet.js/compare/v11.10.3...v11.10.4) (2026-12-01)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **address:** hash the parsed address in getChecksumAddress() ([#1773](https://github.com/starknet-io/starknet.js/issues/1773)) ([90bf72c](https://github.com/starknet-io/starknet.js/commit/90bf72c391b5bdeb4b004493103b6a24b231daf7))
|
|
6
|
+
|
|
7
|
+
## [11.10.3](https://github.com/starknet-io/starknet.js/compare/v11.10.2...v11.10.3) (2026-12-01)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **num:** keep 4 bytes in stringToSha256ToArrayBuff4 when the top byte is zero ([#1770](https://github.com/starknet-io/starknet.js/issues/1770)) ([f1327cd](https://github.com/starknet-io/starknet.js/commit/f1327cdc470c5f585dad1ad075089fca9cf78a40))
|
|
12
|
+
|
|
1
13
|
## [11.10.2](https://github.com/starknet-io/starknet.js/compare/v11.10.1...v11.10.2) (2026-11-30)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/dist/index.global.js
CHANGED
|
@@ -3170,7 +3170,7 @@ ${indent}}` : "}";
|
|
|
3170
3170
|
function stringToSha256ToArrayBuff4(str) {
|
|
3171
3171
|
const int312 = (n) => Number(n & MASK_31);
|
|
3172
3172
|
const result = int312(BigInt(addHexPrefix(buf2hex(sha256(utf8ToBytes(str))))));
|
|
3173
|
-
return hexToBytes3(toHex(result));
|
|
3173
|
+
return hexToBytes3(addHexPrefix(removeHexPrefix(toHex(result)).padStart(8, "0")));
|
|
3174
3174
|
}
|
|
3175
3175
|
function isEmptyHex(value) {
|
|
3176
3176
|
return isString(value) && /^0x$/i.test(value);
|
|
@@ -24611,8 +24611,9 @@ ${indent}}` : "}";
|
|
|
24611
24611
|
return result;
|
|
24612
24612
|
}
|
|
24613
24613
|
function getChecksumAddress(address) {
|
|
24614
|
-
const
|
|
24615
|
-
const
|
|
24614
|
+
const parsedAddress = validateAndParseAddress(address);
|
|
24615
|
+
const chars = removeHexPrefix(parsedAddress).toLowerCase().split("");
|
|
24616
|
+
const hex = removeHexPrefix(keccakBn(parsedAddress));
|
|
24616
24617
|
const hashed = hexToBytes2(hex.padStart(64, "0"));
|
|
24617
24618
|
for (let i = 0; i < chars.length; i += 2) {
|
|
24618
24619
|
if (hashed[i >> 1] >> 4 >= 8) {
|