A minimal Next.js application that connects to the BSV Desktop Wallet and displays all available information including keys, addresses, and network details.
- Simple Interface: Connect/Disconnect button + "Fetch All Data" button
- Clean & Modern UI: Built with Next.js, React, and Tailwind CSS
- BSV SDK Integration: Uses
@bsv/sdkWalletClient for wallet interaction - Real-time Display:
- Identity Key
- Multiple Public Keys (Identity, Payment, Data keys)
- Derived Keys with different protocols
- Network information (mainnet/testnet)
- Complete list of available wallet methods
- TypeScript: Full type safety with BSV SDK types
- Node.js 18+ installed
- BSV Desktop Wallet installed and running
- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
npm run build
npm start- Make sure BSV Desktop Wallet is installed and running
- Open the application in your browser
- Click "Connect Wallet" button - this will automatically fetch the identity key
- Approve the connection in the BSV Desktop Wallet popup if prompted
- Click "Fetch All Data" button to retrieve additional keys and information
- View all your wallet information displayed on the page:
- Identity Key
- Payment and Data keys
- Derived keys
- Network information
- Available wallet methods
- Click "Disconnect Wallet" when done
├── app/
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Tailwind v4 styles
├── components/
│ └── WalletConnector.tsx # Main wallet component
├── hooks/
│ └── useWallet.ts # Wallet connection hook
├── package.json
├── tsconfig.json
├── postcss.config.mjs
└── next.config.js
- Next.js 16 - React framework
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS v4 - Modern CSS framework
- @bsv/sdk - BSV blockchain SDK for wallet integration
- WalletClient - BSV SDK wallet client for key derivation and management
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
MIT