Skip to content

chore: Migrate SIWE dependency to @signinwithethereum/siwe v4 - #10049

Draft
OGPoyraz wants to merge 1 commit into
mainfrom
update-siwe-dependencies-3
Draft

chore: Migrate SIWE dependency to @signinwithethereum/siwe v4#10049
OGPoyraz wants to merge 1 commit into
mainfrom
update-siwe-dependencies-3

Conversation

@OGPoyraz

@OGPoyraz OGPoyraz commented Sep 1, 2026

Copy link
Copy Markdown
Member

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-parser v2.1.0 — used by @metamask/controller-utils to detect and parse SIWE messages via detectSIWE()
  • siwe v2.3.2 — used by @metamask/profile-sync-controller to construct SIWE login messages via new SiweMessage({...}).prepareMessage()

The Spruce siwe package is no longer actively maintained.

Stewardship of the SIWE standard has moved to the Ethereum Identity Foundation. @signinwithethereum/siwe is the official successor TypeScript implementation.

What this PR does

Swaps the abandoned packages for the actively maintained successors. The ParsedMessage and SiweMessage class 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.0 declares "type": "module" but only ships a single unconditional .d.ts (no separate .d.cts). Under this repo's Node16 module resolution, TypeScript infers the shared .d.ts as ESM-only, causing a TS1479 error when controller-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.

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).
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​signinwithethereum/​siwe-parser@​4.2.01001009484100
Added@​signinwithethereum/​siwe@​4.2.01001009885100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant