syntax = "proto3";

package vesting.v1beta1;

import "amino/amino.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "vesting/v1beta1/vesting.proto";

option go_package = "github.com/axone-protocol/axoned/x/vesting/types";

// Msg defines the bank Msg service.
service Msg {
  option (cosmos.msg.v1.service) = true;

  // CreateVestingAccount defines a method that enables creating a vesting
  // account.
  rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse);
  // CreatePermanentLockedAccount defines a method that enables creating a permanent
  // locked account.
  //
  // Since: cosmos-sdk 0.46
  rpc CreatePermanentLockedAccount(MsgCreatePermanentLockedAccount) returns (MsgCreatePermanentLockedAccountResponse);
  // CreatePeriodicVestingAccount defines a method that enables creating a
  // periodic vesting account.
  //
  // Since: cosmos-sdk 0.46
  rpc CreatePeriodicVestingAccount(MsgCreatePeriodicVestingAccount) returns (MsgCreatePeriodicVestingAccountResponse);
  // CreateCliffVestingAccount defines a method that enables creating a cliff vesting
  // account.
  rpc CreateCliffVestingAccount(MsgCreateCliffVestingAccount) returns (MsgCreateCliffVestingAccountResponse);
}

// MsgCreateVestingAccount defines a message that enables creating a vesting
// account.
message MsgCreateVestingAccount {
  option (cosmos.msg.v1.signer) = "from_address";
  option (amino.name) = "cosmos-sdk/MsgCreateVestingAccount";

  option (gogoproto.equal) = true;

  string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  repeated cosmos.base.v1beta1.Coin amount = 3 [
    (gogoproto.nullable) = false,
    (amino.dont_omitempty) = true,
    (amino.encoding) = "legacy_coins",
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
  ];

  // end of vesting as unix time (in seconds).
  int64 end_time = 4;
  bool delayed = 5;
}

// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type.
message MsgCreateVestingAccountResponse {}

// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent
// locked account.
//
// Since: cosmos-sdk 0.46
message MsgCreatePermanentLockedAccount {
  option (cosmos.msg.v1.signer) = "from_address";
  option (amino.name) = "cosmos-sdk/MsgCreatePermLockedAccount";
  option (gogoproto.equal) = true;

  string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""];
  string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""];
  repeated cosmos.base.v1beta1.Coin amount = 3 [
    (gogoproto.nullable) = false,
    (amino.dont_omitempty) = true,
    (amino.encoding) = "legacy_coins",
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
  ];
}

// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type.
//
// Since: cosmos-sdk 0.46
message MsgCreatePermanentLockedAccountResponse {}

// MsgCreateVestingAccount defines a message that enables creating a vesting
// account.
//
// Since: cosmos-sdk 0.46
message MsgCreatePeriodicVestingAccount {
  option (cosmos.msg.v1.signer) = "from_address";
  option (amino.name) = "cosmos-sdk/MsgCreatePeriodVestAccount";

  option (gogoproto.equal) = false;

  string from_address = 1;
  string to_address = 2;
  // start of vesting as unix time (in seconds).
  int64 start_time = 3;
  repeated Period vesting_periods = 4 [
    (gogoproto.nullable) = false,
    (amino.dont_omitempty) = true
  ];
}

// MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount
// response type.
//
// Since: cosmos-sdk 0.46
message MsgCreatePeriodicVestingAccountResponse {}

// MsgCreateCliffVestingAccount defines a message that enables creating a cliff vesting
// account.
message MsgCreateCliffVestingAccount {
  option (cosmos.msg.v1.signer) = "from_address";
  option (amino.name) = "cosmos-sdk/MsgCreateCliffVestingAccount";

  option (gogoproto.equal) = true;

  string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""];
  string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""];
  repeated cosmos.base.v1beta1.Coin amount = 3 [
    (gogoproto.nullable) = false,
    (amino.dont_omitempty) = true,
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
  ];

  int64 end_time = 4;
  // cliff time as unix time (in seconds) is the time at which the first portion of the vesting is unlocked.
  int64 cliff_time = 5;
}

// MsgCreateCliffVestingAccountResponse defines the Msg/CreateVestingAccount response type.
message MsgCreateCliffVestingAccountResponse {}
