Better node demo#1369
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
|
@SocketSecurity ignore-all |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1369 +/- ##
=======================================
Coverage 74.99% 74.99%
=======================================
Files 184 184
Lines 4519 4519
Branches 1108 1108
=======================================
Hits 3389 3389
Misses 1130 1130 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
|
||
| const validCommands = ['connect']; | ||
| // Define the states our application can be in | ||
| type AppState = 'DISCONNECTED' | 'CONNECTING' | 'CONNECTED' | 'SIGNING'; |
There was a problem hiding this comment.
Minor suggestion: You can use enums to define types, allowing later to use the enum directly instead of hardcoding strings.
| type AppState = 'DISCONNECTED' | 'CONNECTING' | 'CONNECTED' | 'SIGNING'; | |
| enum AppStatus { | |
| DISCONNECTED: "disconnected", | |
| CONNECTING: "connecting", | |
| CONNECTED: "connected", | |
| SIGNING: "signing", | |
| } | |
| type AppState = `${AppStatus}` |
| choices: ['Connect', 'Exit'], | ||
| }, | ||
| ]); | ||
| if (action === 'Connect') { |
There was a problem hiding this comment.
[nit]: qWould also use an enum for actions here



Explanation
Screen.Recording.2025-10-14.at.16.09.38.mov
References
Checklist
Note
Replaces the simple script with an interactive Node.js CLI (inquirer/ora/chalk) that connects via the Multichain SDK, manages session/accounts, signs messages on Ethereum and Solana, and supports disconnect; updates deps and ignores /temp.
playground/multichain-nodeinquirer,ora, andchalk.DISCONNECTED→CONNECTING→CONNECTED→SIGNING.eip155:1andsolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp.wallet_sessionChanged, groups accounts by chain, updates app state.personal_signon Ethereum andsignMessageon Solana; displays signatures; supports disconnect.chalk,inquirer,ora; add@types/inquirer; remove@metamask/sdk./temp.Written by Cursor Bugbot for commit 8197d65. This will update automatically on new commits. Configure here.