@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
254 lines (235 loc) • 12.7 kB
TypeScript
// package: routerprotocol.routerchain.pricefeed
// file: routerprotocol/routerchain/pricefeed/query.proto
import * as routerprotocol_routerchain_pricefeed_query_pb from "../../../routerprotocol/routerchain/pricefeed/query_pb";
import {grpc} from "@improbable-eng/grpc-web";
type QueryParams = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryParamsRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryParamsResponse;
};
type QueryPrice = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceResponse;
};
type QueryPriceAll = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceResponse;
};
type QuerySymbolRequest = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetSymbolRequestRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetSymbolRequestResponse;
};
type QuerySymbolRequestAll = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllSymbolRequestRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllSymbolRequestResponse;
};
type QueryPriceFeederInfo = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceFeederInfoRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceFeederInfoResponse;
};
type QueryPriceFeederInfoAll = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceFeederInfoRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceFeederInfoResponse;
};
type QueryGasPrice = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetGasPriceRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryGetGasPriceResponse;
};
type QueryGasPriceAll = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllGasPriceRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryAllGasPriceResponse;
};
type QueryWhitelistedIBCChannels = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryWhitelistedIBCChannelsRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryWhitelistedIBCChannelsResponse;
};
type QueryChainNativePriceInfo = {
readonly methodName: string;
readonly service: typeof Query;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryChainNativePriceInfoRequest;
readonly responseType: typeof routerprotocol_routerchain_pricefeed_query_pb.QueryChainNativePriceInfoResponse;
};
export class Query {
static readonly serviceName: string;
static readonly Params: QueryParams;
static readonly Price: QueryPrice;
static readonly PriceAll: QueryPriceAll;
static readonly SymbolRequest: QuerySymbolRequest;
static readonly SymbolRequestAll: QuerySymbolRequestAll;
static readonly PriceFeederInfo: QueryPriceFeederInfo;
static readonly PriceFeederInfoAll: QueryPriceFeederInfoAll;
static readonly GasPrice: QueryGasPrice;
static readonly GasPriceAll: QueryGasPriceAll;
static readonly WhitelistedIBCChannels: QueryWhitelistedIBCChannels;
static readonly ChainNativePriceInfo: QueryChainNativePriceInfo;
}
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 QueryClient {
readonly serviceHost: string;
constructor(serviceHost: string, options?: grpc.RpcOptions);
params(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryParamsRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryParamsResponse|null) => void
): UnaryResponse;
params(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryParamsRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryParamsResponse|null) => void
): UnaryResponse;
price(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceResponse|null) => void
): UnaryResponse;
price(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceResponse|null) => void
): UnaryResponse;
priceAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceResponse|null) => void
): UnaryResponse;
priceAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceResponse|null) => void
): UnaryResponse;
symbolRequest(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetSymbolRequestRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetSymbolRequestResponse|null) => void
): UnaryResponse;
symbolRequest(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetSymbolRequestRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetSymbolRequestResponse|null) => void
): UnaryResponse;
symbolRequestAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllSymbolRequestRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllSymbolRequestResponse|null) => void
): UnaryResponse;
symbolRequestAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllSymbolRequestRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllSymbolRequestResponse|null) => void
): UnaryResponse;
priceFeederInfo(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceFeederInfoRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceFeederInfoResponse|null) => void
): UnaryResponse;
priceFeederInfo(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceFeederInfoRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetPriceFeederInfoResponse|null) => void
): UnaryResponse;
priceFeederInfoAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceFeederInfoRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceFeederInfoResponse|null) => void
): UnaryResponse;
priceFeederInfoAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceFeederInfoRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllPriceFeederInfoResponse|null) => void
): UnaryResponse;
gasPrice(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetGasPriceRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetGasPriceResponse|null) => void
): UnaryResponse;
gasPrice(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetGasPriceRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryGetGasPriceResponse|null) => void
): UnaryResponse;
gasPriceAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllGasPriceRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllGasPriceResponse|null) => void
): UnaryResponse;
gasPriceAll(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllGasPriceRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryAllGasPriceResponse|null) => void
): UnaryResponse;
whitelistedIBCChannels(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryWhitelistedIBCChannelsRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryWhitelistedIBCChannelsResponse|null) => void
): UnaryResponse;
whitelistedIBCChannels(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryWhitelistedIBCChannelsRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryWhitelistedIBCChannelsResponse|null) => void
): UnaryResponse;
chainNativePriceInfo(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryChainNativePriceInfoRequest,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryChainNativePriceInfoResponse|null) => void
): UnaryResponse;
chainNativePriceInfo(
requestMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryChainNativePriceInfoRequest,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_pricefeed_query_pb.QueryChainNativePriceInfoResponse|null) => void
): UnaryResponse;
}