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

import * as _m0 from "protobufjs/minimal";
import { MsgCreateEntity, MsgCreateEntityResponse, MsgUpdateEntity, MsgUpdateEntityResponse, MsgUpdateEntityVerified, MsgUpdateEntityVerifiedResponse, MsgTransferEntity, MsgTransferEntityResponse, MsgCreateEntityAccount, MsgCreateEntityAccountResponse, MsgGrantEntityAccountAuthz, MsgGrantEntityAccountAuthzResponse, MsgRevokeEntityAccountAuthz, MsgRevokeEntityAccountAuthzResponse } from "./tx";
/** Msg defines the project Msg service. */

export class MsgClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.createEntity = this.createEntity.bind(this);
    this.updateEntity = this.updateEntity.bind(this);
    this.updateEntityVerified = this.updateEntityVerified.bind(this);
    this.transferEntity = this.transferEntity.bind(this);
    this.createEntityAccount = this.createEntityAccount.bind(this);
    this.grantEntityAccountAuthz = this.grantEntityAccountAuthz.bind(this);
    this.revokeEntityAccountAuthz = this.revokeEntityAccountAuthz.bind(this);
  }
  createEntity(request) {
    const data = MsgCreateEntity.encode(request).finish();
    const promise = this.rpc.request("ixo.entity.v1beta1.Msg", "CreateEntity", data);
    return promise.then(data => MsgCreateEntityResponse.decode(new _m0.Reader(data)));
  }
  updateEntity(request) {
    const data = MsgUpdateEntity.encode(request).finish();
    const promise = this.rpc.request("ixo.entity.v1beta1.Msg", "UpdateEntity", data);
    return promise.then(data => MsgUpdateEntityResponse.decode(new _m0.Reader(data)));
  }
  updateEntityVerified(request) {
    const data = MsgUpdateEntityVerified.encode(request).finish();
    const promise = this.rpc.request("ixo.entity.v1beta1.Msg", "UpdateEntityVerified", data);
    return promise.then(data => MsgUpdateEntityVerifiedResponse.decode(new _m0.Reader(data)));
  }
  transferEntity(request) {
    const data = MsgTransferEntity.encode(request).finish();
    const promise = this.rpc.request("ixo.entity.v1beta1.Msg", "TransferEntity", data);
    return promise.then(data => MsgTransferEntityResponse.decode(new _m0.Reader(data)));
  }
  createEntityAccount(request) {
    const data = MsgCreateEntityAccount.encode(request).finish();
    const promise = this.rpc.request("ixo.entity.v1beta1.Msg", "CreateEntityAccount", data);
    return promise.then(data => MsgCreateEntityAccountResponse.decode(new _m0.Reader(data)));
  }
  grantEntityAccountAuthz(request) {
    const data = MsgGrantEntityAccountAuthz.encode(request).finish();
    const promise = this.rpc.request("ixo.entity.v1beta1.Msg", "GrantEntityAccountAuthz", data);
    return promise.then(data => MsgGrantEntityAccountAuthzResponse.decode(new _m0.Reader(data)));
  }
  revokeEntityAccountAuthz(request) {
    const data = MsgRevokeEntityAccountAuthz.encode(request).finish();
    const promise = this.rpc.request("ixo.entity.v1beta1.Msg", "RevokeEntityAccountAuthz", data);
    return promise.then(data => MsgRevokeEntityAccountAuthzResponse.decode(new _m0.Reader(data)));
  }
}