Connect headless wallet to testnet
Goal
This article will guide you to connect Hathor headless wallet to testnet.
Requirement
Hathor headless wallet v0.26.0
Step-by-step
- Configure headless wallet to connect to testnet.
- Obtain HTR tokens on testnet.
Step 1: configure headless wallet to connect to testnet
- Source code
- Docker container
- Docker compose
If you installed your headless wallet from source code, follow these substeps:
- Start a shell session.
- Change the working directory to
<absolute_path_headless>/hathor-wallet-headless/srcreplacing the<absolute_path_headless>to where you installed the application. - Open the
config.jsfile. - Set
testnetas the value for thenetworkkey, and'https://node1.testnet.hathor.network/v1a/'as the value for theserverkey:
module.exports = {
...
network: 'testnet',
server: 'https://node1.testnet.hathor.network/v1a/',
...
};
- Restart the application as usual.
Note that your headless wallet will connect to a public full node on testnet. Now, if you want to operate your own full node see Installation of Hathor full node, and set server with your full node's URL.
If you installed your headless wallet as a Docker container, follow these substeps:
- Start a shell session.
- Start the headless wallet as usual, setting
--networkand--serveras follows:
docker run \
-it -p 8000:8000 \
hathornetwork/hathor-wallet-headless \
--seed_default '<24_words_seed_phrase_string>' \
--network testnet \
--server https://node1.testnet.hathor.network/v1a/
Note that your headless wallet will connect to a public full node on testnet. Now, if you want to operate your own full node see Installation of Hathor full node, and set --server with your full node's URL.
If you installed Hathor headless wallet along Hathor full node with Docker compose, follow these substeps:
- Start a shell session.
- Change the working directory to where you installed the applications.
- Open the
docker-compose.ymlfile. - Set the environment variables
HATHOR_TESTNETandHEADLESS_NETWORKtotrue:
services:
hathor-core:
image: <docker_image_id>
...
environment:
- HATHOR_TESTNET=true
...
hathor-wallet-headless:
image: <docker_image_id>
...
environment:
...
- HEADLESS_NETWORK=testnet
...
- Restart the applications as usual.
Step 2: obtain HTR tokens on Testnet
The faucet for Hathor Network's can be accessed at https://faucet.testnet.hathor.network/. You can use this faucet to obtain HTR tokens on testnet for free using your testnet wallet address.
Keep in mind the following resources to connect your wallet to the testnet:
- Fullnode: https://node1.testnet.hathor.network/v1a/
- Tx Mining Server: https://txmining.testnet.hathor.network
- Explorer: https://explorer.testnet.hathor.network
- Explorer-service: https://explorer-service.testnet.hathor.network
Task completed
You now have a running instance of Hathor headless wallet on testnet. For how to operate and use this application, see Hathor headless wallet pathway.