Create Your First Wallet
Guide to creating your first Spark wallet
How to Create a Wallet
Follow these steps to create your wallet:
-
Install the Spark Wallet SDK
If you haven’t installed the SDK yet, do so using npm:
-
Import the Wallet SDK
-
Generate a Mnemonic Phrase
A mnemonic phrase is essential for wallet creation and recovery.
The network of the wallet must be specified at the time of the SDK initiation. Options are mainnet and regtest, where the regtest currently connects to Lightspark’s Regtest network.
-
Create the Wallet
Initialize your wallet with the mnemonic. You can specify whether you want to use Bitcoin Mainnet or Regtest.
Note: If you don’t specify a network, the wallet will default to Bitcoin Mainnet. Always make sure you’re using the correct network for your needs.
Best Practices
- Secure Your Mnemonic: Store your mnemonic phrase in a secure location. It’s the key to your wallet.
- Network Selection: Be careful when selecting your network. Use
REGTEST
for development and testing, andMAINNET
only when you’re ready to handle real funds.
Next Steps
Once your wallet is set up, proceed to Deposit Funds from Bitcoin to top up your wallet.