feat(wallets): add Import Wallet wizard#259
Merged
Merged
Conversation
Adds an Import Wallet entry point alongside New Wallet with a single-page
wizard covering four sources: another multisig instance (deep link or
root URL + signer picker, with CIP-30 nonce-sign against the origin),
Summon (forwards into the existing /wallets/invite flow), manual
native-script CBOR paste, and JSON backup upload. Wires up a paired
Download JSON backup action on the wallet info page so users can
round-trip exports between instances.
Backend: new wallet.importWallet/exportWallet tRPC procedures sharing
the wallet.createWallet write path, plus /api/v1/exportWallet/{getNonce,
redeem,listMine} cross-instance endpoints that reuse the existing CIP-8
checkSignature verification. No Prisma schema change — provenance lives
in the existing rawImportBodies JSON, with a lockedSigners flag the
wallet info Edit Signers gate respects so imported wallets can't
silently diverge from their origin.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The audit observability module hasn't landed on preprod yet, so the audit() call I copied from other procedures in main's version of this file was unresolved at build time. Drop it for now; can be re-added once main's observability work merges into preprod. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
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
/wallets/inviteflow), manual native-script CBOR paste, and JSON backup upload.wallet.importWallet/wallet.exportWallettRPC procedures sharing the existingwallet.createWalletwrite path, plus/api/v1/exportWallet/{getNonce,redeem,listMine}cross-instance endpoints that reuse the CIP-8checkSignatureverification.rawImportBodiesJSON (no schema migration); alockedSignersflag gates the wallet info Edit-Signers UI so imported wallets can't silently diverge from their origin.Test plan
/walletsshows the newImport Walletbutton next toNew Wallet/wallets/import-walletrenders the 3-step wizard (Source → Review → Ready) before a wallet is connected (added topublicRoutes)Selectdropdown; desktop: 4-column tab bar/wallets/invite/<id>(uses the existing/api/v1/import/summonbackend)Download JSON backupon a wallet, log in as another signer, upload the file → import succeeds; confirm hand-edited JSON is rejected with "Payload hash mismatch"POST /api/v1/exportWallet/redeemwith wrong wallet id returns 401;GET /api/v1/exportWallet/getNoncewith non-signer address returns 403lockedSignersgate)npm run typecheckclean (pre-existing errors inaudit.ts/users.tsare unrelated)npx prisma migrate statusreports no pending migrations🤖 Generated with Claude Code