github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/protos/client_batch.proto (about) 1 // Copyright 2017 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 18 option java_multiple_files = true; 19 option java_package = "sawtooth.sdk.protobuf"; 20 option go_package = "client_batch_pb2"; 21 22 import "batch.proto"; 23 import "client_list_control.proto"; 24 25 26 // A request to return a list of batches from the validator. May include the id 27 // of a particular block to be the `head` of the chain being requested. In that 28 // case the list will include the batches from that block, and all batches 29 // previous to that block on the chain. Filter with specific `batch_ids`. 30 message ClientBatchListRequest { 31 string head_id = 1; 32 repeated string batch_ids = 2; 33 ClientPagingControls paging = 3; 34 repeated ClientSortControls sorting = 4; 35 } 36 37 // A response that lists batches from newest to oldest. 38 // 39 // Statuses: 40 // * OK - everything worked as expected 41 // * INTERNAL_ERROR - general error, such as protobuf failing to deserialize 42 // * NOT_READY - the validator does not yet have a genesis block 43 // * NO_ROOT - the head block specified was not found 44 // * NO_RESOURCE - no batches were found with the parameters specified 45 // * INVALID_PAGING - the paging controls were malformed or out of range 46 // * INVALID_SORT - the sorting controls were malformed or invalid 47 message ClientBatchListResponse { 48 enum Status { 49 STATUS_UNSET = 0; 50 OK = 1; 51 INTERNAL_ERROR = 2; 52 NOT_READY = 3; 53 NO_ROOT = 4; 54 NO_RESOURCE = 5; 55 INVALID_PAGING = 6; 56 INVALID_SORT = 7; 57 INVALID_ID = 8; 58 } 59 Status status = 1; 60 repeated Batch batches = 2; 61 string head_id = 3; 62 ClientPagingResponse paging = 4; 63 } 64 65 // Fetches a specific batch by its id (header_signature) from the blockchain. 66 message ClientBatchGetRequest { 67 string batch_id = 1; 68 } 69 70 // A response that returns the batch specified by a ClientBatchGetRequest. 71 // 72 // Statuses: 73 // * OK - everything worked as expected, batch has been fetched 74 // * INTERNAL_ERROR - general error, such as protobuf failing to deserialize 75 // * NO_RESOURCE - no batch with the specified id exists 76 message ClientBatchGetResponse { 77 enum Status { 78 STATUS_UNSET = 0; 79 OK = 1; 80 INTERNAL_ERROR = 2; 81 NO_RESOURCE = 5; 82 INVALID_ID = 8; 83 } 84 Status status = 1; 85 Batch batch = 2; 86 }