//@ts-nocheck import { Rpc } from "../../../helpers"; import { BinaryReader } from "../../../binary"; import { MsgFundCommunityPool, MsgFundCommunityPoolResponse, MsgCommunityPoolSpend, MsgCommunityPoolSpendResponse, MsgCreateContinuousFund, MsgCreateContinuousFundResponse, MsgCancelContinuousFund, MsgCancelContinuousFundResponse, MsgUpdateParams, MsgUpdateParamsResponse } from "./tx"; /** Msg defines the pool Msg service. */ export interface Msg { /** * FundCommunityPool defines a method to allow an account to directly * fund the community pool. */ fundCommunityPool(request: MsgFundCommunityPool): Promise; /** * CommunityPoolSpend defines a governance operation for sending tokens from * the community pool in the x/protocolpool module to another account, which * could be the governance module itself. The authority is defined in the * keeper. */ communityPoolSpend(request: MsgCommunityPoolSpend): Promise; /** * CreateContinuousFund defines a method to distribute a percentage of funds to an address continuously. * This ContinuousFund can be indefinite or run until a given expiry time. * Funds come from validator block rewards from x/distribution, but may also come from * any user who funds the ProtocolPoolEscrow module account directly through x/bank. */ createContinuousFund(request: MsgCreateContinuousFund): Promise; /** CancelContinuousFund defines a method for cancelling continuous fund. */ cancelContinuousFund(request: MsgCancelContinuousFund): Promise; /** * UpdateParams defines a governance operation for updating the x/protocolpool module parameters. * The authority is defined in the keeper. */ updateParams(request: MsgUpdateParams): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; this.fundCommunityPool = this.fundCommunityPool.bind(this); this.communityPoolSpend = this.communityPoolSpend.bind(this); this.createContinuousFund = this.createContinuousFund.bind(this); this.cancelContinuousFund = this.cancelContinuousFund.bind(this); this.updateParams = this.updateParams.bind(this); } fundCommunityPool(request: MsgFundCommunityPool): Promise { const data = MsgFundCommunityPool.encode(request).finish(); const promise = this.rpc.request("cosmos.protocolpool.v1.Msg", "FundCommunityPool", data); return promise.then(data => MsgFundCommunityPoolResponse.decode(new BinaryReader(data))); } communityPoolSpend(request: MsgCommunityPoolSpend): Promise { const data = MsgCommunityPoolSpend.encode(request).finish(); const promise = this.rpc.request("cosmos.protocolpool.v1.Msg", "CommunityPoolSpend", data); return promise.then(data => MsgCommunityPoolSpendResponse.decode(new BinaryReader(data))); } createContinuousFund(request: MsgCreateContinuousFund): Promise { const data = MsgCreateContinuousFund.encode(request).finish(); const promise = this.rpc.request("cosmos.protocolpool.v1.Msg", "CreateContinuousFund", data); return promise.then(data => MsgCreateContinuousFundResponse.decode(new BinaryReader(data))); } cancelContinuousFund(request: MsgCancelContinuousFund): Promise { const data = MsgCancelContinuousFund.encode(request).finish(); const promise = this.rpc.request("cosmos.protocolpool.v1.Msg", "CancelContinuousFund", data); return promise.then(data => MsgCancelContinuousFundResponse.decode(new BinaryReader(data))); } updateParams(request: MsgUpdateParams): Promise { const data = MsgUpdateParams.encode(request).finish(); const promise = this.rpc.request("cosmos.protocolpool.v1.Msg", "UpdateParams", data); return promise.then(data => MsgUpdateParamsResponse.decode(new BinaryReader(data))); } }