rchain-client-api
Version:
RChain client for node.js, browsers
203 lines (198 loc) • 5.36 kB
Flow
/**
* Flowtype definitions for Either
* Generated by Flowgen from a Typescript Definition
* Flowgen v1.8.0
* Author: [Joar Wilk](http://twitter.com/joarwilk)
* Repo: http://github.com/joarwilk/flowgen
*/
import * as $protobuf from "protobufjs";
export interface IEitherAny {
type_url?: string | null;
value?: Uint8Array | null;
}
declare export class EitherAny implements IEitherAny {
constructor(properties?: IEitherAny): this;
type_url: string;
value: Uint8Array;
static create(properties?: IEitherAny): EitherAny;
static encode(
message: IEitherAny,
writer?: $protobuf.Writer
): $protobuf.Writer;
static encodeDelimited(
message: IEitherAny,
writer?: $protobuf.Writer
): $protobuf.Writer;
static decode(
reader: $protobuf.Reader | Uint8Array,
length?: number
): EitherAny;
static decodeDelimited(reader: $protobuf.Reader | Uint8Array): EitherAny;
static verify(message: {
[k: string]: any
}): string | null;
static fromObject(object: {
[k: string]: any
}): EitherAny;
static toObject(
message: EitherAny,
options?: $protobuf.IConversionOptions
): {
[k: string]: any
};
toJSON(): {
[k: string]: any
};
}
export interface IEitherError {
messages?: string[] | null;
}
declare export class EitherError implements IEitherError {
constructor(properties?: IEitherError): this;
messages: string[];
static create(properties?: IEitherError): EitherError;
static encode(
message: IEitherError,
writer?: $protobuf.Writer
): $protobuf.Writer;
static encodeDelimited(
message: IEitherError,
writer?: $protobuf.Writer
): $protobuf.Writer;
static decode(
reader: $protobuf.Reader | Uint8Array,
length?: number
): EitherError;
static decodeDelimited(reader: $protobuf.Reader | Uint8Array): EitherError;
static verify(message: {
[k: string]: any
}): string | null;
static fromObject(object: {
[k: string]: any
}): EitherError;
static toObject(
message: EitherError,
options?: $protobuf.IConversionOptions
): {
[k: string]: any
};
toJSON(): {
[k: string]: any
};
}
export interface IEitherSuccess {
response?: IEitherAny | null;
}
declare export class EitherSuccess implements IEitherSuccess {
constructor(properties?: IEitherSuccess): this;
response: IEitherAny | null;
static create(properties?: IEitherSuccess): EitherSuccess;
static encode(
message: IEitherSuccess,
writer?: $protobuf.Writer
): $protobuf.Writer;
static encodeDelimited(
message: IEitherSuccess,
writer?: $protobuf.Writer
): $protobuf.Writer;
static decode(
reader: $protobuf.Reader | Uint8Array,
length?: number
): EitherSuccess;
static decodeDelimited(reader: $protobuf.Reader | Uint8Array): EitherSuccess;
static verify(message: {
[k: string]: any
}): string | null;
static fromObject(object: {
[k: string]: any
}): EitherSuccess;
static toObject(
message: EitherSuccess,
options?: $protobuf.IConversionOptions
): {
[k: string]: any
};
toJSON(): {
[k: string]: any
};
}
export interface IEither {
error?: IEitherError | null;
success?: IEitherSuccess | null;
}
declare export class Either implements IEither {
constructor(properties?: IEither): this;
error: IEitherError | null;
success: IEitherSuccess | null;
content: "error" | "success";
static create(properties?: IEither): Either;
static encode(message: IEither, writer?: $protobuf.Writer): $protobuf.Writer;
static encodeDelimited(
message: IEither,
writer?: $protobuf.Writer
): $protobuf.Writer;
static decode(reader: $protobuf.Reader | Uint8Array, length?: number): Either;
static decodeDelimited(reader: $protobuf.Reader | Uint8Array): Either;
static verify(message: {
[k: string]: any
}): string | null;
static fromObject(object: {
[k: string]: any
}): Either;
static toObject(
message: Either,
options?: $protobuf.IConversionOptions
): {
[k: string]: any
};
toJSON(): {
[k: string]: any
};
}
declare var google: typeof npm$namespace$google;
declare var npm$namespace$google: {
protobuf: typeof npm$namespace$google$protobuf
};
declare var npm$namespace$google$protobuf: {
Any: typeof google$protobuf$Any
};
declare interface google$protobuf$IAny {
+type_url?: string | null;
+value?: Uint8Array | null;
}
declare class google$protobuf$Any implements google$protobuf$IAny {
constructor(properties?: google$protobuf$IAny): this;
type_url: string;
value: Uint8Array;
static create(properties?: google$protobuf$IAny): google$protobuf$Any;
static encode(
message: google$protobuf$IAny,
writer?: $protobuf.Writer
): $protobuf.Writer;
static encodeDelimited(
message: google$protobuf$IAny,
writer?: $protobuf.Writer
): $protobuf.Writer;
static decode(
reader: $protobuf.Reader | Uint8Array,
length?: number
): google$protobuf$Any;
static decodeDelimited(
reader: $protobuf.Reader | Uint8Array
): google$protobuf$Any;
static verify(message: {
[k: string]: any
}): string | null;
static fromObject(object: {
[k: string]: any
}): google$protobuf$Any;
static toObject(
message: google$protobuf$Any,
options?: $protobuf.IConversionOptions
): {
[k: string]: any
};
toJSON(): {
[k: string]: any
};
}