import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
//@ts-nocheck

import * as _m0 from "protobufjs/minimal";
import { MsgAddAuthenticator, MsgAddAuthenticatorResponse, MsgRemoveAuthenticator, MsgRemoveAuthenticatorResponse, MsgSetActiveState, MsgSetActiveStateResponse } from "./tx";
/** Msg defines the Msg service. */

export class MsgClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.addAuthenticator = this.addAuthenticator.bind(this);
    this.removeAuthenticator = this.removeAuthenticator.bind(this);
    this.setActiveState = this.setActiveState.bind(this);
  }
  addAuthenticator(request) {
    const data = MsgAddAuthenticator.encode(request).finish();
    const promise = this.rpc.request("ixo.smartaccount.v1beta1.Msg", "AddAuthenticator", data);
    return promise.then(data => MsgAddAuthenticatorResponse.decode(new _m0.Reader(data)));
  }
  removeAuthenticator(request) {
    const data = MsgRemoveAuthenticator.encode(request).finish();
    const promise = this.rpc.request("ixo.smartaccount.v1beta1.Msg", "RemoveAuthenticator", data);
    return promise.then(data => MsgRemoveAuthenticatorResponse.decode(new _m0.Reader(data)));
  }
  setActiveState(request) {
    const data = MsgSetActiveState.encode(request).finish();
    const promise = this.rpc.request("ixo.smartaccount.v1beta1.Msg", "SetActiveState", data);
    return promise.then(data => MsgSetActiveStateResponse.decode(new _m0.Reader(data)));
  }
}