UNPKG

@ocap/types

Version:
513 lines (425 loc) 18.9 kB
// package: vendor // file: vendor.proto import * as jspb from "google-protobuf"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; export class KVPair extends jspb.Message { getKey(): Uint8Array | string; getKey_asU8(): Uint8Array; getKey_asB64(): string; setKey(value: Uint8Array | string): void; getValue(): Uint8Array | string; getValue_asU8(): Uint8Array; getValue_asB64(): string; setValue(value: Uint8Array | string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TKVPair; static toObject(includeInstance: boolean, msg: KVPair): TKVPair; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: KVPair, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): KVPair; static deserializeBinaryFromReader(message: KVPair, reader: jspb.BinaryReader): KVPair; } export type TKVPair = { key: Uint8Array | string, value: Uint8Array | string, } export class BlockParams extends jspb.Message { getMaxBytes(): number; setMaxBytes(value: number): void; getMaxGas(): number; setMaxGas(value: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TBlockParams; static toObject(includeInstance: boolean, msg: BlockParams): TBlockParams; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: BlockParams, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): BlockParams; static deserializeBinaryFromReader(message: BlockParams, reader: jspb.BinaryReader): BlockParams; } export type TBlockParams = { maxBytes: number, maxGas: number, } export class EvidenceParams extends jspb.Message { getMaxAge(): number; setMaxAge(value: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TEvidenceParams; static toObject(includeInstance: boolean, msg: EvidenceParams): TEvidenceParams; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: EvidenceParams, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): EvidenceParams; static deserializeBinaryFromReader(message: EvidenceParams, reader: jspb.BinaryReader): EvidenceParams; } export type TEvidenceParams = { maxAge: number, } export class ValidatorParams extends jspb.Message { clearPubKeyTypesList(): void; getPubKeyTypesList(): Array<string>; setPubKeyTypesList(value: Array<string>): void; addPubKeyTypes(value: string, index?: number): string; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TValidatorParams; static toObject(includeInstance: boolean, msg: ValidatorParams): TValidatorParams; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: ValidatorParams, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ValidatorParams; static deserializeBinaryFromReader(message: ValidatorParams, reader: jspb.BinaryReader): ValidatorParams; } export type TValidatorParams = { pubKeyTypes: Array<string>, } export class ConsensusParams extends jspb.Message { hasBlock(): boolean; clearBlock(): void; getBlock(): TBlockParams | undefined; setBlock(value?: TBlockParams): void; hasEvidence(): boolean; clearEvidence(): void; getEvidence(): TEvidenceParams | undefined; setEvidence(value?: TEvidenceParams): void; hasValidator(): boolean; clearValidator(): void; getValidator(): TValidatorParams | undefined; setValidator(value?: TValidatorParams): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TConsensusParams; static toObject(includeInstance: boolean, msg: ConsensusParams): TConsensusParams; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: ConsensusParams, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ConsensusParams; static deserializeBinaryFromReader(message: ConsensusParams, reader: jspb.BinaryReader): ConsensusParams; } export type TConsensusParams = { block?: TBlockParams, evidence?: TEvidenceParams, validator?: TValidatorParams, } export class LastCommitInfo extends jspb.Message { getRound(): number; setRound(value: number): void; clearVotesList(): void; getVotesList(): Array<TVoteInfo>; setVotesList(value: Array<TVoteInfo>): void; addVotes(value?: VoteInfo, index?: number): VoteInfo; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TLastCommitInfo; static toObject(includeInstance: boolean, msg: LastCommitInfo): TLastCommitInfo; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: LastCommitInfo, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): LastCommitInfo; static deserializeBinaryFromReader(message: LastCommitInfo, reader: jspb.BinaryReader): LastCommitInfo; } export type TLastCommitInfo = { round: number, votes: Array<TVoteInfo>, } export class Version extends jspb.Message { getBlock(): number; setBlock(value: number): void; getApp(): number; setApp(value: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TVersion; static toObject(includeInstance: boolean, msg: Version): TVersion; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: Version, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Version; static deserializeBinaryFromReader(message: Version, reader: jspb.BinaryReader): Version; } export type TVersion = { block: number, app: number, } export class BlockID extends jspb.Message { getHash(): Uint8Array | string; getHash_asU8(): Uint8Array; getHash_asB64(): string; setHash(value: Uint8Array | string): void; hasPartsHeader(): boolean; clearPartsHeader(): void; getPartsHeader(): TPartSetHeader | undefined; setPartsHeader(value?: TPartSetHeader): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TBlockID; static toObject(includeInstance: boolean, msg: BlockID): TBlockID; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: BlockID, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): BlockID; static deserializeBinaryFromReader(message: BlockID, reader: jspb.BinaryReader): BlockID; } export type TBlockID = { hash: Uint8Array | string, partsHeader?: TPartSetHeader, } export class PartSetHeader extends jspb.Message { getTotal(): number; setTotal(value: number): void; getHash(): Uint8Array | string; getHash_asU8(): Uint8Array; getHash_asB64(): string; setHash(value: Uint8Array | string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TPartSetHeader; static toObject(includeInstance: boolean, msg: PartSetHeader): TPartSetHeader; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: PartSetHeader, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): PartSetHeader; static deserializeBinaryFromReader(message: PartSetHeader, reader: jspb.BinaryReader): PartSetHeader; } export type TPartSetHeader = { total: number, hash: Uint8Array | string, } export class Validator extends jspb.Message { getAddress(): Uint8Array | string; getAddress_asU8(): Uint8Array; getAddress_asB64(): string; setAddress(value: Uint8Array | string): void; getPower(): number; setPower(value: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TValidator; static toObject(includeInstance: boolean, msg: Validator): TValidator; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: Validator, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Validator; static deserializeBinaryFromReader(message: Validator, reader: jspb.BinaryReader): Validator; } export type TValidator = { address: Uint8Array | string, power: number, } export class ValidatorUpdate extends jspb.Message { hasPubKey(): boolean; clearPubKey(): void; getPubKey(): TPubKey | undefined; setPubKey(value?: TPubKey): void; getPower(): number; setPower(value: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TValidatorUpdate; static toObject(includeInstance: boolean, msg: ValidatorUpdate): TValidatorUpdate; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: ValidatorUpdate, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ValidatorUpdate; static deserializeBinaryFromReader(message: ValidatorUpdate, reader: jspb.BinaryReader): ValidatorUpdate; } export type TValidatorUpdate = { pubKey?: TPubKey, power: number, } export class VoteInfo extends jspb.Message { hasValidator(): boolean; clearValidator(): void; getValidator(): TValidator | undefined; setValidator(value?: TValidator): void; getSignedLastBlock(): boolean; setSignedLastBlock(value: boolean): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TVoteInfo; static toObject(includeInstance: boolean, msg: VoteInfo): TVoteInfo; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: VoteInfo, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): VoteInfo; static deserializeBinaryFromReader(message: VoteInfo, reader: jspb.BinaryReader): VoteInfo; } export type TVoteInfo = { validator?: TValidator, signedLastBlock: boolean, } export class PubKey extends jspb.Message { getType(): string; setType(value: string): void; getData(): Uint8Array | string; getData_asU8(): Uint8Array; getData_asB64(): string; setData(value: Uint8Array | string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TPubKey; static toObject(includeInstance: boolean, msg: PubKey): TPubKey; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: PubKey, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): PubKey; static deserializeBinaryFromReader(message: PubKey, reader: jspb.BinaryReader): PubKey; } export type TPubKey = { type: string, data: Uint8Array | string, } export class Evidence extends jspb.Message { getType(): string; setType(value: string): void; hasValidator(): boolean; clearValidator(): void; getValidator(): TValidator | undefined; setValidator(value?: TValidator): void; getHeight(): number; setHeight(value: number): void; hasTime(): boolean; clearTime(): void; getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; getTotalVotingPower(): number; setTotalVotingPower(value: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TEvidence; static toObject(includeInstance: boolean, msg: Evidence): TEvidence; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: Evidence, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Evidence; static deserializeBinaryFromReader(message: Evidence, reader: jspb.BinaryReader): Evidence; } export type TEvidence = { type: string, validator?: TValidator, height: number, time?: google_protobuf_timestamp_pb.Timestamp, totalVotingPower: number, } export class Header extends jspb.Message { hasVersion(): boolean; clearVersion(): void; getVersion(): TVersion | undefined; setVersion(value?: TVersion): void; getChainId(): string; setChainId(value: string): void; getHeight(): number; setHeight(value: number): void; hasTime(): boolean; clearTime(): void; getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; getNumTxs(): number; setNumTxs(value: number): void; getTotalTxs(): number; setTotalTxs(value: number): void; hasLastBlockId(): boolean; clearLastBlockId(): void; getLastBlockId(): TBlockID | undefined; setLastBlockId(value?: TBlockID): void; getLastCommitHash(): Uint8Array | string; getLastCommitHash_asU8(): Uint8Array; getLastCommitHash_asB64(): string; setLastCommitHash(value: Uint8Array | string): void; getDataHash(): Uint8Array | string; getDataHash_asU8(): Uint8Array; getDataHash_asB64(): string; setDataHash(value: Uint8Array | string): void; getValidatorsHash(): Uint8Array | string; getValidatorsHash_asU8(): Uint8Array; getValidatorsHash_asB64(): string; setValidatorsHash(value: Uint8Array | string): void; getNextValidatorsHash(): Uint8Array | string; getNextValidatorsHash_asU8(): Uint8Array; getNextValidatorsHash_asB64(): string; setNextValidatorsHash(value: Uint8Array | string): void; getConsensusHash(): Uint8Array | string; getConsensusHash_asU8(): Uint8Array; getConsensusHash_asB64(): string; setConsensusHash(value: Uint8Array | string): void; getAppHash(): Uint8Array | string; getAppHash_asU8(): Uint8Array; getAppHash_asB64(): string; setAppHash(value: Uint8Array | string): void; getLastResultsHash(): Uint8Array | string; getLastResultsHash_asU8(): Uint8Array; getLastResultsHash_asB64(): string; setLastResultsHash(value: Uint8Array | string): void; getEvidenceHash(): Uint8Array | string; getEvidenceHash_asU8(): Uint8Array; getEvidenceHash_asB64(): string; setEvidenceHash(value: Uint8Array | string): void; getProposerAddress(): Uint8Array | string; getProposerAddress_asU8(): Uint8Array; getProposerAddress_asB64(): string; setProposerAddress(value: Uint8Array | string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): THeader; static toObject(includeInstance: boolean, msg: Header): THeader; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Header; static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; } export type THeader = { version?: TVersion, chainId: string, height: number, time?: google_protobuf_timestamp_pb.Timestamp, numTxs: number, totalTxs: number, lastBlockId?: TBlockID, lastCommitHash: Uint8Array | string, dataHash: Uint8Array | string, validatorsHash: Uint8Array | string, nextValidatorsHash: Uint8Array | string, consensusHash: Uint8Array | string, appHash: Uint8Array | string, lastResultsHash: Uint8Array | string, evidenceHash: Uint8Array | string, proposerAddress: Uint8Array | string, } export class RequestBeginBlock extends jspb.Message { getHash(): Uint8Array | string; getHash_asU8(): Uint8Array; getHash_asB64(): string; setHash(value: Uint8Array | string): void; hasHeader(): boolean; clearHeader(): void; getHeader(): THeader | undefined; setHeader(value?: THeader): void; hasLastCommitInfo(): boolean; clearLastCommitInfo(): void; getLastCommitInfo(): TLastCommitInfo | undefined; setLastCommitInfo(value?: TLastCommitInfo): void; clearByzantineValidatorsList(): void; getByzantineValidatorsList(): Array<TEvidence>; setByzantineValidatorsList(value: Array<TEvidence>): void; addByzantineValidators(value?: Evidence, index?: number): Evidence; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TRequestBeginBlock; static toObject(includeInstance: boolean, msg: RequestBeginBlock): TRequestBeginBlock; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: RequestBeginBlock, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RequestBeginBlock; static deserializeBinaryFromReader(message: RequestBeginBlock, reader: jspb.BinaryReader): RequestBeginBlock; } export type TRequestBeginBlock = { hash: Uint8Array | string, header?: THeader, lastCommitInfo?: TLastCommitInfo, byzantineValidators: Array<TEvidence>, } export class RequestEndBlock extends jspb.Message { getHeight(): number; setHeight(value: number): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TRequestEndBlock; static toObject(includeInstance: boolean, msg: RequestEndBlock): TRequestEndBlock; static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; static serializeBinaryToWriter(message: RequestEndBlock, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RequestEndBlock; static deserializeBinaryFromReader(message: RequestEndBlock, reader: jspb.BinaryReader): RequestEndBlock; } export type TRequestEndBlock = { height: number, }