starknet 10.7.3 → 10.7.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 +6 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.global.js +9 -3
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [10.7.4](https://github.com/starknet-io/starknet.js/compare/v10.7.3...v10.7.4) (2026-09-08)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **typedData:** reject caller types that shadow SNIP-12 preset names ([3f06927](https://github.com/starknet-io/starknet.js/commit/3f06927e1b1325df657c8056539cff84144d729c))
|
|
6
|
+
|
|
1
7
|
## [10.7.3](https://github.com/starknet-io/starknet.js/compare/v10.7.2...v10.7.3) (2026-09-08)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -8463,7 +8463,9 @@ interface Context {
|
|
|
8463
8463
|
key?: string;
|
|
8464
8464
|
}
|
|
8465
8465
|
/**
|
|
8466
|
-
* Validates that `data` matches the EIP-712 JSON schema
|
|
8466
|
+
* Validates that `data` matches the EIP-712 JSON schema, and that it does not redefine any
|
|
8467
|
+
* of the active revision's preset type names (SNIP-12 reserves those names and requires such
|
|
8468
|
+
* a request to be rejected).
|
|
8467
8469
|
*/
|
|
8468
8470
|
declare function validateTypedData(data: unknown): data is TypedData;
|
|
8469
8471
|
/**
|
package/dist/index.global.js
CHANGED
|
@@ -13814,9 +13814,15 @@ ${indent}}` : "}";
|
|
|
13814
13814
|
}
|
|
13815
13815
|
function validateTypedData(data) {
|
|
13816
13816
|
const typedData = data;
|
|
13817
|
-
|
|
13818
|
-
|
|
13819
|
-
|
|
13817
|
+
if (!(typedData.message && typedData.primaryType && typedData.types)) {
|
|
13818
|
+
return false;
|
|
13819
|
+
}
|
|
13820
|
+
const revision = identifyRevision(typedData);
|
|
13821
|
+
if (!revision) {
|
|
13822
|
+
return false;
|
|
13823
|
+
}
|
|
13824
|
+
const presetNames = Object.keys(revisionConfiguration[revision].presetTypes);
|
|
13825
|
+
return Object.keys(typedData.types).every((name) => !presetNames.includes(name));
|
|
13820
13826
|
}
|
|
13821
13827
|
function prepareSelector(selector) {
|
|
13822
13828
|
return isHex2(selector) ? selector : getSelectorFromName(selector);
|