// package: routerprotocol.routerchain.pricefeed
// file: routerprotocol/routerchain/pricefeed/tx.proto

import * as routerprotocol_routerchain_pricefeed_tx_pb from "../../../routerprotocol/routerchain/pricefeed/tx_pb";
import {grpc} from "@improbable-eng/grpc-web";

type MsgTokenPrices = {
  readonly methodName: string;
  readonly service: typeof Msg;
  readonly requestStream: false;
  readonly responseStream: false;
  readonly requestType: typeof routerprotocol_routerchain_pricefeed_tx_pb.MsgTokenPrices;
  readonly responseType: typeof routerprotocol_routerchain_pricefeed_tx_pb.MsgTokenPricesResponse;
};

type MsgGasPrices = {
  readonly methodName: string;
  readonly service: typeof Msg;
  readonly requestStream: false;
  readonly responseStream: false;
  readonly requestType: typeof routerprotocol_routerchain_pricefeed_tx_pb.MsgGasPrices;
  readonly responseType: typeof routerprotocol_routerchain_pricefeed_tx_pb.MsgGasPricesResponse;
};

export class Msg {
  static readonly serviceName: string;
  static readonly TokenPrices: MsgTokenPrices;
  static readonly GasPrices: MsgGasPrices;
}

export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
export type Status = { details: string, code: number; metadata: grpc.Metadata }

interface UnaryResponse {
  cancel(): void;
}
interface ResponseStream<T> {
  cancel(): void;
  on(type: 'data', handler: (message: T) => void): ResponseStream<T>;
  on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;
  on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;
}
interface RequestStream<T> {
  write(message: T): RequestStream<T>;
  end(): void;
  cancel(): void;
  on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;
  on(type: 'status', handler: (status: Status) => void): RequestStream<T>;
}
interface BidirectionalStream<ReqT, ResT> {
  write(message: ReqT): BidirectionalStream<ReqT, ResT>;
  end(): void;
  cancel(): void;
  on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;
  on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;
  on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;
}

export class MsgClient {
  readonly serviceHost: string;

  constructor(serviceHost: string, options?: grpc.RpcOptions);
  tokenPrices(
    requestMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgTokenPrices,
    metadata: grpc.Metadata,
    callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgTokenPricesResponse|null) => void
  ): UnaryResponse;
  tokenPrices(
    requestMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgTokenPrices,
    callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgTokenPricesResponse|null) => void
  ): UnaryResponse;
  gasPrices(
    requestMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgGasPrices,
    metadata: grpc.Metadata,
    callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgGasPricesResponse|null) => void
  ): UnaryResponse;
  gasPrices(
    requestMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgGasPrices,
    callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_tx_pb.MsgGasPricesResponse|null) => void
  ): UnaryResponse;
}

