Skip to content

Commit a4e4911

Browse files
authored
chore(extensions): migrate to @signinwithethereum/siwe (x402-foundation#1917)
* Migrate to @signinwithethereum/siwe Migrate the SIWE dependency to the Ethereum Identity Foundation package. package.json now depends on @signinwithethereum/siwe; evm.ts import was updated to import SiweMessage from the new package. Added a changeset describing the migration. (pnpm lock updated to reflect the dependency change.) * Add siwe v4.1.0 entries to pnpm-lock Update examples/typescript/pnpm-lock.yaml to add @signinwithethereum/siwe@4.1.0 and @signinwithethereum/siwe-parser@4.1.0. Adds package resolutions and snapshot entries, registers peerDependencies (ethers and viem marked optional), and removes the older siwe@2.3.2 entry in the importer. This pins the example project to the siwe v4 parser/runtime and records its dependency graph in the lockfile.
1 parent 5033781 commit a4e4911

5 files changed

Lines changed: 78 additions & 66 deletions

File tree

examples/typescript/pnpm-lock.yaml

Lines changed: 29 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@x402/extensions': patch
3+
---
4+
5+
Migrate SIWE dependency from `siwe` (Spruce) to `@signinwithethereum/siwe` (Ethereum Identity Foundation). The new package is the official successor, supports viem natively as a peer dependency, and maintains the same `SiweMessage` API.

typescript/packages/extensions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@x402/core": "workspace:~",
4949
"ajv": "^8.17.1",
5050
"jose": "^5.9.6",
51-
"siwe": "^2.3.2",
51+
"@signinwithethereum/siwe": "^4.1.0",
5252
"tweetnacl": "^1.0.3",
5353
"viem": "^2.43.5",
5454
"zod": "^3.24.2"

typescript/packages/extensions/src/sign-in-with-x/evm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import { verifyMessage } from "viem";
9-
import { SiweMessage } from "siwe";
9+
import { SiweMessage } from "@signinwithethereum/siwe";
1010
import type { EVMMessageVerifier } from "./types";
1111
import type { CompleteSIWxInfo } from "./client";
1212
import type { SIWxSigner } from "./sign";

typescript/pnpm-lock.yaml

Lines changed: 42 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)