Add message signing to manager#753
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces message signing functionality and integrates support for a new Arbitrum Sepolia network in the demo dapp. The changes include new types and endpoints for message signing, removal of the no‐longer-needed EnvelopeStatus type, and updates to both the core wallet and database modules to support the new feature.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/wallet/wdk/src/sequence/types/transaction-request.ts | Removed the EnvelopeStatus type no longer required by the updated message signing feature |
| packages/wallet/wdk/src/sequence/types/signature-request.ts | Added a new SignMessage action in the action-to-payload mapping and Actions object |
| packages/wallet/wdk/src/sequence/types/message-request.ts | Introduced new types for handling message signing requests and responses |
| packages/wallet/wdk/src/sequence/types/index.ts | Updated exports to include the new message types and re-arranged type exports accordingly |
| packages/wallet/wdk/src/sequence/messages.ts | Added a new module to handle the complete lifecycle of message signing requests |
| packages/wallet/wdk/src/sequence/manager.ts | Integrated new message signing endpoints and updated module initialization |
| packages/wallet/wdk/src/dbs/messages.ts | Created a new database module to store message signing data |
| packages/wallet/wdk/src/dbs/index.ts | Exported the new messages DB module |
| packages/wallet/primitives/src/network.ts | Added Arbitrum Sepolia network configuration to the supported networks |
| packages/wallet/core/src/wallet.ts | Enhanced the Wallet class with methods to prepare and build message signatures |
Comments suppressed due to low confidence (1)
packages/wallet/wdk/src/sequence/types/transaction-request.ts:18
- Removal of the EnvelopeStatus type could impact other parts of the system that depend on it; please double-check that all affected modules have been updated to use the new message status types.
export type EnvelopeStatus = 'requested' | 'defined' | 'formed' | 'relayed'
|
Switched this PR to draft as signing flow is incorrect, signatures are not validating. |
|
Ready now @Agusx1211 |
There was a problem hiding this comment.
Pull Request Overview
Adds end-to-end message signing support (ERC-191 & ERC-712) to the Wallet & Manager, integrates off-chain ERC-6492 validation, expands network configs, and bumps default contract addresses.
- Introduce
Messagesmodule in WDK for request/complete flows and persistence - Extend
ManagerAPI and DB schema to handle message signing alongside transactions - Update primitives to wrap chained signatures with ERC-6492 and validate them off-chain
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/wallet/wdk/src/sequence/messages.ts | Introduces Messages service with request, complete, listeners |
| packages/wallet/wdk/src/sequence/manager.ts | Extends Manager with message signing API & database hooks |
| packages/wallet/wdk/src/dbs/messages.ts | Adds Messages IndexedDB store |
| packages/wallet/wdk/src/sequence/types/message-request.ts | Defines MessageRequest, MessageRequested, MessageSigned |
| packages/wallet/wdk/src/sequence/types/signature-request.ts | Adds SignMessage action in signature mapping |
| packages/wallet/wdk/src/sequence/types/index.ts | Re-exports new message types and reorders transaction exports |
| packages/wallet/wdk/test/wdk.test.ts | Removes placeholder test (coverage needed) |
| packages/wallet/primitives/src/signature.ts | Fixes ERC-6492 suffix wrapping in encodeSignature |
| packages/wallet/primitives/src/erc-6492.ts | Implements off-chain ERC-6492 isValid helper |
| packages/wallet/primitives/src/network.ts | Adds Arbitrum Sepolia to network list |
| packages/wallet/primitives/src/constants.ts | Updates default contract addresses to ERC-1271-patched versions |
Comments suppressed due to low confidence (3)
packages/wallet/wdk/test/wdk.test.ts:1
- The placeholder WDK test file was removed without adding any new tests for the message signing flows; consider adding unit/integration tests for
Messages.request,Messages.complete, and listener methods.
import { describe, it, expect } from 'vitest'
packages/wallet/wdk/src/sequence/types/transaction-request.ts:18
- Removed
EnvelopeStatusis a breaking change to the public types; ensure consumers are updated or provide a deprecation path if external code relied on this type.
export type EnvelopeStatus = 'requested' | 'defined' | 'formed' | 'relayed'
packages/wallet/wdk/src/sequence/manager.ts:500
- [nitpick] Method name
completedMessageSignatureis inconsistent withrequestMessageSignatureanddeleteMessageRequest; consider renaming tocompleteMessageSignaturefor verb consistency.
public async completedMessageSignature(messageOrSignatureId: string) {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.