syntax = "proto3";
package stride.stakeibc;
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "stride/records/records.proto";
import "stride/stakeibc/host_zone.proto";
import "stride/stakeibc/validator.proto";

option go_package = "github.com/Stride-Labs/stride/v15/x/stakeibc/types";

message SplitDelegation {
  string validator = 1;
  string amount = 2 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable) = false
  ];
}

message DelegateCallback {
  string host_zone_id = 1;
  uint64 deposit_record_id = 2;
  repeated SplitDelegation split_delegations = 3;
}

message ClaimCallback {
  string user_redemption_record_id = 1;
  string chain_id = 2;
  uint64 epoch_number = 3;
}

message ReinvestCallback {
  cosmos.base.v1beta1.Coin reinvest_amount = 1 [
    (gogoproto.nullable) = false,
    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"
  ];
  string host_zone_id = 3;
}

message UndelegateCallback {
  string host_zone_id = 1;
  repeated SplitDelegation split_delegations = 2;
  repeated uint64 epoch_unbonding_record_ids = 3;
}

message UndelegateHostCallback {
  string amt = 1 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable) = false
  ];
  repeated SplitDelegation split_delegations = 2;
}

message RedemptionCallback {
  string host_zone_id = 1;
  repeated uint64 epoch_unbonding_record_ids = 2;
}

message Rebalancing {
  string src_validator = 1;
  string dst_validator = 2;
  string amt = 3 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable) = false
  ];
}

message RebalanceCallback {
  string host_zone_id = 1;
  repeated Rebalancing rebalancings = 2;
}

message DetokenizeSharesCallback { records.LSMTokenDeposit deposit = 1; }

message LSMLiquidStake {
  records.LSMTokenDeposit deposit = 1;
  HostZone host_zone = 2;
  Validator validator = 3;
}

message ValidatorSharesToTokensQueryCallback {
  LSMLiquidStake lsm_liquid_stake = 1;
}

message DelegatorSharesQueryCallback {
  // Validator delegation at the time the query is submitted
  string initial_validator_delegation = 1 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable) = false
  ];
}