chore: Migrate SIWE dependency to @signinwithethereum/siwe v4 - #10049
Draft
OGPoyraz wants to merge 1 commit into
Draft
chore: Migrate SIWE dependency to @signinwithethereum/siwe v4#10049OGPoyraz wants to merge 1 commit into
OGPoyraz wants to merge 1 commit into
Conversation
Swap SpruceID-maintained SIWE packages for the @signinwithethereum scoped packages and update usages. Update package.json dependencies and imports (controller-utils: siwe.ts, siwe.test.ts; profile-sync-controller: flow-siwe.ts) and add changelog notes describing the migration. Uses @signinwithethereum/siwe-parser and @signinwithethereum/siwe ^4.2.0 - maintained by the Ethereum Identity Foundation and backward-compatible (parser v4.2.0 relaxes EIP-55 checksum enforcement and surfaces non-fatal warnings).
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproduction of #8497 on a same-repo branch (not a fork) to verify CI, specifically to confirm the TS1479 build failure and rule out fork-only changelog-check failures.
Explanation
Current state
The monorepo depends on two SIWE (Sign-In With Ethereum / EIP-4361) packages originally maintained by Spruce:
@spruceid/siwe-parserv2.1.0 — used by@metamask/controller-utilsto detect and parse SIWE messages viadetectSIWE()siwev2.3.2 — used by@metamask/profile-sync-controllerto construct SIWE login messages vianew SiweMessage({...}).prepareMessage()The Spruce
siwepackage is no longer actively maintained.Stewardship of the SIWE standard has moved to the Ethereum Identity Foundation.
@signinwithethereum/siweis the official successor TypeScript implementation.What this PR does
Swaps the abandoned packages for the actively maintained successors. The
ParsedMessageandSiweMessageclass APIs are identical - same constructors, same fields, same methods. This is purely a dependency swap with import path updates.Known issue (reproduced here)
@signinwithethereum/siwe-parser@4.2.0declares"type": "module"but only ships a single unconditional.d.ts(no separate.d.cts). Under this repo'sNode16module resolution, TypeScript infers the shared.d.tsas ESM-only, causing a TS1479 error whencontroller-utils(a CJS package) imports it. This reproduction branch is to confirm that failure in CI independent of the fork-related changelog-check issues seen on #8497.Draft PR — not intended to merge.