feat: migrate coordinator frontend from REST API to PSM SDK#24
Merged
WiktorStarczewski merged 16 commits intomainfrom Feb 12, 2026
Merged
feat: migrate coordinator frontend from REST API to PSM SDK#24WiktorStarczewski merged 16 commits intomainfrom
WiktorStarczewski merged 16 commits intomainfrom
Conversation
Dominik1999
approved these changes
Feb 12, 2026
Collaborator
Dominik1999
left a comment
There was a problem hiding this comment.
This PR is a bit too big to review. We can merge it and I will test the features.
Switch from @demox-labs/miden-sdk v0.12 to @miden-sdk/miden-sdk v0.13. Add @openzeppelin/miden-multisig-client, psm-client, Para wallet SDKs, and @tanstack/react-query. Add PSM config, WASM copy paths, and Para module stubs in next.config.mjs.
Port initClient, multisigApi, helpers, errors, and procedures from the PSM example app. Add wallet type definitions (WalletSource, ExternalWalletState), PSM type definitions (SignerInfo), and hooks for Para wallet session and Miden Wallet adapter integration.
Create MultisigContext as the central state manager replacing the coordinator API layer. Manages WebClient, MultisigClient, signer keys, proposals, wallet source selection, and all PSM operations. Update Providers with ParaProvider, QueryClientProvider, and MultisigProvider tree.
Replace coordinator REST API calls with MultisigClient SDK operations across all dashboard pages, login flows, and transaction interactions. Use proposals from context instead of coordinator transactions. Switch account ID format from bech32 to hex.
Delete coordinator services (walletApi, transactionApi, signatureApi), old contexts (MidenClientContext), old hooks (useMidenSdk, useWalletData, useFungibleAssets), unused components (ConnectWalletModal, WalletInfo, DynamicWalletButton, etc.), and old type files. Simplify Redux store to only wallet form slice. Remove transactionSlice, signatureSlice, and walletStatsSlice.
Add AppHeader component showing wallet source selector, signer keys popover, and PSM endpoint status/editor. Rendered globally via Providers so it appears on login and dashboard pages. Auto-switches wallet source when Para or Miden Wallet connects.
- Signer 1 is now read-only and shows the active wallet's commitment - Other signers (2+) are added manually via commitment input - Persist account ID in cookie after create/load for middleware auth - Review step highlights Signer 1 with wallet source label
Return null from Providers before mount instead of rendering children without MultisigProvider, which caused a runtime error when dashboard components called useMultisig() during initial hydration.
- Auto-load account from localStorage after client initialization so dashboard shows correct signers/threshold on refresh - Call syncAll() after account creation to populate detectedConfig
Persist local Falcon/ECDSA keys in a separate IndexedDB (MultisigSignerKeys) so they survive page reloads without being cleared by clearMidenDatabase(). Normalize all signer commitments to 0x-prefixed lowercase hex to match the format the PSM server derives during signature verification, preventing 401 rejections from format mismatches.
3e179db to
ddcc27c
Compare
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
Migrates the coordinator frontend from the coordinator REST API layer to the PSM (Private State Manager) SDK, replacing all server-mediated multisig operations with direct client-side interactions via @openzeppelin/miden-multisig-client.
proposals, wallet connections, and all PSM operations
from the global header
survives clearMidenDatabase(), with commitment normalization to prevent PSM 401 rejections
string; proposal type lives at proposal.metadata.proposalType, not proposal.type
Changes
Architecture
errors.ts, procedures.ts
Dependency updates
Deleted
WalletTransaction)
Bug fixes
proposals
Test plan