import { Rpc } from "../../helpers"; import * as _m0 from "protobufjs/minimal"; import { MsgCreateGauge, MsgCreateGaugeResponse, MsgAddToGauge, MsgAddToGaugeResponse } from "./tx"; export interface Msg { createGauge(request: MsgCreateGauge): Promise; addToGauge(request: MsgAddToGauge): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; this.createGauge = this.createGauge.bind(this); this.addToGauge = this.addToGauge.bind(this); } createGauge(request: MsgCreateGauge): Promise { const data = MsgCreateGauge.encode(request).finish(); const promise = this.rpc.request("osmosis.incentives.Msg", "CreateGauge", data); return promise.then(data => MsgCreateGaugeResponse.decode(new _m0.Reader(data))); } addToGauge(request: MsgAddToGauge): Promise { const data = MsgAddToGauge.encode(request).finish(); const promise = this.rpc.request("osmosis.incentives.Msg", "AddToGauge", data); return promise.then(data => MsgAddToGaugeResponse.decode(new _m0.Reader(data))); } }