Difficulty: Intermediate
Type: Feature
Recommended labels (if available in this repo): enhancement, auth, sdk
Background
The roadmap notes a planned 'SIWE (Sign-In with Ethereum) signature helper.' guildpass-integrations already implements SIWE (EIP-4361) admin authentication client-side, but duplicates message construction logic locally instead of using a shared SDK helper.
Problem
There is no shared, tested SIWE message-building utility in the SDK, so each consumer (dashboard, mobile) has to hand-roll EIP-4361 message formatting, risking inconsistent or malformed messages across apps.
Expected Outcome
A createSiweMessage(params) helper in the SDK that builds a spec-compliant EIP-4361 message string given domain, address, statement, uri, version, chainId, and nonce.
Suggested Implementation
Add a new src/auth/siwe.ts module (or extend src/eip712/ if preferred, though SIWE is a plain-text message spec, not EIP-712 typed data) implementing message construction per EIP-4361's field ordering and formatting rules. Keep signature verification out of scope for this issue — this is message construction only.
Acceptance Criteria
createSiweMessage() produces output matching the EIP-4361 message format exactly (field order and formatting)
- Function is fully typed with a
SiweMessageParams interface
- Unit tests cover required fields, optional fields (statement, resources), and nonce inclusion
pnpm test:run and pnpm typecheck pass
Likely Affected Files/Directories
src/auth/siwe.ts
src/eip712/eip712.types.ts
Difficulty: Intermediate
Type: Feature
Recommended labels (if available in this repo):
enhancement,auth,sdkBackground
The roadmap notes a planned 'SIWE (Sign-In with Ethereum) signature helper.'
guildpass-integrationsalready implements SIWE (EIP-4361) admin authentication client-side, but duplicates message construction logic locally instead of using a shared SDK helper.Problem
There is no shared, tested SIWE message-building utility in the SDK, so each consumer (dashboard, mobile) has to hand-roll EIP-4361 message formatting, risking inconsistent or malformed messages across apps.
Expected Outcome
A
createSiweMessage(params)helper in the SDK that builds a spec-compliant EIP-4361 message string given domain, address, statement, uri, version, chainId, and nonce.Suggested Implementation
Add a new
src/auth/siwe.tsmodule (or extendsrc/eip712/if preferred, though SIWE is a plain-text message spec, not EIP-712 typed data) implementing message construction per EIP-4361's field ordering and formatting rules. Keep signature verification out of scope for this issue — this is message construction only.Acceptance Criteria
createSiweMessage()produces output matching the EIP-4361 message format exactly (field order and formatting)SiweMessageParamsinterfacepnpm test:runandpnpm typecheckpassLikely Affected Files/Directories
src/auth/siwe.tssrc/eip712/eip712.types.ts