A Next.js application for linking multiple Polkadot accounts together for social recovery purposes.
- Support for multiple wallet providers (Polkadot.js, Talisman, SubWallet, Nova Wallet)
- Connect and authenticate with wallet extensions
- View accounts from the connected wallet
- Multi-select interface to choose which accounts should be recoverable
- Select All / Deselect All functionality
- Configure social recovery settings:
- Add multiple friend/guardian account addresses
- Set recovery threshold (number of friends needed to approve)
- Set refute duration (waiting period in days)
- Input validation for all recovery parameters
- Visual summary of recovery configuration
- Modern, responsive UI built with Tailwind CSS
Before you begin, make sure you have:
- Node.js 18+ installed
- At least one Polkadot wallet extension installed:
- At least one account created in your wallet extension
First, install the dependencies:
pnpm installThen, run the development server:
pnpm devOpen http://localhost:3000 with your browser to see the application.
- Connect Wallet: Choose a wallet provider (Polkadot.js, Talisman, SubWallet, or Nova Wallet) and click to connect
- View All Accounts: Once connected, all your accounts from that wallet will be displayed
- Select Accounts: Check the boxes next to accounts you want to make recoverable
- Use "Select All" to quickly select all accounts
- Use "Deselect All" to clear your selection
- Configure Recovery Settings:
- Friend Account IDs: Add the account addresses of trusted friends who can help recover your account (guardians)
- Recovery Threshold: Set how many friends need to approve a recovery (must be ≤ number of friends)
- Refute Duration: Set the waiting period (in days) before an approved recovery takes effect
- Setup Recovery: Click "Setup Recovery" to configure social recovery for the selected accounts
The selected accounts will be configured for social recovery, allowing them to be recovered through trusted guardians if access is lost.
polkadot-social-account-recovery/
├── app/
│ ├── page.tsx # Main page component
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── components/
│ ├── WalletConnect.tsx # Wallet connection component with multi-wallet support
│ └── SocialRecoverySetup.tsx # Multi-account selection component for recovery setup
├── lib/
│ └── wallets.ts # Wallet configurations and types
└── package.json
- Next.js 15 - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- @polkadot/extension-dapp - Polkadot extension integration
- @polkadot/util - Polkadot utilities
- @polkadot/util-crypto - Cryptographic utilities
To create a production build:
pnpm build
pnpm startMIT