Currently there are three ways to integrate XDAG wallet.
- Use exchange wallet address and user's wallet address as combination to distingush different users.
- Maintain multi wallets by yourself program.
- Use decimal numbers to distingush different users.
This example just demonstrates the first way.
The main repo for XDAG: https://github.com/xdagger/xdag
API Doc: https://explorer.xdag.io/api-docs
Explorer: https://explorer.xdag.io
Getting Started: https://github.com/XDagger/xdag/wiki/Getting-started
How to setup testnet:
- Build your binary version following https://github.com/XDagger/xdag/wiki/Getting-started
- If you run nodes on the same machine, just copy those files to different folders.
- Currently, to run a testnet just need two nodes.
- Modify the
netdb-white-testnet.txt
andnetdb-testnet.txt
according to your configuration. - The launch command is
./xdag -t -z RAM -v 7 -p 127.0.0.1:<port for node> -P 127.0.0.1:<port for miners>:64:64:64:1:5:5:0.5 -rpc-enable -disable-refresh
For example:
If wanna launch two nodes.
- Copy those files to two folders, let's assume folder
xdag1
andxdag2
. - Modify the
netdb-white-testnet.txt
andnetdb-testnet.txt
in both folders.
127.0.0.1:3366
127.0.0.1:3367
- In the folder for the first node run this command
./xdag -t -z RAM -v 7 -p 127.0.0.1:3366 -P 127.0.0.1:8888:64:64:64:1:5:5:0.5 -disable-refresh
to launch one node. - In the folder for the second node run this command
./xdag -t -z RAM -v 7 -p 127.0.0.1:3367 -P 127.0.0.1:8889:64:64:64:1:5:5:0.5 -disable-refresh
to launch another node. - Make a new folder for wallet, and copy those files to the new folder.
- Launch your wallet by command
./xdag -t 127.0.0.1:8888
to connect to nodexdag1
. - For sure you can make many wallets as you want by make different folders and connect to
xdag1
node by using127.0.0.1:8888
orxdag2
node by using127.0.0.1:8889
.
Hint:
- Currently https://explorer.xdag.io is only for main net. For your local testnet, you have to check the instructions about how to setup explorer in repo https://github.com/XDagger/explorer.
- If have any problem, please join XDAG Community discord channel https://discord.gg/YxXUVQJ. Or contact me through XDAG Developers Chinese QQ Group
676955224
. - This example is for Python3.