import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
/**
* This file was automatically generated by @cosmwasm/ts-codegen@0.26.0.
* 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 class Cw20StakeQueryClient {
  constructor(client, contractAddress) {
    _defineProperty(this, "client", void 0);
    _defineProperty(this, "contractAddress", void 0);
    _defineProperty(this, "stakedBalanceAtHeight", async ({
      address,
      height
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        staked_balance_at_height: {
          address,
          height
        }
      });
    });
    _defineProperty(this, "totalStakedAtHeight", async ({
      height
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        total_staked_at_height: {
          height
        }
      });
    });
    _defineProperty(this, "stakedValue", async ({
      address
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        staked_value: {
          address
        }
      });
    });
    _defineProperty(this, "totalValue", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        total_value: {}
      });
    });
    _defineProperty(this, "getConfig", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        get_config: {}
      });
    });
    _defineProperty(this, "claims", async ({
      address
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        claims: {
          address
        }
      });
    });
    _defineProperty(this, "getHooks", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        get_hooks: {}
      });
    });
    _defineProperty(this, "listStakers", async ({
      limit,
      startAfter
    }) => {
      return this.client.queryContractSmart(this.contractAddress, {
        list_stakers: {
          limit,
          start_after: startAfter
        }
      });
    });
    _defineProperty(this, "ownership", async () => {
      return this.client.queryContractSmart(this.contractAddress, {
        ownership: {}
      });
    });
    this.client = client;
    this.contractAddress = contractAddress;
    this.stakedBalanceAtHeight = this.stakedBalanceAtHeight.bind(this);
    this.totalStakedAtHeight = this.totalStakedAtHeight.bind(this);
    this.stakedValue = this.stakedValue.bind(this);
    this.totalValue = this.totalValue.bind(this);
    this.getConfig = this.getConfig.bind(this);
    this.claims = this.claims.bind(this);
    this.getHooks = this.getHooks.bind(this);
    this.listStakers = this.listStakers.bind(this);
    this.ownership = this.ownership.bind(this);
  }
}
export class Cw20StakeClient extends Cw20StakeQueryClient {
  constructor(client, _sender, contractAddress) {
    super(client, contractAddress);
    _defineProperty(this, "client", void 0);
    _defineProperty(this, "sender", void 0);
    _defineProperty(this, "contractAddress", void 0);
    _defineProperty(this, "receive", async ({
      amount,
      msg,
      sender
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        receive: {
          amount,
          msg,
          sender
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "unstake", async ({
      amount
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        unstake: {
          amount
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "claim", async (fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        claim: {}
      }, fee, memo, funds);
    });
    _defineProperty(this, "updateConfig", async ({
      duration
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        update_config: {
          duration
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "addHook", async ({
      addr
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        add_hook: {
          addr
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "removeHook", async ({
      addr
    }, fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        remove_hook: {
          addr
        }
      }, fee, memo, funds);
    });
    _defineProperty(this, "updateOwnership", async (fee = "auto", memo, funds) => {
      return await this.client.execute(this.sender, this.contractAddress, {
        update_ownership: {}
      }, fee, memo, funds);
    });
    this.client = client;
    this.sender = _sender;
    this.contractAddress = contractAddress;
    this.receive = this.receive.bind(this);
    this.unstake = this.unstake.bind(this);
    this.claim = this.claim.bind(this);
    this.updateConfig = this.updateConfig.bind(this);
    this.addHook = this.addHook.bind(this);
    this.removeHook = this.removeHook.bind(this);
    this.updateOwnership = this.updateOwnership.bind(this);
  }
}