"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryParamsResponse = exports.QueryParamsRequest = void 0;
//@ts-nocheck
const params_1 = require("../../../tendermint/types/params");
const binary_1 = require("../../../binary");
const registry_1 = require("../../../registry");
function createBaseQueryParamsRequest() {
return {};
}
exports.QueryParamsRequest = {
typeUrl: "/cosmos.consensus.v1.QueryParamsRequest",
aminoType: "cosmos-sdk/QueryParamsRequest",
is(o) {
return o && o.$typeUrl === exports.QueryParamsRequest.typeUrl;
},
isSDK(o) {
return o && o.$typeUrl === exports.QueryParamsRequest.typeUrl;
},
isAmino(o) {
return o && o.$typeUrl === exports.QueryParamsRequest.typeUrl;
},
encode(_, writer = binary_1.BinaryWriter.create()) {
return writer;
},
decode(input, length) {
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryParamsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromPartial(_) {
const message = createBaseQueryParamsRequest();
return message;
},
fromAmino(_) {
const message = createBaseQueryParamsRequest();
return message;
},
toAmino(_) {
const obj = {};
return obj;
},
fromAminoMsg(object) {
return exports.QueryParamsRequest.fromAmino(object.value);
},
toAminoMsg(message) {
return {
type: "cosmos-sdk/QueryParamsRequest",
value: exports.QueryParamsRequest.toAmino(message)
};
},
fromProtoMsg(message) {
return exports.QueryParamsRequest.decode(message.value);
},
toProto(message) {
return exports.QueryParamsRequest.encode(message).finish();
},
toProtoMsg(message) {
return {
typeUrl: "/cosmos.consensus.v1.QueryParamsRequest",
value: exports.QueryParamsRequest.encode(message).finish()
};
}
};
registry_1.GlobalDecoderRegistry.register(exports.QueryParamsRequest.typeUrl, exports.QueryParamsRequest);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.QueryParamsRequest.aminoType, exports.QueryParamsRequest.typeUrl);
function createBaseQueryParamsResponse() {
return {
params: undefined
};
}
exports.QueryParamsResponse = {
typeUrl: "/cosmos.consensus.v1.QueryParamsResponse",
aminoType: "cosmos-sdk/QueryParamsResponse",
is(o) {
return o && o.$typeUrl === exports.QueryParamsResponse.typeUrl;
},
isSDK(o) {
return o && o.$typeUrl === exports.QueryParamsResponse.typeUrl;
},
isAmino(o) {
return o && o.$typeUrl === exports.QueryParamsResponse.typeUrl;
},
encode(message, writer = binary_1.BinaryWriter.create()) {
if (message.params !== undefined) {
params_1.ConsensusParams.encode(message.params, writer.uint32(10).fork()).ldelim();
}
return writer;
},
decode(input, length) {
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryParamsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.params = params_1.ConsensusParams.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromPartial(object) {
const message = createBaseQueryParamsResponse();
message.params = object.params !== undefined && object.params !== null ? params_1.ConsensusParams.fromPartial(object.params) : undefined;
return message;
},
fromAmino(object) {
const message = createBaseQueryParamsResponse();
if (object.params !== undefined && object.params !== null) {
message.params = params_1.ConsensusParams.fromAmino(object.params);
}
return message;
},
toAmino(message) {
const obj = {};
obj.params = message.params ? params_1.ConsensusParams.toAmino(message.params) : undefined;
return obj;
},
fromAminoMsg(object) {
return exports.QueryParamsResponse.fromAmino(object.value);
},
toAminoMsg(message) {
return {
type: "cosmos-sdk/QueryParamsResponse",
value: exports.QueryParamsResponse.toAmino(message)
};
},
fromProtoMsg(message) {
return exports.QueryParamsResponse.decode(message.value);
},
toProto(message) {
return exports.QueryParamsResponse.encode(message).finish();
},
toProtoMsg(message) {
return {
typeUrl: "/cosmos.consensus.v1.QueryParamsResponse",
value: exports.QueryParamsResponse.encode(message).finish()
};
}
};
registry_1.GlobalDecoderRegistry.register(exports.QueryParamsResponse.typeUrl, exports.QueryParamsResponse);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.QueryParamsResponse.aminoType, exports.QueryParamsResponse.typeUrl);