From a4f5cab53c047c2c43d02a7803e02cf55eb8f19d Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 05:22:30 -0800 Subject: [PATCH] feat: add xprv import for existing HD wallets Add support for importing existing wallets using an extended private key (xprv) instead of a mnemonic phrase. This creates an HD wallet that can derive multiple addresses, just like mnemonic-based wallets. - Add hdWalletFromXprv() and isValidXprv() to wallet.js - Add xprv type handling in getSignerForAddress() - Create importXprv.js view with full validation and password flow - Add import-xprv HTML view to index.html - Wire up navigation from add-wallet view - Enable +address button for xprv wallets in home view Closes #20 --- src/popup/index.html | 58 +++++++++++++++++++ src/popup/index.js | 3 + src/popup/views/addWallet.js | 5 ++ src/popup/views/home.js | 2 +- src/popup/views/importXprv.js | 106 ++++++++++++++++++++++++++++++++++ src/shared/wallet.js | 25 ++++++++ 6 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 src/popup/views/importXprv.js diff --git a/src/popup/index.html b/src/popup/index.html index 74dfb69..c21f971 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -119,6 +119,15 @@ Import private key +
+ Have an extended private key (xprv)? + +
@@ -170,6 +179,55 @@ + + +