Gooti
Nostr Identity Manager & Signer
Gooti is a browser extension for managing multiple Nostr identities and for signing events on web apps without having to give them your keys.
It implements these mandatory NIP-07 methods:
async window.nostr.getPublicKey(): string
async window.nostr.signEvent(event: { created_at: number, kind: number, tags: string[][], content: string }): Event
It also implements these optional methods:
async window.nostr.getRelays(): { [url: string]: {read: boolean, write: boolean} }
async window.nostr.nip04.encrypt(pubkey, plaintext): string
async window.nostr.nip04.decrypt(pubkey, ciphertext): string
async window.nostr.nip44.encrypt(pubkey, plaintext): string
async window.nostr.nip44.decrypt(pubkey, ciphertext): string
The repository is configured as monorepo to hold the extensions for Chrome and Firefox.
Get the Firefox extension here!
Get the Chrome extension here!
Develop Chrome Extension
To build and run the Chrome extension from this code:
git clone https://github.com/sam-hayes-org/gooti-extension
cd gooti-extension
npm ci
npm run build:chrome
then
- within Chrome go to
chrome://extensions - ensure "developer mode" is enabled on the top right
- click on "Load unpackaged"
- select the
dist/chromefolder
Develop Firefox Extension
To build and run the Firefox extension from this code:
git clone https://github.com/sam-hayes-org/gooti-extension
cd gooti-extension
npm ci
npm run build:firefox
then
- within Firefox go to
about://debugging - click "This Firefox" on the left
- click on "Load Temporary Add-on..."
- select the
dist/firefoxfolder
Build Extension Packages
To create installable extension packages, first ensure you have built the extensions:
Chrome Extension Package (.zip)
npm run build:chrome
cd dist/chrome
zip -r gooti-chrome-extension.zip .
Install from package:
- Go to
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked" and select the
dist/chromefolder, OR - Drag and drop the
.zipfile onto the extensions page
Firefox Extension Package (.xpi)
npm run build:firefox
cd dist/firefox
zip -r gooti-firefox-extension.xpi .
Install from package:
- Go to
about:addons - Click the gear icon and select "Install Add-on From File..."
- Select the
.xpifile
Note: Firefox may require the extension to be signed for permanent installation. For development and testing, use the temporary installation method described above.
Testing the Extension
Development Mode with Live Reload
For active development with automatic rebuilding:
Chrome:
npm run watch:chrome
Firefox:
npm run watch:firefox
This will automatically rebuild the extension when you make changes to the source code.
Manual Testing Steps
Once the extension is loaded in your browser:
1. Initial Setup
- Click the Gooti extension icon in your browser toolbar
- Create a new vault or import an existing one
- Create or import a Nostr identity
2. Test Relay Management
- Navigate to an identity's relay settings
- Test adding relays with different formats:
relay.example.com(should auto-addwss://prefix)ws://relay.example.com(should preservews://prefix)wss://relay.example.com(should preservewss://prefix)- URLs without trailing slash (should auto-add
/)
- Verify that the input field updates to show the complete URL after adding
- Test read/write permissions for relays
- Test removing relays
3. Test NIP-07 Integration
Visit a Nostr web application (like Snort or Iris) and test:
-
Public Key Access:
- The app should be able to request your public key
- Gooti should prompt for permission
- Verify the correct public key is returned
-
Event Signing:
- Try posting a note or performing actions that require signing
- Gooti should prompt to sign events
- Verify events are properly signed
-
Relay Information:
- Apps should be able to access your relay list
- Verify the correct relays are returned with proper read/write flags
-
Encryption/Decryption (NIP-04 & NIP-44):
- Test direct messaging features
- Verify encryption and decryption work properly
4. Test Identity Management
- Create multiple identities
- Switch between identities
- Test that each identity has its own relay configuration
- Test identity export/import functionality
5. Test Vault Security
- Lock the vault and verify it requires password to unlock
- Test vault backup and restore
- Verify that sensitive data is properly encrypted
Automated Testing
Run the test suite:
npm test
Run linting:
npm run lint
Browser-Specific Testing
Chrome-specific features:
- Test extension popup behavior
- Verify manifest v3 compatibility
- Test service worker functionality
Firefox-specific features:
- Test extension sidebar (if applicable)
- Verify manifest v2 compatibility
- Test background script functionality
Performance Testing
- Test with multiple identities (10+)
- Test with many relays per identity (20+)
- Monitor memory usage during extended use
- Test extension startup time
Security Testing
- Verify that private keys are never exposed to web pages
- Test that permissions are properly requested and enforced
- Verify that vault encryption is working correctly
- Test that the extension works properly in incognito/private browsing mode
LICENSE: Public Domain