/** * This file was automatically generated by @cosmwasm/ts-codegen@0.24.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. */ import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from "@cosmjs/cosmwasm-stargate"; import { Coin, StdFee } from "@cosmjs/amino"; import { Decimal, InstantiateMsg, ProviderInfo, ExecuteMsg, QueryMsg, Addr, Config } from "./MeshConsumer.types"; export interface MeshConsumerReadOnlyInterface { contractAddress: string; config: () => Promise; } export class MeshConsumerQueryClient implements MeshConsumerReadOnlyInterface { client: CosmWasmClient; contractAddress: string; constructor(client: CosmWasmClient, contractAddress: string) { this.client = client; this.contractAddress = contractAddress; this.config = this.config.bind(this); } config = async (): Promise => { return this.client.queryContractSmart(this.contractAddress, { config: {} }); }; } export interface MeshConsumerInterface extends MeshConsumerReadOnlyInterface { contractAddress: string; sender: string; meshConsumerRecieveRewardsMsg: ({ validator }: { validator: string; }, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; } export class MeshConsumerClient extends MeshConsumerQueryClient implements MeshConsumerInterface { client: SigningCosmWasmClient; sender: string; contractAddress: string; constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) { super(client, contractAddress); this.client = client; this.sender = sender; this.contractAddress = contractAddress; this.meshConsumerRecieveRewardsMsg = this.meshConsumerRecieveRewardsMsg.bind(this); } meshConsumerRecieveRewardsMsg = async ({ validator }: { validator: string; }, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise => { return await this.client.execute(this.sender, this.contractAddress, { mesh_consumer_recieve_rewards_msg: { validator } }, fee, memo, funds); }; }