feat: support strium login#47
Open
impelcrypto wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Strium login support by introducing a new raw-digest signing utility and wiring a new RPC method (wallet_signRawDigest) through the SDK’s request handling and public exports.
Changes:
- Added public utility
requestSignRawDigest(root export +@startale/app-sdk/raw-digest-signsubpath) with digest-length validation and tests. - Extended signer/request utilities to recognize and route
wallet_signRawDigest, plus updated SDK unit tests. - Updated the test app to expose
wallet_signRawDigestas a selectable RPC method with example inputs.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/app-sdk/src/sign/app-sdk/utils.ts | Treats wallet_signRawDigest like personal_sign for sender extraction/injection. |
| packages/app-sdk/src/sign/app-sdk/utils.test.ts | Adds unit coverage for sender handling with wallet_signRawDigest. |
| packages/app-sdk/src/sign/app-sdk/Signer.ts | Routes wallet_signRawDigest requests to the popup. |
| packages/app-sdk/src/sign/app-sdk/Signer.test.ts | Adds coverage to ensure wallet_signRawDigest is routed to the popup. |
| packages/app-sdk/src/interface/public-utilities/raw-digest-sign/index.ts | New public utility to request raw digest signing with digest validation. |
| packages/app-sdk/src/interface/public-utilities/raw-digest-sign/index.test.ts | Tests forwarding behavior and digest validation failures. |
| packages/app-sdk/src/index.ts | Exposes requestSignRawDigest + its type from the package root. |
| packages/app-sdk/src/browser-entry.ts | Exposes requestSignRawDigest + its type in the browser entry exports. |
| packages/app-sdk/package.json | Adds ./raw-digest-sign export subpath. |
| examples/testapp/src/components/RpcMethods/shortcut/signMessageShortcuts.ts | Adds example shortcut data for wallet_signRawDigest. |
| examples/testapp/src/components/RpcMethods/method/signMessageMethods.ts | Adds wallet_signRawDigest to testapp RPC method list and formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
269
to
273
| case 'eth_ecRecover': | ||
| case 'personal_sign': | ||
| case 'wallet_sign': | ||
| case 'wallet_signRawDigest': | ||
| case 'personal_ecRecover': |
Comment on lines
+35
to
+39
| "./raw-digest-sign": { | ||
| "types": "./dist/interface/public-utilities/raw-digest-sign/index.d.ts", | ||
| "import": "./dist/interface/public-utilities/raw-digest-sign/index.js", | ||
| "require": "./dist/interface/public-utilities/raw-digest-sign/index.js" | ||
| }, |
bobo-k2
reviewed
Jun 16, 2026
|
|
||
| const walletSignRawDigestShortcuts: ShortcutType[] = [ | ||
| { | ||
| key: 'Example digest', |
Collaborator
| * signing externally-computed digests such as Substrate extrinsic payloads | ||
| * for ethereum-type (AccountId20) chains. | ||
| */ | ||
| const requestSignRawDigestFn = async ({ |
Collaborator
There was a problem hiding this comment.
Do export requestSignRawDigest and remove the last line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds Strium support to the SDK by exposing a new raw-digest signing capability. After merging this PR, Users can connect to the Strium app with Startale App.
What changed
requestSignRawDigest(exported from the package root and as a./raw-digest-signsubpath). It asks the popup wallet to raw-sign a 32-byte digest with the user's embedded EOA — plain secp256k1 ECDSA over the exact bytes.How did you test your changes?