@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
178 lines (163 loc) • 8.25 kB
TypeScript
// package: routerprotocol.routerchain.rwasm
// file: routerprotocol/routerchain/rwasm/tx.proto
import * as routerprotocol_routerchain_rwasm_tx_pb from "../../../routerprotocol/routerchain/rwasm/tx_pb";
import {grpc} from "@improbable-eng/grpc-web";
type MsgExecuteCwContract = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgExecuteCwContract;
readonly responseType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgExecuteCwContractResponse;
};
type MsgInstantiateCwContract = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract;
readonly responseType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContractResponse;
};
type MsgCwStoreCode = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgCwStoreCode;
readonly responseType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgCwStoreCodeResponse;
};
type MsgMigrateCwContract = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgMigrateCwContract;
readonly responseType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgMigrateCwContractResponse;
};
type MsgInstantiateCwContract2 = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract2;
readonly responseType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract2Response;
};
type MsgUpdateAdmin = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgUpdateAdmin;
readonly responseType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgUpdateAdminResponse;
};
type MsgClearAdmin = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgClearAdmin;
readonly responseType: typeof routerprotocol_routerchain_rwasm_tx_pb.MsgClearAdminResponse;
};
export class Msg {
static readonly serviceName: string;
static readonly ExecuteCwContract: MsgExecuteCwContract;
static readonly InstantiateCwContract: MsgInstantiateCwContract;
static readonly CwStoreCode: MsgCwStoreCode;
static readonly MigrateCwContract: MsgMigrateCwContract;
static readonly InstantiateCwContract2: MsgInstantiateCwContract2;
static readonly UpdateAdmin: MsgUpdateAdmin;
static readonly ClearAdmin: MsgClearAdmin;
}
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);
executeCwContract(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgExecuteCwContract,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgExecuteCwContractResponse|null) => void
): UnaryResponse;
executeCwContract(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgExecuteCwContract,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgExecuteCwContractResponse|null) => void
): UnaryResponse;
instantiateCwContract(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContractResponse|null) => void
): UnaryResponse;
instantiateCwContract(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContractResponse|null) => void
): UnaryResponse;
cwStoreCode(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgCwStoreCode,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgCwStoreCodeResponse|null) => void
): UnaryResponse;
cwStoreCode(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgCwStoreCode,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgCwStoreCodeResponse|null) => void
): UnaryResponse;
migrateCwContract(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgMigrateCwContract,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgMigrateCwContractResponse|null) => void
): UnaryResponse;
migrateCwContract(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgMigrateCwContract,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgMigrateCwContractResponse|null) => void
): UnaryResponse;
instantiateCwContract2(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract2,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract2Response|null) => void
): UnaryResponse;
instantiateCwContract2(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract2,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgInstantiateCwContract2Response|null) => void
): UnaryResponse;
updateAdmin(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgUpdateAdmin,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgUpdateAdminResponse|null) => void
): UnaryResponse;
updateAdmin(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgUpdateAdmin,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgUpdateAdminResponse|null) => void
): UnaryResponse;
clearAdmin(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgClearAdmin,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgClearAdminResponse|null) => void
): UnaryResponse;
clearAdmin(
requestMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgClearAdmin,
callback: (error: ServiceError|null, responseMessage: routerprotocol_routerchain_rwasm_tx_pb.MsgClearAdminResponse|null) => void
): UnaryResponse;
}