@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
102 lines (91 loc) • 4.41 kB
TypeScript
// package: routerprotocol.routerchain.voyager
// file: routerprotocol/routerchain/voyager/tx.proto
import * as routerprotocol_routerchain_voyager_tx_pb from "../../../routerprotocol/routerchain/voyager/tx_pb";
import {grpc} from "@improbable-eng/grpc-web";
type MsgFundsDeposited = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_voyager_tx_pb.MsgFundsDeposited;
readonly responseType: typeof routerprotocol_routerchain_voyager_tx_pb.MsgFundsDepositedResponse;
};
type MsgFundsPaid = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_voyager_tx_pb.MsgFundsPaid;
readonly responseType: typeof routerprotocol_routerchain_voyager_tx_pb.MsgFundsPaidResponse;
};
type MsgDepositInfoUpdated = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_voyager_tx_pb.MsgDepositInfoUpdated;
readonly responseType: typeof routerprotocol_routerchain_voyager_tx_pb.MsgDepositInfoUpdatedResponse;
};
export class Msg {
static readonly serviceName: string;
static readonly FundsDeposited: MsgFundsDeposited;
static readonly FundsPaid: MsgFundsPaid;
static readonly DepositInfoUpdated: MsgDepositInfoUpdated;
}
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);
fundsDeposited(
requestMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsDeposited,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsDepositedResponse|null) => void
): UnaryResponse;
fundsDeposited(
requestMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsDeposited,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsDepositedResponse|null) => void
): UnaryResponse;
fundsPaid(
requestMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsPaid,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsPaidResponse|null) => void
): UnaryResponse;
fundsPaid(
requestMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsPaid,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_voyager_tx_pb.MsgFundsPaidResponse|null) => void
): UnaryResponse;
depositInfoUpdated(
requestMessage: routerprotocol_routerchain_voyager_tx_pb.MsgDepositInfoUpdated,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_voyager_tx_pb.MsgDepositInfoUpdatedResponse|null) => void
): UnaryResponse;
depositInfoUpdated(
requestMessage: routerprotocol_routerchain_voyager_tx_pb.MsgDepositInfoUpdated,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_voyager_tx_pb.MsgDepositInfoUpdatedResponse|null) => void
): UnaryResponse;
}