Skip to content

feat: support strium login#47

Open
impelcrypto wants to merge 3 commits into
masterfrom
feat/support-strium-login
Open

feat: support strium login#47
impelcrypto wants to merge 3 commits into
masterfrom
feat/support-strium-login

Conversation

@impelcrypto

Copy link
Copy Markdown
Contributor

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

  • New public utility requestSignRawDigest (exported from the package root and as a ./raw-digest-sign subpath). 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.
  • Bumped the package version.

How did you test your changes?

  • Tested on the Strium app

@impelcrypto impelcrypto added enhancement New feature or request e2e-test Trigger E2E tests labels Jun 12, 2026
@impelcrypto impelcrypto changed the title Feat/support strium login feat: support strium login Jun 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-sign subpath) 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_signRawDigest as 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"
},

const walletSignRawDigestShortcuts: ShortcutType[] = [
{
key: 'Example digest',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting error when using Example digest. I am running local Startale app from branch feat/support-strium-login

Image

* signing externally-computed digests such as Substrate extrinsic payloads
* for ethereum-type (AccountId20) chains.
*/
const requestSignRawDigestFn = async ({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do export requestSignRawDigest and remove the last line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e-test Trigger E2E tests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants