UNPKG

interchainjs

Version:

InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.

435 lines (434 loc) 15.5 kB
import { Duration, DurationAmino } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; import { DeepPartial } from "../../helpers"; /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. * @name ConsensusParams * @package tendermint.types * @see proto type: tendermint.types.ConsensusParams */ export interface ConsensusParams { block?: BlockParams; evidence?: EvidenceParams; validator?: ValidatorParams; version?: VersionParams; abci?: ABCIParams; } export interface ConsensusParamsProtoMsg { typeUrl: "/tendermint.types.ConsensusParams"; value: Uint8Array; } /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. * @name ConsensusParamsAmino * @package tendermint.types * @see proto type: tendermint.types.ConsensusParams */ export interface ConsensusParamsAmino { block?: BlockParamsAmino; evidence?: EvidenceParamsAmino; validator?: ValidatorParamsAmino; version?: VersionParamsAmino; abci?: ABCIParamsAmino; } export interface ConsensusParamsAminoMsg { type: "/tendermint.types.ConsensusParams"; value: ConsensusParamsAmino; } /** * BlockParams contains limits on the block size. * @name BlockParams * @package tendermint.types * @see proto type: tendermint.types.BlockParams */ export interface BlockParams { /** * Max block size, in bytes. * Note: must be greater than 0 */ maxBytes: bigint; /** * Max gas per block. * Note: must be greater or equal to -1 */ maxGas: bigint; } export interface BlockParamsProtoMsg { typeUrl: "/tendermint.types.BlockParams"; value: Uint8Array; } /** * BlockParams contains limits on the block size. * @name BlockParamsAmino * @package tendermint.types * @see proto type: tendermint.types.BlockParams */ export interface BlockParamsAmino { /** * Max block size, in bytes. * Note: must be greater than 0 */ max_bytes: string; /** * Max gas per block. * Note: must be greater or equal to -1 */ max_gas: string; } export interface BlockParamsAminoMsg { type: "/tendermint.types.BlockParams"; value: BlockParamsAmino; } /** * EvidenceParams determine how we handle evidence of malfeasance. * @name EvidenceParams * @package tendermint.types * @see proto type: tendermint.types.EvidenceParams */ export interface EvidenceParams { /** * Max age of evidence, in blocks. * * The basic formula for calculating this is: MaxAgeDuration / {average block * time}. */ maxAgeNumBlocks: bigint; /** * Max age of evidence, in time. * * It should correspond with an app's "unbonding period" or other similar * mechanism for handling [Nothing-At-Stake * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). */ maxAgeDuration: Duration; /** * This sets the maximum size of total evidence in bytes that can be committed in a single block. * and should fall comfortably under the max block bytes. * Default is 1048576 or 1MB */ maxBytes: bigint; } export interface EvidenceParamsProtoMsg { typeUrl: "/tendermint.types.EvidenceParams"; value: Uint8Array; } /** * EvidenceParams determine how we handle evidence of malfeasance. * @name EvidenceParamsAmino * @package tendermint.types * @see proto type: tendermint.types.EvidenceParams */ export interface EvidenceParamsAmino { /** * Max age of evidence, in blocks. * * The basic formula for calculating this is: MaxAgeDuration / {average block * time}. */ max_age_num_blocks: string; /** * Max age of evidence, in time. * * It should correspond with an app's "unbonding period" or other similar * mechanism for handling [Nothing-At-Stake * attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). */ max_age_duration: DurationAmino; /** * This sets the maximum size of total evidence in bytes that can be committed in a single block. * and should fall comfortably under the max block bytes. * Default is 1048576 or 1MB */ max_bytes: string; } export interface EvidenceParamsAminoMsg { type: "/tendermint.types.EvidenceParams"; value: EvidenceParamsAmino; } /** * ValidatorParams restrict the public key types validators can use. * NOTE: uses ABCI pubkey naming, not Amino names. * @name ValidatorParams * @package tendermint.types * @see proto type: tendermint.types.ValidatorParams */ export interface ValidatorParams { pubKeyTypes: string[]; } export interface ValidatorParamsProtoMsg { typeUrl: "/tendermint.types.ValidatorParams"; value: Uint8Array; } /** * ValidatorParams restrict the public key types validators can use. * NOTE: uses ABCI pubkey naming, not Amino names. * @name ValidatorParamsAmino * @package tendermint.types * @see proto type: tendermint.types.ValidatorParams */ export interface ValidatorParamsAmino { pub_key_types: string[]; } export interface ValidatorParamsAminoMsg { type: "/tendermint.types.ValidatorParams"; value: ValidatorParamsAmino; } /** * VersionParams contains the ABCI application version. * @name VersionParams * @package tendermint.types * @see proto type: tendermint.types.VersionParams */ export interface VersionParams { app: bigint; } export interface VersionParamsProtoMsg { typeUrl: "/tendermint.types.VersionParams"; value: Uint8Array; } /** * VersionParams contains the ABCI application version. * @name VersionParamsAmino * @package tendermint.types * @see proto type: tendermint.types.VersionParams */ export interface VersionParamsAmino { app: string; } export interface VersionParamsAminoMsg { type: "/tendermint.types.VersionParams"; value: VersionParamsAmino; } /** * HashedParams is a subset of ConsensusParams. * * It is hashed into the Header.ConsensusHash. * @name HashedParams * @package tendermint.types * @see proto type: tendermint.types.HashedParams */ export interface HashedParams { blockMaxBytes: bigint; blockMaxGas: bigint; } export interface HashedParamsProtoMsg { typeUrl: "/tendermint.types.HashedParams"; value: Uint8Array; } /** * HashedParams is a subset of ConsensusParams. * * It is hashed into the Header.ConsensusHash. * @name HashedParamsAmino * @package tendermint.types * @see proto type: tendermint.types.HashedParams */ export interface HashedParamsAmino { block_max_bytes: string; block_max_gas: string; } export interface HashedParamsAminoMsg { type: "/tendermint.types.HashedParams"; value: HashedParamsAmino; } /** * ABCIParams configure functionality specific to the Application Blockchain Interface. * @name ABCIParams * @package tendermint.types * @see proto type: tendermint.types.ABCIParams */ export interface ABCIParams { /** * vote_extensions_enable_height configures the first height during which * vote extensions will be enabled. During this specified height, and for all * subsequent heights, precommit messages that do not contain valid extension data * will be considered invalid. Prior to this height, vote extensions will not * be used or accepted by validators on the network. * * Once enabled, vote extensions will be created by the application in ExtendVote, * passed to the application for validation in VerifyVoteExtension and given * to the application to use when proposing a block during PrepareProposal. */ voteExtensionsEnableHeight: bigint; } export interface ABCIParamsProtoMsg { typeUrl: "/tendermint.types.ABCIParams"; value: Uint8Array; } /** * ABCIParams configure functionality specific to the Application Blockchain Interface. * @name ABCIParamsAmino * @package tendermint.types * @see proto type: tendermint.types.ABCIParams */ export interface ABCIParamsAmino { /** * vote_extensions_enable_height configures the first height during which * vote extensions will be enabled. During this specified height, and for all * subsequent heights, precommit messages that do not contain valid extension data * will be considered invalid. Prior to this height, vote extensions will not * be used or accepted by validators on the network. * * Once enabled, vote extensions will be created by the application in ExtendVote, * passed to the application for validation in VerifyVoteExtension and given * to the application to use when proposing a block during PrepareProposal. */ vote_extensions_enable_height: string; } export interface ABCIParamsAminoMsg { type: "/tendermint.types.ABCIParams"; value: ABCIParamsAmino; } /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. * @name ConsensusParams * @package tendermint.types * @see proto type: tendermint.types.ConsensusParams */ export declare const ConsensusParams: { typeUrl: string; is(o: any): o is ConsensusParams; isAmino(o: any): o is ConsensusParamsAmino; encode(message: ConsensusParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): ConsensusParams; fromPartial(object: DeepPartial<ConsensusParams>): ConsensusParams; fromAmino(object: ConsensusParamsAmino): ConsensusParams; toAmino(message: ConsensusParams): ConsensusParamsAmino; fromAminoMsg(object: ConsensusParamsAminoMsg): ConsensusParams; fromProtoMsg(message: ConsensusParamsProtoMsg): ConsensusParams; toProto(message: ConsensusParams): Uint8Array; toProtoMsg(message: ConsensusParams): ConsensusParamsProtoMsg; registerTypeUrl(): void; }; /** * BlockParams contains limits on the block size. * @name BlockParams * @package tendermint.types * @see proto type: tendermint.types.BlockParams */ export declare const BlockParams: { typeUrl: string; is(o: any): o is BlockParams; isAmino(o: any): o is BlockParamsAmino; encode(message: BlockParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): BlockParams; fromPartial(object: DeepPartial<BlockParams>): BlockParams; fromAmino(object: BlockParamsAmino): BlockParams; toAmino(message: BlockParams): BlockParamsAmino; fromAminoMsg(object: BlockParamsAminoMsg): BlockParams; fromProtoMsg(message: BlockParamsProtoMsg): BlockParams; toProto(message: BlockParams): Uint8Array; toProtoMsg(message: BlockParams): BlockParamsProtoMsg; registerTypeUrl(): void; }; /** * EvidenceParams determine how we handle evidence of malfeasance. * @name EvidenceParams * @package tendermint.types * @see proto type: tendermint.types.EvidenceParams */ export declare const EvidenceParams: { typeUrl: string; is(o: any): o is EvidenceParams; isAmino(o: any): o is EvidenceParamsAmino; encode(message: EvidenceParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): EvidenceParams; fromPartial(object: DeepPartial<EvidenceParams>): EvidenceParams; fromAmino(object: EvidenceParamsAmino): EvidenceParams; toAmino(message: EvidenceParams): EvidenceParamsAmino; fromAminoMsg(object: EvidenceParamsAminoMsg): EvidenceParams; fromProtoMsg(message: EvidenceParamsProtoMsg): EvidenceParams; toProto(message: EvidenceParams): Uint8Array; toProtoMsg(message: EvidenceParams): EvidenceParamsProtoMsg; registerTypeUrl(): void; }; /** * ValidatorParams restrict the public key types validators can use. * NOTE: uses ABCI pubkey naming, not Amino names. * @name ValidatorParams * @package tendermint.types * @see proto type: tendermint.types.ValidatorParams */ export declare const ValidatorParams: { typeUrl: string; is(o: any): o is ValidatorParams; isAmino(o: any): o is ValidatorParamsAmino; encode(message: ValidatorParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): ValidatorParams; fromPartial(object: DeepPartial<ValidatorParams>): ValidatorParams; fromAmino(object: ValidatorParamsAmino): ValidatorParams; toAmino(message: ValidatorParams): ValidatorParamsAmino; fromAminoMsg(object: ValidatorParamsAminoMsg): ValidatorParams; fromProtoMsg(message: ValidatorParamsProtoMsg): ValidatorParams; toProto(message: ValidatorParams): Uint8Array; toProtoMsg(message: ValidatorParams): ValidatorParamsProtoMsg; registerTypeUrl(): void; }; /** * VersionParams contains the ABCI application version. * @name VersionParams * @package tendermint.types * @see proto type: tendermint.types.VersionParams */ export declare const VersionParams: { typeUrl: string; is(o: any): o is VersionParams; isAmino(o: any): o is VersionParamsAmino; encode(message: VersionParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): VersionParams; fromPartial(object: DeepPartial<VersionParams>): VersionParams; fromAmino(object: VersionParamsAmino): VersionParams; toAmino(message: VersionParams): VersionParamsAmino; fromAminoMsg(object: VersionParamsAminoMsg): VersionParams; fromProtoMsg(message: VersionParamsProtoMsg): VersionParams; toProto(message: VersionParams): Uint8Array; toProtoMsg(message: VersionParams): VersionParamsProtoMsg; registerTypeUrl(): void; }; /** * HashedParams is a subset of ConsensusParams. * * It is hashed into the Header.ConsensusHash. * @name HashedParams * @package tendermint.types * @see proto type: tendermint.types.HashedParams */ export declare const HashedParams: { typeUrl: string; is(o: any): o is HashedParams; isAmino(o: any): o is HashedParamsAmino; encode(message: HashedParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): HashedParams; fromPartial(object: DeepPartial<HashedParams>): HashedParams; fromAmino(object: HashedParamsAmino): HashedParams; toAmino(message: HashedParams): HashedParamsAmino; fromAminoMsg(object: HashedParamsAminoMsg): HashedParams; fromProtoMsg(message: HashedParamsProtoMsg): HashedParams; toProto(message: HashedParams): Uint8Array; toProtoMsg(message: HashedParams): HashedParamsProtoMsg; registerTypeUrl(): void; }; /** * ABCIParams configure functionality specific to the Application Blockchain Interface. * @name ABCIParams * @package tendermint.types * @see proto type: tendermint.types.ABCIParams */ export declare const ABCIParams: { typeUrl: string; is(o: any): o is ABCIParams; isAmino(o: any): o is ABCIParamsAmino; encode(message: ABCIParams, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): ABCIParams; fromPartial(object: DeepPartial<ABCIParams>): ABCIParams; fromAmino(object: ABCIParamsAmino): ABCIParams; toAmino(message: ABCIParams): ABCIParamsAmino; fromAminoMsg(object: ABCIParamsAminoMsg): ABCIParams; fromProtoMsg(message: ABCIParamsProtoMsg): ABCIParams; toProto(message: ABCIParams): Uint8Array; toProtoMsg(message: ABCIParams): ABCIParamsProtoMsg; registerTypeUrl(): void; };