syntax = "proto3";
package band.tss.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";

import "band/tss/v1beta1/tss.proto";

option go_package = "github.com/bandprotocol/chain/v3/x/tss/types";

// GenesisState defines the tss module's genesis state.
message GenesisState {
  // params defines all the parameters of the module.
  Params params = 1 [(gogoproto.nullable) = false];
  // groups is an array containing information about each group.
  repeated Group groups = 2 [(gogoproto.nullable) = false];
  // members is an array containing information about each member of groups.
  repeated Member members = 3 [(gogoproto.nullable) = false];
  // des is an array containing the des of all the addressres.
  repeated DEGenesis des = 4 [(gogoproto.customname) = "DEs", (gogoproto.nullable) = false];
}

// Params defines the set of module parameters.
message Params {
  option (gogoproto.equal) = true;

  // max_group_size is the maximum of the member capacity of the group.
  uint64 max_group_size = 1;
  // max_de_size is the maximum of the de capacity of the member.
  uint64 max_de_size = 2 [(gogoproto.customname) = "MaxDESize"];
  // creation_period is the number of blocks allowed to creating tss group.
  uint64 creation_period = 3;
  // signing_period is the number of blocks allowed to sign.
  uint64 signing_period = 4;
  // max_signing_attempt is the maximum number of signing retry process per signingID.
  uint64 max_signing_attempt = 5;
  // max_memo_length is the maximum length of the memo in the direct originator.
  uint64 max_memo_length = 6;
  // max_message_length is the maximum length of the message in the TextSignatureOrder.
  uint64 max_message_length = 7;
}

// DEGenesis defines an account address and de pair used in the tss module's genesis state.
message DEGenesis {
  // address is the address of the de holder.
  string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // de defines the difference de this balance holds.
  DE de = 2 [(gogoproto.customname) = "DE", (gogoproto.nullable) = false];
}
