github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/docs/source/cli/xo.rst (about) 1 .. 2 Copyright 2017 Intel Corporation 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 16 .. _xo-cli-reference-label: 17 18 ** 19 xo 20 ** 21 22 The ``xo`` command starts the XO transaction processor. 23 24 This command demonstrates an example client that uses the XO transaction 25 family to play a simple game of Tic-tac-toe (also known as Noughts and Crosses, 26 or X's and O's). This command handles the construction and submission of 27 transactions to a running validator via the URL of the validator's REST API. 28 29 Before playing a game, you must start a validator, the XO transaction processor,and the REST API. The XO client sends requests to update and query the 30 blockchain to the URL of the REST API (by default, ``http://127.0.0.1:8008``). 31 32 For more information on requirements and game rules, see 33 :doc:`../app_developers_guide/intro_xo_transaction_family`. 34 35 The ``xo`` command provides subcommands for playing XO on the command line. 36 37 .. literalinclude:: output/xo_usage.out 38 :language: console 39 40 xo create 41 ========= 42 43 The ``xo create`` subcommand starts an XO game with the specified name. 44 45 .. literalinclude:: output/xo_create_usage.out 46 :language: console 47 48 xo list 49 ======= 50 51 The ``xo list`` subcommand displays information for all XO games in state. 52 53 .. literalinclude:: output/xo_list_usage.out 54 :language: console 55 56 xo show 57 ======= 58 59 The ``xo show`` subcommand displays information about the specified XO game. 60 61 .. literalinclude:: output/xo_show_usage.out 62 :language: console 63 64 xo take 65 ======= 66 67 The ``xo take`` subcommand makes a move in an XO game by sending a transaction 68 to take the identified space. This transaction will fail if the game `name` does not exist, if it is not the sender’s turn, or if `space` is 69 already taken. 70 71 .. literalinclude:: output/xo_take_usage.out 72 :language: console 73 74 xo delete 75 ========= 76 77 The ``xo delete`` subcommand deletes an existing xo game. 78 79 .. literalinclude:: output/xo_delete_usage.out 80 :language: console 81 82 .. Licensed under Creative Commons Attribution 4.0 International License 83 .. https://creativecommons.org/licenses/by/4.0/