-
Notifications
You must be signed in to change notification settings - Fork 10
Running xayad for games
It's important to set the right options when you run xayad so that you can communicate with it and so that libxayagame can also communicate with it.
The short answer is that you should generally run it as follows.
xayad -rpcuser=user -rpcpassword=password -wallet=game.dat -server=1 -rpcallowip=127.0.0.1 -zmqpubgameblocks=tcp://127.0.0.1:28332 -zmqpubgamepending=tcp://127.0.0.1:28332
It will then run as a server.
However, you will need to supply the rpcuser ("user" above), the rpcpassword ("password" above), and the wallet for every request you make. Using xaya-cli a command would then look like this:
xaya-cli -rpcuser=user -rpcpassword=password -wallet=game.dat <command>
If you have specified the rpcuser, rpcpassword or wallet in xaya.conf in the data directory, then you can leave them out above when running xayad. You will then need to specify the rpcuser, rpcpassword and wallet from the xaya.conf file when you issue commands with xaya-cli or through any other RPC tool that you may use.
If you do not specify a wallet anywhere, xayad will default to the wallet.dat file in the data directory.
You can run xayad without specifying any rpcuser, rpcpassword or wallet, in which case you can leave them out entirely when you run commands through xaya-cli. xaya-cli commands are then much simpler.
xaya-cli <command>
To run xayad very simple for xaya-cli and not specify any rpcuser, rpcpassword or wallet in xaya.conf, run xayad like so:
xayad -server=1 -rpcallowip=127.0.0.1 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubgameblocks=tcp://127.0.0.1:28332
That is the minimum you must use to run xayad for games, testing, or development.
See more information about xaya.conf here.
See more information about xaya-cli here.
See more information about XAYA RPC methods here.
See more information about daemon startup options for xayad here.
- Step 0: Blockchain Basics
- Step 1: xayad <⸺ start here
- Step 2: The Game State Processor
- Step 3a: libxayagame Component Relationships
- Step 3b: Compile libxayagame in Windows
- Step 3b: Compile libxayagame in Ubuntu
- Step 4: Run xayad for Games
- Step 5: Hello World! in C++
- Step 5: Hello World! in C#
- Step 5: Hello World! with SQLite
- Step 6a: Mover Overview
- Step 6b: Mover Console
- Step 6c: Mover Unity
- libxayagame Component Relationships
- How to Compile libxayagame in Ubuntu 20.04.03
- How to Compile libxayagame in Ubuntu 22.04
- How to Compile libxayagame in Windows
- Xayaships (How to get started playing)