syntax = "proto3";
package kava.savings.v1beta1;

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

option go_package = "github.com/kava-labs/kava/x/savings/types";

// Msg defines the savings Msg service.
service Msg {

  // Deposit defines a method for depositing funds to the savings module account
  rpc Deposit(MsgDeposit) returns (MsgDepositResponse);

  // Withdraw defines a method for withdrawing funds to the savings module account
  rpc Withdraw(MsgWithdraw) returns (MsgWithdrawResponse);
}

// MsgDeposit defines the Msg/Deposit request type.
message MsgDeposit {
  string   depositor                       = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  repeated cosmos.base.v1beta1.Coin amount = 2
      [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
}

// MsgDepositResponse defines the Msg/Deposit response type.
message MsgDepositResponse {}

// MsgWithdraw defines the Msg/Withdraw request type.
message MsgWithdraw {
  string   depositor                       = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  repeated cosmos.base.v1beta1.Coin amount = 2
      [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
}

// MsgWithdrawResponse defines the Msg/Withdraw response type.
message MsgWithdrawResponse {}