feat: add message signing for EVM + SPARK network#311
Conversation
- Add Sign Message button in Developer Options (only visible on Rootstock) - Create SignMessage screen with EVM-compatible message signing - Reuse existing signPersonalMessage from BackgroundExecutor - Include signature display and copy-to-clipboard functionality
evalthis
left a comment
There was a problem hiding this comment.
Thank you for your PR!
I think we should enable this for all EVM chains.
Also, could you please create an e2e test for Maestro? That would be awesome!
I don’t think this functionality belongs under Developer Options — it probably should be exposed somewhere else.
What do you think, @lion-dev?
* Enable message signing for all EVM-compatible networks - Extend SignMessage module to support all EVM chains (Rootstock, Botanix, etc.) - Replace Rootstock-specific checks with generic EVM network detection - Update UI text to reflect multi-network support * Show Sign Message button for all EVM networks in Settings * Add signing address display to SignMessage screen - Display the EVM address that will be used for signing - Add copy functionality for the address - Show address field above the message input - Works for all EVM-compatible networks * Update comment to reflect multi-chain EVM support
|
@evalthis done ✅ |
* Add Spark network message signing support - Implement signMessageWithIdentityKey in SparkWallet class - Add signSparkMessage to BackgroundExecutor - Update SignMessage UI to support both EVM and Spark networks - Skip password prompt for Spark (uses unencrypted submnemonics) - Add validation method for signature verification - Update Settings to show Sign Message button for Spark network * Revert .gitignore changes
|
This token management is a masterpiece of corpo engineering. Testing that tests everything except ethics. All the soul of a quarterly earnings report. |
|
The repo is neat, but neat is cheap. I’d rather take messy and alive over clean and dead any day of the week. |
Missed this... Agree! Think we can have a section on the settings called "tools", where we expose some utils, like signing. Ideally the user chooses signing, and the signing interface has a selector of which network to sign from. So it is not dependent on the network currently selected. Thanks, this is looking great! |
|
@lion-dev for context, signing can be used as login/authentication mechanism on 3rd party platforms |
|
When that is the case it needs to be integrated on a specific flow.
|
| async signSparkMessage(message, accountNumber, password) { | ||
| try { | ||
| // Get the submnemonic for the account | ||
| const submnemonic = await SecureStorage.getItem(STORAGE_KEY_SUB_MNEMONIC + accountNumber); |
There was a problem hiding this comment.
BackgroundExecutor.getSubMnemonic(accountNumber)
| async validateMessageWithIdentityKey(message: string | Uint8Array, signature: string | Uint8Array): Promise<boolean> { | ||
| if (!this._sdkWallet) throw new Error('Spark wallet not initialized'); | ||
|
|
||
| const messageBytes = typeof message === 'string' | ||
| ? new TextEncoder().encode(message) | ||
| : message; | ||
|
|
||
| const signatureBytes = typeof signature === 'string' | ||
| ? Buffer.from(signature, 'hex') | ||
| : signature; | ||
|
|
||
| return await this._sdkWallet.validateMessageWithIdentityKey(messageBytes, signatureBytes); | ||
| } |
There was a problem hiding this comment.
its not used so no point in having it, at least for now
|
Great to hear! Layerzwallet will be the first wallet in the world to offer Sign Message for Spark. 🎉 |
|
@evalthis do you think its mergeable after minor refactor? |
Yes, I think it is |



Summary
This PR adds message signing functionality exclusively for the Rootstock network. Users can now cryptographically sign messages to prove ownership of their
Rootstock wallet address without revealing their private key.
Changes
New Features
UI Updates
Technical Details
Implementation
Security
Testing
Manual Testing Checklist