github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/docs/source/cli/intkey.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  .. _intkey-cli-reference-label:
    17  
    18  ******
    19  intkey
    20  ******
    21  
    22  The ``intkey`` command starts the IntegerKey transaction processor,
    23  which provides functions that can be used to test deployed ledgers.
    24  
    25  The ``intkey`` command provides subcommands to set, increment, and
    26  decrement the value of entries stored in a state dictionary.
    27  
    28  .. literalinclude:: output/intkey_usage.out
    29     :language: console
    30  
    31  intkey set
    32  ==========
    33  
    34  The ``intkey set`` subcommand sets a key (`name`) to the specified value.
    35  This transaction will fail if the value is less than 0 or greater than
    36  2\ :sup:`32` - 1.
    37  
    38  .. literalinclude:: output/intkey_set_usage.out
    39     :language: console
    40  
    41  intkey inc
    42  ==========
    43  
    44  The ``intkey inc`` subcommand increments a key (`name`) by the specified value.
    45  This transaction will fail if the key is not set or if the resulting value
    46  would exceed 2\ :sup:`32` - 1.
    47  
    48  .. literalinclude:: output/intkey_inc_usage.out
    49     :language: console
    50  
    51  intkey dec
    52  ==========
    53  
    54  The ``intkey dec`` subcommand decrements a key (`name`) by the specified value.
    55  This transaction will fail if the key is not set or if the resulting value
    56  would be less than 0.
    57  
    58  .. literalinclude:: output/intkey_dec_usage.out
    59     :language: console
    60  
    61  intkey show
    62  ===========
    63  
    64  The ``intkey show`` subcommand displays the value of the specified key (`name`).
    65  
    66  .. literalinclude:: output/intkey_show_usage.out
    67     :language: console
    68  
    69  intkey list
    70  ===========
    71  
    72  The ``intkey list`` subcommand displays the value of all keys.
    73  
    74  .. literalinclude:: output/intkey_list_usage.out
    75     :language: console
    76  
    77  .. Licensed under Creative Commons Attribution 4.0 International License
    78  .. https://creativecommons.org/licenses/by/4.0/