syntax = "proto3";

package p2p.v1;
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "p2p/v1/resource.proto";
import "base/v1/resource.proto";

message BroadCastRequest {
  MessageHeader header = 1;
  bytes data = 2;
}

message BroadCastResponse {
  bool status = 1;
}


message BroadCastTxsRequest {
  repeated    base.v1.CheckTx    txs = 1;
}

message BroadCastTxsResponse {
  repeated  bool status = 1;  
}



message BatchTxsHashRequest{
  bytes hash = 1;
}


message BatchTxsHashResponse {
  bytes hash = 1;
  repeated    base.v1.CheckTx    txs = 2;
}


message SendDataRequest {
  MessageHeader header = 1;
  bytes data = 2;
}

message SendDataResponse {
  bool success = 1;
}

message SubscribeMsgRequest {
  MessageHeader header = 1;
  repeated P2PMsgType msg_types = 2;
}

message SubscribeMsgResponse {
  bool success = 1;
}


message NetVersionRequest { }

message NetVersionResponse {
  bytes version = 1;
}


message NetPeerCountRequest { }

message NetPeerCountResponse {
  uint32 peer_count = 1;
}
