Installation Guide
Get Nillion Keychain up and running in minutes.
For Users
Install from Chrome Web Store
Coming Soon
The extension will be available on the Chrome Web Store soon. For now, please use the development installation method below.
For Developers
Prerequisites
- Node.js: v18 or higher
- npm: v9 or higher
- Chrome/Chromium: Latest version
Development Setup
-
Clone and Install
git clone https://github.com/Lisboaa111/Nillion-Keychain.git
cd nillion-keychain
npm install -
Create Environment File (Optional)
cp .env.example .env -
Start Development Server
# With persistent storage (recommended)
npm run dev
# Or with custom profile
wxt --chrome-profile=.wxt/dev-profile -
Chrome Opens Automatically
- Extension loads automatically
- Changes hot-reload in real-time
- DevTools available for debugging
Project Structure
nillion-keychain/
├── entrypoints/
│ ├── background.ts # Service worker
│ ├── content.ts # Injected script
│ └── popup/
│ ├── App.tsx # Main UI component
│ ├── App.css # Styles
│ └── main.tsx # Entry point
├── utils/
│ └── crypto.ts # Encryption utilities
├── public/ # Static assets
├── wxt.config.ts # Extension configuration
├── package.json
└── tsconfig.json
Available Scripts
# Development with hot reload
npm run dev
# Build for production
npm run build
# Build and create ZIP for distribution
npm run zip
# Type checking
npm run type-check
# Linting
npm run lint
# Format code
npm run format
Development Tips
-
Persistent Storage in Dev Mode
# Add to package.json
"dev": "wxt --chrome-profile=.wxt/dev-profile" -
Debug Background Script
- Go to
chrome://extensions - Click "Inspect views: service worker"
- Console logs appear in DevTools
- Go to
-
Debug Popup
- Right-click extension icon
- Select "Inspect popup"
- DevTools opens for popup
-
Debug Content Script
- Open any webpage
- Open DevTools (F12)
- Check console for injected script logs
-
Clear Extension Data
// Run in extension console
chrome.storage.local.clear();
chrome.storage.session.clear();
Troubleshooting
Extension Not Loading
Problem: Extension doesn't appear after loading unpacked
Solutions:
- Ensure you selected the
.output/chrome-mv3folder, not the project root - Check for build errors:
npm run build - Try removing and re-adding the extension
- Restart Chrome
Build Errors
Problem: npm run build fails
Solutions:
# Clear node modules and reinstall
rm -rf node_modules package-lock.json
npm install
# Clear build cache
rm -rf .output .wxt
# Try building again
npm run build
Hot Reload Not Working
Problem: Changes don't reflect in browser
Solutions:
- Stop dev server and restart
- Manually reload extension in
chrome://extensions - Clear browser cache
- Check terminal for build errors
Storage Not Persisting in Dev
Problem: Wallet resets on dev server restart
Solution: Use persistent Chrome profile
wxt --chrome-profile=.wxt/dev-profile