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

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

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

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

// MsgSubscribeToNodeRequest defines the SDK message for subscribing to a node
message MsgSubscribeToNodeRequest {
  string frm                      = 1;
  string address                   = 2;
  cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false ];
}

// MsgSubscribeToPlanRequest defines the SDK message for subscribing to a plan
message MsgSubscribeToPlanRequest {
  string frm  = 1;
  uint64 id    = 2;
  string denom = 3;
}

// MsgCancelRequest defines the SDK message for cancelling a subscription
message MsgCancelRequest {
  string frm = 1;
  uint64 id   = 2;
}

// MsgAddQuotaRequest defines the SDK message for adding the quota to an address
message MsgAddQuotaRequest {
  string frm    = 1;
  uint64 id      = 2;
  string address = 3;
  string bytes   = 4 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable)   = false
  ];
}

// MsgUpdateQuotaRequest defines the SDK message for updating the quota of an
// address
message MsgUpdateQuotaRequest {
  string frm    = 1;
  uint64 id      = 2;
  string address = 3;
  string bytes   = 4 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable)   = false
  ];
}

// MsgSubscribeToNodeResponse defines the response of message
// MsgSubscribeToNodeRequest
message MsgSubscribeToNodeResponse {}

// MsgSubscribeToPlanResponse defines the response of message
// MsgSubscribeToPlanRequest
message MsgSubscribeToPlanResponse {}

// MsgCancelResponse defines the response of message MsgCancelRequest
message MsgCancelResponse {}

// MsgAddQuotaResponse defines the response of message MsgAddQuotaRequest
message MsgAddQuotaResponse {}

// MsgUpdateQuotaResponse defines the response of message MsgUpdateQuotaRequest
message MsgUpdateQuotaResponse {}

service MsgService {
  rpc MsgSubscribeToNode(MsgSubscribeToNodeRequest)
      returns (MsgSubscribeToNodeResponse);
  rpc MsgSubscribeToPlan(MsgSubscribeToPlanRequest)
      returns (MsgSubscribeToPlanResponse);
  rpc MsgCancel(MsgCancelRequest) returns (MsgCancelResponse);
  rpc MsgAddQuota(MsgAddQuotaRequest) returns (MsgAddQuotaResponse);
  rpc MsgUpdateQuota(MsgUpdateQuotaRequest) returns (MsgUpdateQuotaResponse);
}
