syntax = "proto3";
package sentinel.session.v1;

option go_package = "github.com/sentinel-official/hub/x/session/types";

import "gogoproto/gogo.proto";
import "sentinel/session/v1/proof.proto";

option (gogoproto.equal_all)           = false;
option (gogoproto.goproto_getters_all) = false;

// MsgStartRequest defines the SDK message for starting a session
message MsgStartRequest {
  string frm = 1;
  uint64 id   = 2;
  string node = 3;
}

// MsgUpdateRequest defines the SDK message for updating a session
message MsgUpdateRequest {
  string frm     = 1;
  Proof proof     = 2 [ (gogoproto.nullable) = false ];
  bytes signature = 3;
}

// MsgEndRequest defines the SDK message for ending a session
message MsgEndRequest {
  string frm   = 1;
  uint64 id     = 2;
  uint64 rating = 3;
}

// MsgStartResponse defines the response of message MsgStartRequest
message MsgStartResponse {}

// MsgUpdateResponse defines the response of message MsgUpdateRequest
message MsgUpdateResponse {}

// MsgEndResponse defines the response of message MsgEndRequest
message MsgEndResponse {}

service MsgService {
  rpc MsgStart(MsgStartRequest) returns (MsgStartResponse);
  rpc MsgUpdate(MsgUpdateRequest) returns (MsgUpdateResponse);
  rpc MsgEnd(MsgEndRequest) returns (MsgEndResponse);
}
