Running xayad for games - RenegadeMinds/testbed GitHub Wiki

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 -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

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.

Running Naked

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 Also

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.

⚠️ **GitHub.com Fallback** ⚠️