/**
* This file was automatically generated by @cosmwasm/ts-codegen@0.35.3.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/

export interface InstantiateMsg {
  mix_denom: string;
  mixnet_contract_address: string;
}
export type ExecuteMsg = {
  create_family: {
    label: string;
  };
} | {
  join_family: {
    family_head: FamilyHead;
    join_permit: MessageSignature;
  };
} | {
  leave_family: {
    family_head: FamilyHead;
  };
} | {
  kick_family_member: {
    member: string;
  };
} | {
  track_reward: {
    address: string;
    amount: Coin;
  };
} | {
  claim_operator_reward: {};
} | {
  claim_delegator_reward: {
    mix_id: number;
  };
} | {
  update_mixnode_cost_params: {
    new_costs: MixNodeCostParams;
  };
} | {
  update_mixnode_config: {
    new_config: MixNodeConfigUpdate;
  };
} | {
  update_mixnet_address: {
    address: string;
  };
} | {
  delegate_to_mixnode: {
    amount: Coin;
    mix_id: number;
    on_behalf_of?: string | null;
  };
} | {
  undelegate_from_mixnode: {
    mix_id: number;
    on_behalf_of?: string | null;
  };
} | {
  create_account: {
    cap?: PledgeCap | null;
    owner_address: string;
    staking_address?: string | null;
    vesting_spec?: VestingSpecification | null;
  };
} | {
  withdraw_vested_coins: {
    amount: Coin;
  };
} | {
  track_undelegation: {
    amount: Coin;
    mix_id: number;
    owner: string;
  };
} | {
  bond_mixnode: {
    amount: Coin;
    cost_params: MixNodeCostParams;
    mix_node: MixNode;
    owner_signature: MessageSignature;
  };
} | {
  pledge_more: {
    amount: Coin;
  };
} | {
  decrease_pledge: {
    amount: Coin;
  };
} | {
  unbond_mixnode: {};
} | {
  track_unbond_mixnode: {
    amount: Coin;
    owner: string;
  };
} | {
  track_decrease_pledge: {
    amount: Coin;
    owner: string;
  };
} | {
  bond_gateway: {
    amount: Coin;
    gateway: Gateway;
    owner_signature: MessageSignature;
  };
} | {
  unbond_gateway: {};
} | {
  track_unbond_gateway: {
    amount: Coin;
    owner: string;
  };
} | {
  update_gateway_config: {
    new_config: GatewayConfigUpdate;
  };
} | {
  transfer_ownership: {
    to_address: string;
  };
} | {
  update_staking_address: {
    to_address?: string | null;
  };
} | {
  update_locked_pledge_cap: {
    address: string;
    cap: PledgeCap;
  };
};
export type FamilyHead = string;
export type MessageSignature = number[];
export type Uint128 = string;
export type Percent = Decimal;
export type Decimal = string;
export type PledgeCap = {
  percent: Percent;
} | {
  absolute: Uint128;
};
export interface Coin {
  amount: Uint128;
  denom: string;
  [k: string]: unknown;
}
export interface MixNodeCostParams {
  interval_operating_cost: Coin;
  profit_margin_percent: Percent;
}
export interface MixNodeConfigUpdate {
  host: string;
  http_api_port: number;
  mix_port: number;
  verloc_port: number;
  version: string;
}
export interface VestingSpecification {
  num_periods?: number | null;
  period_seconds?: number | null;
  start_time?: number | null;
}
export interface MixNode {
  host: string;
  http_api_port: number;
  identity_key: string;
  mix_port: number;
  sphinx_key: string;
  verloc_port: number;
  version: string;
}
export interface Gateway {
  clients_port: number;
  host: string;
  identity_key: string;
  location: string;
  mix_port: number;
  sphinx_key: string;
  version: string;
}
export interface GatewayConfigUpdate {
  clients_port: number;
  host: string;
  location: string;
  mix_port: number;
  version: string;
}
export type QueryMsg = {
  get_contract_version: {};
} | {
  get_cw2_contract_version: {};
} | {
  get_accounts_paged: {
    limit?: number | null;
    start_next_after?: string | null;
  };
} | {
  get_accounts_vesting_coins_paged: {
    limit?: number | null;
    start_next_after?: string | null;
  };
} | {
  locked_coins: {
    block_time?: Timestamp | null;
    vesting_account_address: string;
  };
} | {
  spendable_coins: {
    block_time?: Timestamp | null;
    vesting_account_address: string;
  };
} | {
  get_vested_coins: {
    block_time?: Timestamp | null;
    vesting_account_address: string;
  };
} | {
  get_vesting_coins: {
    block_time?: Timestamp | null;
    vesting_account_address: string;
  };
} | {
  get_start_time: {
    vesting_account_address: string;
  };
} | {
  get_end_time: {
    vesting_account_address: string;
  };
} | {
  get_original_vesting: {
    vesting_account_address: string;
  };
} | {
  get_historical_vesting_staking_reward: {
    vesting_account_address: string;
  };
} | {
  get_spendable_vested_coins: {
    vesting_account_address: string;
  };
} | {
  get_spendable_reward_coins: {
    vesting_account_address: string;
  };
} | {
  get_delegated_coins: {
    vesting_account_address: string;
  };
} | {
  get_pledged_coins: {
    vesting_account_address: string;
  };
} | {
  get_staked_coins: {
    vesting_account_address: string;
  };
} | {
  get_withdrawn_coins: {
    vesting_account_address: string;
  };
} | {
  get_account: {
    address: string;
  };
} | {
  get_mixnode: {
    address: string;
  };
} | {
  get_gateway: {
    address: string;
  };
} | {
  get_current_vesting_period: {
    address: string;
  };
} | {
  get_delegation: {
    address: string;
    block_timestamp_secs: number;
    mix_id: number;
  };
} | {
  get_total_delegation_amount: {
    address: string;
    mix_id: number;
  };
} | {
  get_delegation_times: {
    address: string;
    mix_id: number;
  };
} | {
  get_all_delegations: {
    limit?: number | null;
    start_after?: [number, number, number] | null;
  };
};
export type Timestamp = Uint64;
export type Uint64 = string;
export interface MigrateMsg {}
export type Addr = string;
export interface Account {
  coin: Coin;
  owner_address: Addr;
  periods: VestingPeriod[];
  pledge_cap?: PledgeCap | null;
  staking_address?: Addr | null;
  start_time: Timestamp;
  storage_key: number;
}
export interface VestingPeriod {
  period_seconds: number;
  start_time: number;
}
export interface AccountsResponse {
  accounts: BaseVestingAccountInfo[];
  start_next_after?: Addr | null;
}
export interface BaseVestingAccountInfo {
  account_id: number;
  owner: Addr;
}
export interface VestingCoinsResponse {
  accounts: AccountVestingCoins[];
  start_next_after?: Addr | null;
}
export interface AccountVestingCoins {
  account_id: number;
  owner: Addr;
  still_vesting: Coin;
}
export interface AllDelegationsResponse {
  delegations: VestingDelegation[];
  start_next_after?: [number, number, number] | null;
}
export interface VestingDelegation {
  account_id: number;
  amount: Uint128;
  block_timestamp: number;
  mix_id: number;
}
export interface ContractVersion {
  contract: string;
  version: string;
}
export interface ContractBuildInformation {
  build_timestamp: string;
  build_version: string;
  commit_branch: string;
  commit_sha: string;
  commit_timestamp: string;
  rustc_version: string;
}
export type Period = "before" | {
  in: number;
} | "after";
export interface DelegationTimesResponse {
  account_id: number;
  delegation_timestamps: number[];
  mix_id: number;
  owner: Addr;
}
export type NullablePledgeData = PledgeData | null;
export interface PledgeData {
  amount: Coin;
  block_time: Timestamp;
}
export interface OriginalVestingResponse {
  amount: Coin;
  number_of_periods: number;
  period_duration: number;
}