Skip to content

Running xayad for games

Blockchain Gaming edited this page Jan 20, 2020 · 1 revision

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= -zmqpubgameblocks=tcp:// -zmqpubgamepending=tcp://

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= -zmqpubhashtx=tcp:// -zmqpubhashblock=tcp:// -zmqpubrawblock=tcp:// -zmqpubrawtx=tcp:// -zmqpubgameblocks=tcp://

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.

Clone this wiki locally