@bandprotocol/bandchain.js
Version:
Library for interacting with BandChain in browser and Node.js environments
102 lines (91 loc) • 4.54 kB
TypeScript
// package: cosmos.vesting.v1beta1
// file: cosmos/vesting/v1beta1/tx.proto
import * as cosmos_vesting_v1beta1_tx_pb from "../../../cosmos/vesting/v1beta1/tx_pb";
import {grpc} from "@improbable-eng/grpc-web";
type MsgCreateVestingAccount = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof cosmos_vesting_v1beta1_tx_pb.MsgCreateVestingAccount;
readonly responseType: typeof cosmos_vesting_v1beta1_tx_pb.MsgCreateVestingAccountResponse;
};
type MsgCreatePermanentLockedAccount = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof cosmos_vesting_v1beta1_tx_pb.MsgCreatePermanentLockedAccount;
readonly responseType: typeof cosmos_vesting_v1beta1_tx_pb.MsgCreatePermanentLockedAccountResponse;
};
type MsgCreatePeriodicVestingAccount = {
readonly methodName: string;
readonly service: typeof Msg;
readonly requestStream: false;
readonly responseStream: false;
readonly requestType: typeof cosmos_vesting_v1beta1_tx_pb.MsgCreatePeriodicVestingAccount;
readonly responseType: typeof cosmos_vesting_v1beta1_tx_pb.MsgCreatePeriodicVestingAccountResponse;
};
export class Msg {
static readonly serviceName: string;
static readonly CreateVestingAccount: MsgCreateVestingAccount;
static readonly CreatePermanentLockedAccount: MsgCreatePermanentLockedAccount;
static readonly CreatePeriodicVestingAccount: MsgCreatePeriodicVestingAccount;
}
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);
createVestingAccount(
requestMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreateVestingAccount,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreateVestingAccountResponse|null) => void
): UnaryResponse;
createVestingAccount(
requestMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreateVestingAccount,
callback: (error: ServiceError|null, responseMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreateVestingAccountResponse|null) => void
): UnaryResponse;
createPermanentLockedAccount(
requestMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePermanentLockedAccount,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePermanentLockedAccountResponse|null) => void
): UnaryResponse;
createPermanentLockedAccount(
requestMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePermanentLockedAccount,
callback: (error: ServiceError|null, responseMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePermanentLockedAccountResponse|null) => void
): UnaryResponse;
createPeriodicVestingAccount(
requestMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePeriodicVestingAccount,
metadata: grpc.Metadata,
callback: (error: ServiceError|null, responseMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePeriodicVestingAccountResponse|null) => void
): UnaryResponse;
createPeriodicVestingAccount(
requestMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePeriodicVestingAccount,
callback: (error: ServiceError|null, responseMessage: cosmos_vesting_v1beta1_tx_pb.MsgCreatePeriodicVestingAccountResponse|null) => void
): UnaryResponse;
}