UNPKG

@ocap/types

Version:
107 lines (88 loc) 2.07 kB
// package: vendor // file: vendor.proto import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; export type TKVPair = { key: Uint8Array | string, value: Uint8Array | string, } export type TBlockParams = { maxBytes: number, maxGas: number, } export type TEvidenceParams = { maxAge: number, } export type TValidatorParams = { pubKeyTypes: Array<string>, } export type TConsensusParams = { block?: TBlockParams, evidence?: TEvidenceParams, validator?: TValidatorParams, } export type TLastCommitInfo = { round: number, votes: Array<TVoteInfo>, } export type TVersion = { block: number, app: number, } export type TBlockID = { hash: Uint8Array | string, partsHeader?: TPartSetHeader, } export type TPartSetHeader = { total: number, hash: Uint8Array | string, } export type TValidator = { address: Uint8Array | string, power: number, } export type TValidatorUpdate = { pubKey?: TPubKey, power: number, } export type TVoteInfo = { validator?: TValidator, signedLastBlock: boolean, } export type TPubKey = { type: string, data: Uint8Array | string, } export type TEvidence = { type: string, validator?: TValidator, height: number, time?: google_protobuf_timestamp_pb.Timestamp, totalVotingPower: number, } 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 type TRequestBeginBlock = { hash: Uint8Array | string, header?: THeader, lastCommitInfo?: TLastCommitInfo, byzantineValidators: Array<TEvidence>, } export type TRequestEndBlock = { height: number, }