syntax = "proto3"; package graphsync.message.pb; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; message Message { message Request { int32 id = 1; // unique id set on the requester side bytes selector = 2; // ipld selector to retrieve bytes extra = 3; // aux information. useful for other protocols int32 priority = 4; // the priority (normalized). default to 1 bool cancel = 5; // whether this cancels a request } message Response { int32 id = 1; // the request id int32 status = 2; // a status code. bytes extra = 3; // additional data } message Block { bytes prefix = 1; // CID prefix (cid version, multicodec and multihash prefix (type + length) bytes data = 2; } // the actual data included in this message bool completeRequestList = 1; // This request list includes *all* requests, replacing outstanding requests. repeated Request requests = 2 [(gogoproto.nullable) = false]; // The list of requests. repeated Response responses = 3 [(gogoproto.nullable) = false]; // The list of responses. repeated Block data = 4 [(gogoproto.nullable) = false]; // Blocks related to the responses }