UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

83 lines (73 loc) 3.12 kB
// package: ethermint.evm.v1 // file: ethermint/evm/v1/tx.proto import * as ethermint_evm_v1_tx_pb from "../../../ethermint/evm/v1/tx_pb"; import {grpc} from "@improbable-eng/grpc-web"; type MsgEthereumTx = { readonly methodName: string; readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof ethermint_evm_v1_tx_pb.MsgEthereumTx; readonly responseType: typeof ethermint_evm_v1_tx_pb.MsgEthereumTxResponse; }; type MsgUpdateParams = { readonly methodName: string; readonly service: typeof Msg; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof ethermint_evm_v1_tx_pb.MsgUpdateParams; readonly responseType: typeof ethermint_evm_v1_tx_pb.MsgUpdateParamsResponse; }; export class Msg { static readonly serviceName: string; static readonly EthereumTx: MsgEthereumTx; static readonly UpdateParams: MsgUpdateParams; } 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); ethereumTx( requestMessage: ethermint_evm_v1_tx_pb.MsgEthereumTx, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: ethermint_evm_v1_tx_pb.MsgEthereumTxResponse|null) => void ): UnaryResponse; ethereumTx( requestMessage: ethermint_evm_v1_tx_pb.MsgEthereumTx, callback: (error: ServiceError|null, responseMessage: ethermint_evm_v1_tx_pb.MsgEthereumTxResponse|null) => void ): UnaryResponse; updateParams( requestMessage: ethermint_evm_v1_tx_pb.MsgUpdateParams, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: ethermint_evm_v1_tx_pb.MsgUpdateParamsResponse|null) => void ): UnaryResponse; updateParams( requestMessage: ethermint_evm_v1_tx_pb.MsgUpdateParams, callback: (error: ServiceError|null, responseMessage: ethermint_evm_v1_tx_pb.MsgUpdateParamsResponse|null) => void ): UnaryResponse; }