github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/protos/state_context.proto (about)

     1  // Copyright 2016 Intel Corporation
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  // -----------------------------------------------------------------------------
    15  
    16  syntax = "proto3";
    17  option java_multiple_files = true;
    18  option java_package = "sawtooth.sdk.protobuf";
    19  option go_package = "state_context_pb2";
    20  
    21  import "events.proto";
    22  
    23  // An entry in the State
    24  message TpStateEntry {
    25      string address = 1;
    26      bytes data = 2;
    27  }
    28  
    29  // A request from a handler/tp for the values at a series of addresses
    30  message TpStateGetRequest {
    31      // The context id that references a context in the contextmanager
    32      string context_id = 1;
    33      repeated string addresses = 2;
    34  }
    35  
    36  // A response from the contextmanager/validator with a series of State entries
    37  message TpStateGetResponse {
    38      enum Status {
    39          STATUS_UNSET = 0;
    40          OK = 1;
    41          AUTHORIZATION_ERROR = 2;
    42      }
    43  
    44      repeated TpStateEntry entries = 1;
    45      Status status = 2;
    46  }
    47  
    48  // A request from the handler/tp to put entries in the state of a context
    49  message TpStateSetRequest {
    50      string context_id = 1;
    51      repeated TpStateEntry entries = 2;
    52  }
    53  
    54  // A response from the contextmanager/validator with the addresses that were set
    55  message TpStateSetResponse {
    56    enum Status {
    57        STATUS_UNSET = 0;
    58        OK = 1;
    59        AUTHORIZATION_ERROR = 2;
    60    }
    61  
    62      repeated string addresses = 1;
    63      Status status = 2;
    64  }
    65  
    66  // A request from the handler/tp to delete state entries at an collection of addresses
    67  message TpStateDeleteRequest {
    68      string context_id = 1;
    69      repeated string addresses = 2;
    70  }
    71  
    72  // A response form the contextmanager/validator with the addresses that were deleted
    73  message TpStateDeleteResponse {
    74      enum Status {
    75          STATUS_UNSET = 0;
    76          OK = 1;
    77          AUTHORIZATION_ERROR = 2;
    78      }
    79  
    80      repeated string addresses = 1;
    81      Status status = 2;
    82  }
    83  
    84  // The request from the transaction processor to the validator append data
    85  // to a transaction receipt
    86  message TpReceiptAddDataRequest {
    87      // The context id that references a context in the context manager
    88      string context_id = 1;
    89      bytes data = 3;
    90  }
    91  
    92  // The response from the validator to the transaction processor to verify that
    93  // data has been appended to a transaction receipt
    94  message TpReceiptAddDataResponse {
    95      enum Status {
    96          STATUS_UNSET = 0;
    97          OK = 1;
    98          ERROR = 2;
    99      }
   100  
   101      Status status = 2;
   102  }
   103  
   104  message TpEventAddRequest {
   105      string context_id = 1;
   106      Event event = 2;
   107  }
   108  
   109  message TpEventAddResponse {
   110      enum Status {
   111        STATUS_UNSET = 0;
   112        OK = 1;
   113        ERROR = 2;
   114      }
   115      Status status = 2;
   116  }