A secure and feature-rich Bitcoin wallet application built with Go. While originally designed to support payment for subscriptions in the HORNETS Nostr Relay ecosystem, it can be used as a standalone Bitcoin wallet. Use it via terminal, the HORNETS Relay Panel, or the Nestr client.
- Create new wallets or import existing ones
- Secure storage of wallet data
- Support for mainnet
- Transaction creation and signing
- Balance checking
- Address generation and management
- RBF (Replace-By-Fee) support
- Integration with Neutrino for lightweight node functionality
- JWT-based API authentication
- Go 1.16 or higher
-
Clone the repository:
git clone https://github.com/HORNET-Storage/Super-Neutrino-Wallet.git cd Super-Neutrino-wallet
-
Install dependencies:
go mod download
You can build the Super Neutrino Wallet using the provided build.sh
script:
-
Make the script executable:
chmod +x build.sh
-
Run the build script:
./build.sh
This will create an executable named SN-wallet
in your current directory.
To start the Super Neutrino Wallet application, simply run:
./SN-wallet
You will be presented with the following options:
Bitcoin Wallet Manager
1. Create a new wallet
2. Import an existing wallet
3. Login to an existing wallet
4. Delete a wallet
5. Exit
Enter your choice (1, 2, 3, 4, or 5):
Navigate through the application by entering the number corresponding to your desired action:
-
Create a new wallet: Set up a brand new Bitcoin wallet. You'll be guided through the process of generating a new seed phrase and securing your wallet.
-
Import an existing wallet: Restore a wallet using an existing seed phrase. Use this option if you're moving your wallet to a new device or restoring from a backup.
-
Login to an existing wallet: Access a wallet you've previously created or imported on this device.
-
Delete a wallet: Select and permanently delete a wallet from the device. Caution: Deleting a wallet will remove its data from the device, but this action does not delete the wallet from the Bitcoin network. Ensure you have securely backed up the seed phrase before proceeding, as deleting without a backup means you permanently lose access to the wallet and any funds within it.
-
Exit: Close the application.
Follow the on-screen prompts for each option. Make sure to securely store any seed phrases or passwords you create or use.
Important Note: First-time blockchain syncing can take considerable time depending on your internet connection, system resources, and connected peers. The wallet needs to sync with the Bitcoin network before it can display accurate balance and transaction information.
The wallet uses a configuration file (config.json
) for various settings.
The config.json
file is automatically generated when you first start the wallet and go through the setup process. After the initial setup:
- Locate the
config.json
file in the root directory of the project. - Open it with a text editor.
- Configure the essential fields as described below.
Required Configuration Fields:
user_pubkey
: Your Nostr public key (same as used in the relay panel)wallet_api_key
: API key from the relay's config.yamlwallet_name
: Must be set to "default" for relay integrationnetwork
: Bitcoin network ("mainnet")api_port
: Port for the API server (default: 9003)
The wallet_api_key
must be obtained from your HORNETS Nostr Relay configuration:
-
Via Relay Panel (Recommended):
- Open your HORNETS Relay Panel
- Navigate to Advanced Settings
- Go to the Wallet section to find your wallet configuration details including the API key
-
Via config.yaml file:
- Locate your relay's config.yaml file
- Find the wallet section:
wallet: key: c3eb99c13ca2a2f93b9fbcdbb0666bd5faf4595bd07a73f358b330eda86da658 name: default url: http://localhost:9003
-
Copy the
key
value and use it as yourwallet_api_key
in the wallet's config.json
The user_pubkey
should be your Nostr public key that you use with:
- The HORNETS Relay Panel
- Your NIP-07 compatible browser extension (like Alby, nos2x, etc.)
To get your public key:
- Use a NIP-07 compatible browser extension
- Your extension provides
window.nostr.getPublicKey()
method - Use the same public key in both the relay panel and this wallet
Complete Configuration Example:
{
"add_peers": [
"bitcoin.aranguren.org:8333",
"bitcoin.bs.ts.net:8333"
],
"address_gap_limit": 20,
"allowed_origin": "http://localhost:3000",
"api_port": 9003,
"backup_interval": "24h",
"backup_path": "./wallet_backup",
"base_dir": "/path/to/your/wallet/directory",
"cert_file": "server.crt",
"dust_limit": 546,
"env": "development",
"fee_per_kb": 1000,
"jwt_keys_dir": "./jwtkeys",
"key_file": "server.key",
"log_level": "debug",
"max_peers": 125,
"min_peers": 3,
"network": "mainnet",
"relay_backend_url": "http://localhost:9002",
"rpc_password": "rpcpassword",
"rpc_server": "127.0.0.1:8332",
"rpc_user": "rpcuser",
"server_mode": true,
"sync_interval": "10m",
"tor_proxy": "127.0.0.1:9050",
"tx_max_size": 100000,
"use_https": false,
"use_tor": false,
"user_pubkey": "your_nostr_public_key_here",
"wallet_api_key": "key_from_relay_config_yaml",
"wallet_db_path": "./dev_wallet.db",
"wallet_dir": "./wallets",
"wallet_name": "default"
}
Important Notes:
- The
wallet_name
MUST be set to "default" for the relay to properly identify the wallet - Ensure the
api_port
matches the port specified in your relay's config.yaml - The
user_pubkey
should be the same public key you use for signing events in the relay panel
- The wallet uses BIP39 for seed phrase generation
- Sensitive data (seed phrases, private keys) are encrypted before storage
- JWT is used for API authentication
Always ensure you're running the latest version of the wallet and keep your system updated.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.