//@ts-nocheck import { Duration, DurationAmino, DurationSDKType } from "../../google/protobuf/duration"; import { BinaryReader, BinaryWriter } from "../../binary"; /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. */ 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; } /** * ConsensusParams contains consensus critical parameters that determine the * validity of blocks. */ export interface ConsensusParamsSDKType { block?: BlockParamsSDKType; evidence?: EvidenceParamsSDKType; validator?: ValidatorParamsSDKType; version?: VersionParamsSDKType; abci?: ABCIParamsSDKType; } /** BlockParams contains limits on the block size. */ 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; } /** BlockParams contains limits on the block size. */ export interface BlockParamsSDKType { max_bytes: bigint; max_gas: bigint; } /** EvidenceParams determine how we handle evidence of malfeasance. */ 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; } /** EvidenceParams determine how we handle evidence of malfeasance. */ export interface EvidenceParamsSDKType { max_age_num_blocks: bigint; max_age_duration: DurationSDKType; max_bytes: bigint; } /** * ValidatorParams restrict the public key types validators can use. * NOTE: uses ABCI pubkey naming, not Amino names. */ 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; } /** * ValidatorParams restrict the public key types validators can use. * NOTE: uses ABCI pubkey naming, not Amino names. */ export interface ValidatorParamsSDKType { pub_key_types: string[]; } /** VersionParams contains the ABCI application version. */ 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; } /** VersionParams contains the ABCI application version. */ export interface VersionParamsSDKType { app: bigint; } /** * HashedParams is a subset of ConsensusParams. * * It is hashed into the Header.ConsensusHash. */ 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; } /** * HashedParams is a subset of ConsensusParams. * * It is hashed into the Header.ConsensusHash. */ export interface HashedParamsSDKType { block_max_bytes: bigint; block_max_gas: bigint; } /** ABCIParams configure functionality specific to the Application Blockchain Interface. */ 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; } /** ABCIParams configure functionality specific to the Application Blockchain Interface. */ export interface ABCIParamsSDKType { vote_extensions_enable_height: bigint; } function createBaseConsensusParams(): ConsensusParams { return { block: undefined, evidence: undefined, validator: undefined, version: undefined, abci: undefined }; } export const ConsensusParams = { typeUrl: "/tendermint.types.ConsensusParams", encode(message: ConsensusParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.block !== undefined) { BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim(); } if (message.evidence !== undefined) { EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim(); } if (message.validator !== undefined) { ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim(); } if (message.version !== undefined) { VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim(); } if (message.abci !== undefined) { ABCIParams.encode(message.abci, writer.uint32(42).fork()).ldelim(); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): ConsensusParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConsensusParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.block = BlockParams.decode(reader, reader.uint32()); break; case 2: message.evidence = EvidenceParams.decode(reader, reader.uint32()); break; case 3: message.validator = ValidatorParams.decode(reader, reader.uint32()); break; case 4: message.version = VersionParams.decode(reader, reader.uint32()); break; case 5: message.abci = ABCIParams.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): ConsensusParams { const message = createBaseConsensusParams(); message.block = object.block !== undefined && object.block !== null ? BlockParams.fromPartial(object.block) : undefined; message.evidence = object.evidence !== undefined && object.evidence !== null ? EvidenceParams.fromPartial(object.evidence) : undefined; message.validator = object.validator !== undefined && object.validator !== null ? ValidatorParams.fromPartial(object.validator) : undefined; message.version = object.version !== undefined && object.version !== null ? VersionParams.fromPartial(object.version) : undefined; message.abci = object.abci !== undefined && object.abci !== null ? ABCIParams.fromPartial(object.abci) : undefined; return message; }, fromAmino(object: ConsensusParamsAmino): ConsensusParams { const message = createBaseConsensusParams(); if (object.block !== undefined && object.block !== null) { message.block = BlockParams.fromAmino(object.block); } if (object.evidence !== undefined && object.evidence !== null) { message.evidence = EvidenceParams.fromAmino(object.evidence); } if (object.validator !== undefined && object.validator !== null) { message.validator = ValidatorParams.fromAmino(object.validator); } if (object.version !== undefined && object.version !== null) { message.version = VersionParams.fromAmino(object.version); } if (object.abci !== undefined && object.abci !== null) { message.abci = ABCIParams.fromAmino(object.abci); } return message; }, toAmino(message: ConsensusParams): ConsensusParamsAmino { const obj: any = {}; obj.block = message.block ? BlockParams.toAmino(message.block) : undefined; obj.evidence = message.evidence ? EvidenceParams.toAmino(message.evidence) : undefined; obj.validator = message.validator ? ValidatorParams.toAmino(message.validator) : undefined; obj.version = message.version ? VersionParams.toAmino(message.version) : undefined; obj.abci = message.abci ? ABCIParams.toAmino(message.abci) : undefined; return obj; }, fromAminoMsg(object: ConsensusParamsAminoMsg): ConsensusParams { return ConsensusParams.fromAmino(object.value); }, fromProtoMsg(message: ConsensusParamsProtoMsg): ConsensusParams { return ConsensusParams.decode(message.value); }, toProto(message: ConsensusParams): Uint8Array { return ConsensusParams.encode(message).finish(); }, toProtoMsg(message: ConsensusParams): ConsensusParamsProtoMsg { return { typeUrl: "/tendermint.types.ConsensusParams", value: ConsensusParams.encode(message).finish() }; } }; function createBaseBlockParams(): BlockParams { return { maxBytes: BigInt(0), maxGas: BigInt(0) }; } export const BlockParams = { typeUrl: "/tendermint.types.BlockParams", encode(message: BlockParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.maxBytes !== BigInt(0)) { writer.uint32(8).int64(message.maxBytes); } if (message.maxGas !== BigInt(0)) { writer.uint32(16).int64(message.maxGas); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): BlockParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBlockParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.maxBytes = reader.int64(); break; case 2: message.maxGas = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): BlockParams { const message = createBaseBlockParams(); message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? BigInt(object.maxBytes.toString()) : BigInt(0); message.maxGas = object.maxGas !== undefined && object.maxGas !== null ? BigInt(object.maxGas.toString()) : BigInt(0); return message; }, fromAmino(object: BlockParamsAmino): BlockParams { const message = createBaseBlockParams(); if (object.max_bytes !== undefined && object.max_bytes !== null) { message.maxBytes = BigInt(object.max_bytes); } if (object.max_gas !== undefined && object.max_gas !== null) { message.maxGas = BigInt(object.max_gas); } return message; }, toAmino(message: BlockParams): BlockParamsAmino { const obj: any = {}; obj.max_bytes = message.maxBytes !== BigInt(0) ? message.maxBytes?.toString() : undefined; obj.max_gas = message.maxGas !== BigInt(0) ? message.maxGas?.toString() : undefined; return obj; }, fromAminoMsg(object: BlockParamsAminoMsg): BlockParams { return BlockParams.fromAmino(object.value); }, fromProtoMsg(message: BlockParamsProtoMsg): BlockParams { return BlockParams.decode(message.value); }, toProto(message: BlockParams): Uint8Array { return BlockParams.encode(message).finish(); }, toProtoMsg(message: BlockParams): BlockParamsProtoMsg { return { typeUrl: "/tendermint.types.BlockParams", value: BlockParams.encode(message).finish() }; } }; function createBaseEvidenceParams(): EvidenceParams { return { maxAgeNumBlocks: BigInt(0), maxAgeDuration: Duration.fromPartial({}), maxBytes: BigInt(0) }; } export const EvidenceParams = { typeUrl: "/tendermint.types.EvidenceParams", encode(message: EvidenceParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.maxAgeNumBlocks !== BigInt(0)) { writer.uint32(8).int64(message.maxAgeNumBlocks); } if (message.maxAgeDuration !== undefined) { Duration.encode(message.maxAgeDuration, writer.uint32(18).fork()).ldelim(); } if (message.maxBytes !== BigInt(0)) { writer.uint32(24).int64(message.maxBytes); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): EvidenceParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEvidenceParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.maxAgeNumBlocks = reader.int64(); break; case 2: message.maxAgeDuration = Duration.decode(reader, reader.uint32()); break; case 3: message.maxBytes = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): EvidenceParams { const message = createBaseEvidenceParams(); message.maxAgeNumBlocks = object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null ? BigInt(object.maxAgeNumBlocks.toString()) : BigInt(0); message.maxAgeDuration = object.maxAgeDuration !== undefined && object.maxAgeDuration !== null ? Duration.fromPartial(object.maxAgeDuration) : undefined; message.maxBytes = object.maxBytes !== undefined && object.maxBytes !== null ? BigInt(object.maxBytes.toString()) : BigInt(0); return message; }, fromAmino(object: EvidenceParamsAmino): EvidenceParams { const message = createBaseEvidenceParams(); if (object.max_age_num_blocks !== undefined && object.max_age_num_blocks !== null) { message.maxAgeNumBlocks = BigInt(object.max_age_num_blocks); } if (object.max_age_duration !== undefined && object.max_age_duration !== null) { message.maxAgeDuration = Duration.fromAmino(object.max_age_duration); } if (object.max_bytes !== undefined && object.max_bytes !== null) { message.maxBytes = BigInt(object.max_bytes); } return message; }, toAmino(message: EvidenceParams): EvidenceParamsAmino { const obj: any = {}; obj.max_age_num_blocks = message.maxAgeNumBlocks !== BigInt(0) ? message.maxAgeNumBlocks?.toString() : undefined; obj.max_age_duration = message.maxAgeDuration ? Duration.toAmino(message.maxAgeDuration) : undefined; obj.max_bytes = message.maxBytes !== BigInt(0) ? message.maxBytes?.toString() : undefined; return obj; }, fromAminoMsg(object: EvidenceParamsAminoMsg): EvidenceParams { return EvidenceParams.fromAmino(object.value); }, fromProtoMsg(message: EvidenceParamsProtoMsg): EvidenceParams { return EvidenceParams.decode(message.value); }, toProto(message: EvidenceParams): Uint8Array { return EvidenceParams.encode(message).finish(); }, toProtoMsg(message: EvidenceParams): EvidenceParamsProtoMsg { return { typeUrl: "/tendermint.types.EvidenceParams", value: EvidenceParams.encode(message).finish() }; } }; function createBaseValidatorParams(): ValidatorParams { return { pubKeyTypes: [] }; } export const ValidatorParams = { typeUrl: "/tendermint.types.ValidatorParams", encode(message: ValidatorParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.pubKeyTypes) { writer.uint32(10).string(v!); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): ValidatorParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValidatorParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.pubKeyTypes.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): ValidatorParams { const message = createBaseValidatorParams(); message.pubKeyTypes = object.pubKeyTypes?.map(e => e) || []; return message; }, fromAmino(object: ValidatorParamsAmino): ValidatorParams { const message = createBaseValidatorParams(); message.pubKeyTypes = object.pub_key_types?.map(e => e) || []; return message; }, toAmino(message: ValidatorParams): ValidatorParamsAmino { const obj: any = {}; if (message.pubKeyTypes) { obj.pub_key_types = message.pubKeyTypes.map(e => e); } else { obj.pub_key_types = message.pubKeyTypes; } return obj; }, fromAminoMsg(object: ValidatorParamsAminoMsg): ValidatorParams { return ValidatorParams.fromAmino(object.value); }, fromProtoMsg(message: ValidatorParamsProtoMsg): ValidatorParams { return ValidatorParams.decode(message.value); }, toProto(message: ValidatorParams): Uint8Array { return ValidatorParams.encode(message).finish(); }, toProtoMsg(message: ValidatorParams): ValidatorParamsProtoMsg { return { typeUrl: "/tendermint.types.ValidatorParams", value: ValidatorParams.encode(message).finish() }; } }; function createBaseVersionParams(): VersionParams { return { app: BigInt(0) }; } export const VersionParams = { typeUrl: "/tendermint.types.VersionParams", encode(message: VersionParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.app !== BigInt(0)) { writer.uint32(8).uint64(message.app); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): VersionParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVersionParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.app = reader.uint64(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): VersionParams { const message = createBaseVersionParams(); message.app = object.app !== undefined && object.app !== null ? BigInt(object.app.toString()) : BigInt(0); return message; }, fromAmino(object: VersionParamsAmino): VersionParams { const message = createBaseVersionParams(); if (object.app !== undefined && object.app !== null) { message.app = BigInt(object.app); } return message; }, toAmino(message: VersionParams): VersionParamsAmino { const obj: any = {}; obj.app = message.app !== BigInt(0) ? message.app?.toString() : undefined; return obj; }, fromAminoMsg(object: VersionParamsAminoMsg): VersionParams { return VersionParams.fromAmino(object.value); }, fromProtoMsg(message: VersionParamsProtoMsg): VersionParams { return VersionParams.decode(message.value); }, toProto(message: VersionParams): Uint8Array { return VersionParams.encode(message).finish(); }, toProtoMsg(message: VersionParams): VersionParamsProtoMsg { return { typeUrl: "/tendermint.types.VersionParams", value: VersionParams.encode(message).finish() }; } }; function createBaseHashedParams(): HashedParams { return { blockMaxBytes: BigInt(0), blockMaxGas: BigInt(0) }; } export const HashedParams = { typeUrl: "/tendermint.types.HashedParams", encode(message: HashedParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.blockMaxBytes !== BigInt(0)) { writer.uint32(8).int64(message.blockMaxBytes); } if (message.blockMaxGas !== BigInt(0)) { writer.uint32(16).int64(message.blockMaxGas); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): HashedParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHashedParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.blockMaxBytes = reader.int64(); break; case 2: message.blockMaxGas = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): HashedParams { const message = createBaseHashedParams(); message.blockMaxBytes = object.blockMaxBytes !== undefined && object.blockMaxBytes !== null ? BigInt(object.blockMaxBytes.toString()) : BigInt(0); message.blockMaxGas = object.blockMaxGas !== undefined && object.blockMaxGas !== null ? BigInt(object.blockMaxGas.toString()) : BigInt(0); return message; }, fromAmino(object: HashedParamsAmino): HashedParams { const message = createBaseHashedParams(); if (object.block_max_bytes !== undefined && object.block_max_bytes !== null) { message.blockMaxBytes = BigInt(object.block_max_bytes); } if (object.block_max_gas !== undefined && object.block_max_gas !== null) { message.blockMaxGas = BigInt(object.block_max_gas); } return message; }, toAmino(message: HashedParams): HashedParamsAmino { const obj: any = {}; obj.block_max_bytes = message.blockMaxBytes !== BigInt(0) ? message.blockMaxBytes?.toString() : undefined; obj.block_max_gas = message.blockMaxGas !== BigInt(0) ? message.blockMaxGas?.toString() : undefined; return obj; }, fromAminoMsg(object: HashedParamsAminoMsg): HashedParams { return HashedParams.fromAmino(object.value); }, fromProtoMsg(message: HashedParamsProtoMsg): HashedParams { return HashedParams.decode(message.value); }, toProto(message: HashedParams): Uint8Array { return HashedParams.encode(message).finish(); }, toProtoMsg(message: HashedParams): HashedParamsProtoMsg { return { typeUrl: "/tendermint.types.HashedParams", value: HashedParams.encode(message).finish() }; } }; function createBaseABCIParams(): ABCIParams { return { voteExtensionsEnableHeight: BigInt(0) }; } export const ABCIParams = { typeUrl: "/tendermint.types.ABCIParams", encode(message: ABCIParams, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.voteExtensionsEnableHeight !== BigInt(0)) { writer.uint32(8).int64(message.voteExtensionsEnableHeight); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): ABCIParams { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseABCIParams(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.voteExtensionsEnableHeight = reader.int64(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): ABCIParams { const message = createBaseABCIParams(); message.voteExtensionsEnableHeight = object.voteExtensionsEnableHeight !== undefined && object.voteExtensionsEnableHeight !== null ? BigInt(object.voteExtensionsEnableHeight.toString()) : BigInt(0); return message; }, fromAmino(object: ABCIParamsAmino): ABCIParams { const message = createBaseABCIParams(); if (object.vote_extensions_enable_height !== undefined && object.vote_extensions_enable_height !== null) { message.voteExtensionsEnableHeight = BigInt(object.vote_extensions_enable_height); } return message; }, toAmino(message: ABCIParams): ABCIParamsAmino { const obj: any = {}; obj.vote_extensions_enable_height = message.voteExtensionsEnableHeight !== BigInt(0) ? message.voteExtensionsEnableHeight?.toString() : undefined; return obj; }, fromAminoMsg(object: ABCIParamsAminoMsg): ABCIParams { return ABCIParams.fromAmino(object.value); }, fromProtoMsg(message: ABCIParamsProtoMsg): ABCIParams { return ABCIParams.decode(message.value); }, toProto(message: ABCIParams): Uint8Array { return ABCIParams.encode(message).finish(); }, toProtoMsg(message: ABCIParams): ABCIParamsProtoMsg { return { typeUrl: "/tendermint.types.ABCIParams", value: ABCIParams.encode(message).finish() }; } };