import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination"; import { Params, ParamsAmino, ParamsSDKType, ValidatorSigningInfo, ValidatorSigningInfoAmino, ValidatorSigningInfoSDKType } from "./slashing"; import { BinaryWriter } from "../../../binary"; import { isSet } from "../../../helpers"; /** QueryParamsRequest is the request type for the Query/Params RPC method */ export interface QueryParamsRequest {} export interface QueryParamsRequestProtoMsg { typeUrl: "/cosmos.slashing.v1beta1.QueryParamsRequest"; value: Uint8Array; } /** QueryParamsRequest is the request type for the Query/Params RPC method */ export interface QueryParamsRequestAmino {} export interface QueryParamsRequestAminoMsg { type: "cosmos-sdk/QueryParamsRequest"; value: QueryParamsRequestAmino; } /** QueryParamsRequest is the request type for the Query/Params RPC method */ export interface QueryParamsRequestSDKType {} /** QueryParamsResponse is the response type for the Query/Params RPC method */ export interface QueryParamsResponse { params: Params; } export interface QueryParamsResponseProtoMsg { typeUrl: "/cosmos.slashing.v1beta1.QueryParamsResponse"; value: Uint8Array; } /** QueryParamsResponse is the response type for the Query/Params RPC method */ export interface QueryParamsResponseAmino { params?: ParamsAmino; } export interface QueryParamsResponseAminoMsg { type: "cosmos-sdk/QueryParamsResponse"; value: QueryParamsResponseAmino; } /** QueryParamsResponse is the response type for the Query/Params RPC method */ export interface QueryParamsResponseSDKType { params: ParamsSDKType; } /** * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC * method */ export interface QuerySigningInfoRequest { /** cons_address is the address to query signing info of */ consAddress: string; } export interface QuerySigningInfoRequestProtoMsg { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoRequest"; value: Uint8Array; } /** * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC * method */ export interface QuerySigningInfoRequestAmino { /** cons_address is the address to query signing info of */ cons_address?: string; } export interface QuerySigningInfoRequestAminoMsg { type: "cosmos-sdk/QuerySigningInfoRequest"; value: QuerySigningInfoRequestAmino; } /** * QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC * method */ export interface QuerySigningInfoRequestSDKType { cons_address: string; } /** * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC * method */ export interface QuerySigningInfoResponse { /** val_signing_info is the signing info of requested val cons address */ valSigningInfo: ValidatorSigningInfo; } export interface QuerySigningInfoResponseProtoMsg { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoResponse"; value: Uint8Array; } /** * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC * method */ export interface QuerySigningInfoResponseAmino { /** val_signing_info is the signing info of requested val cons address */ val_signing_info?: ValidatorSigningInfoAmino; } export interface QuerySigningInfoResponseAminoMsg { type: "cosmos-sdk/QuerySigningInfoResponse"; value: QuerySigningInfoResponseAmino; } /** * QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC * method */ export interface QuerySigningInfoResponseSDKType { val_signing_info: ValidatorSigningInfoSDKType; } /** * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC * method */ export interface QuerySigningInfosRequest { pagination?: PageRequest; } export interface QuerySigningInfosRequestProtoMsg { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosRequest"; value: Uint8Array; } /** * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC * method */ export interface QuerySigningInfosRequestAmino { pagination?: PageRequestAmino; } export interface QuerySigningInfosRequestAminoMsg { type: "cosmos-sdk/QuerySigningInfosRequest"; value: QuerySigningInfosRequestAmino; } /** * QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC * method */ export interface QuerySigningInfosRequestSDKType { pagination?: PageRequestSDKType; } /** * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC * method */ export interface QuerySigningInfosResponse { /** info is the signing info of all validators */ info: ValidatorSigningInfo[]; pagination?: PageResponse; } export interface QuerySigningInfosResponseProtoMsg { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosResponse"; value: Uint8Array; } /** * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC * method */ export interface QuerySigningInfosResponseAmino { /** info is the signing info of all validators */ info?: ValidatorSigningInfoAmino[]; pagination?: PageResponseAmino; } export interface QuerySigningInfosResponseAminoMsg { type: "cosmos-sdk/QuerySigningInfosResponse"; value: QuerySigningInfosResponseAmino; } /** * QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC * method */ export interface QuerySigningInfosResponseSDKType { info: ValidatorSigningInfoSDKType[]; pagination?: PageResponseSDKType; } function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } export const QueryParamsRequest = { typeUrl: "/cosmos.slashing.v1beta1.QueryParamsRequest", encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, fromJSON(_: any): QueryParamsRequest { return {}; }, fromPartial(_: Partial): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest { const message = createBaseQueryParamsRequest(); return message; }, toAmino(_: QueryParamsRequest): QueryParamsRequestAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest { return QueryParamsRequest.fromAmino(object.value); }, toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg { return { type: "cosmos-sdk/QueryParamsRequest", value: QueryParamsRequest.toAmino(message) }; }, fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest { return QueryParamsRequest.decode(message.value); }, toProto(message: QueryParamsRequest): Uint8Array { return QueryParamsRequest.encode(message).finish(); }, toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg { return { typeUrl: "/cosmos.slashing.v1beta1.QueryParamsRequest", value: QueryParamsRequest.encode(message).finish() }; } }; function createBaseQueryParamsResponse(): QueryParamsResponse { return { params: Params.fromPartial({}) }; } export const QueryParamsResponse = { typeUrl: "/cosmos.slashing.v1beta1.QueryParamsResponse", encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } return writer; }, fromJSON(object: any): QueryParamsResponse { return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, fromPartial(object: Partial): QueryParamsResponse { const message = createBaseQueryParamsResponse(); message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; }, fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse { const message = createBaseQueryParamsResponse(); if (object.params !== undefined && object.params !== null) { message.params = Params.fromAmino(object.params); } return message; }, toAmino(message: QueryParamsResponse): QueryParamsResponseAmino { const obj: any = {}; obj.params = message.params ? Params.toAmino(message.params) : undefined; return obj; }, fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse { return QueryParamsResponse.fromAmino(object.value); }, toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg { return { type: "cosmos-sdk/QueryParamsResponse", value: QueryParamsResponse.toAmino(message) }; }, fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse { return QueryParamsResponse.decode(message.value); }, toProto(message: QueryParamsResponse): Uint8Array { return QueryParamsResponse.encode(message).finish(); }, toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg { return { typeUrl: "/cosmos.slashing.v1beta1.QueryParamsResponse", value: QueryParamsResponse.encode(message).finish() }; } }; function createBaseQuerySigningInfoRequest(): QuerySigningInfoRequest { return { consAddress: "" }; } export const QuerySigningInfoRequest = { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoRequest", encode(message: QuerySigningInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.consAddress !== "") { writer.uint32(10).string(message.consAddress); } return writer; }, fromJSON(object: any): QuerySigningInfoRequest { return { consAddress: isSet(object.consAddress) ? String(object.consAddress) : "" }; }, fromPartial(object: Partial): QuerySigningInfoRequest { const message = createBaseQuerySigningInfoRequest(); message.consAddress = object.consAddress ?? ""; return message; }, fromAmino(object: QuerySigningInfoRequestAmino): QuerySigningInfoRequest { const message = createBaseQuerySigningInfoRequest(); if (object.cons_address !== undefined && object.cons_address !== null) { message.consAddress = object.cons_address; } return message; }, toAmino(message: QuerySigningInfoRequest): QuerySigningInfoRequestAmino { const obj: any = {}; obj.cons_address = message.consAddress === "" ? undefined : message.consAddress; return obj; }, fromAminoMsg(object: QuerySigningInfoRequestAminoMsg): QuerySigningInfoRequest { return QuerySigningInfoRequest.fromAmino(object.value); }, toAminoMsg(message: QuerySigningInfoRequest): QuerySigningInfoRequestAminoMsg { return { type: "cosmos-sdk/QuerySigningInfoRequest", value: QuerySigningInfoRequest.toAmino(message) }; }, fromProtoMsg(message: QuerySigningInfoRequestProtoMsg): QuerySigningInfoRequest { return QuerySigningInfoRequest.decode(message.value); }, toProto(message: QuerySigningInfoRequest): Uint8Array { return QuerySigningInfoRequest.encode(message).finish(); }, toProtoMsg(message: QuerySigningInfoRequest): QuerySigningInfoRequestProtoMsg { return { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoRequest", value: QuerySigningInfoRequest.encode(message).finish() }; } }; function createBaseQuerySigningInfoResponse(): QuerySigningInfoResponse { return { valSigningInfo: ValidatorSigningInfo.fromPartial({}) }; } export const QuerySigningInfoResponse = { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoResponse", encode(message: QuerySigningInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.valSigningInfo !== undefined) { ValidatorSigningInfo.encode(message.valSigningInfo, writer.uint32(10).fork()).ldelim(); } return writer; }, fromJSON(object: any): QuerySigningInfoResponse { return { valSigningInfo: isSet(object.valSigningInfo) ? ValidatorSigningInfo.fromJSON(object.valSigningInfo) : undefined }; }, fromPartial(object: Partial): QuerySigningInfoResponse { const message = createBaseQuerySigningInfoResponse(); message.valSigningInfo = object.valSigningInfo !== undefined && object.valSigningInfo !== null ? ValidatorSigningInfo.fromPartial(object.valSigningInfo) : undefined; return message; }, fromAmino(object: QuerySigningInfoResponseAmino): QuerySigningInfoResponse { const message = createBaseQuerySigningInfoResponse(); if (object.val_signing_info !== undefined && object.val_signing_info !== null) { message.valSigningInfo = ValidatorSigningInfo.fromAmino(object.val_signing_info); } return message; }, toAmino(message: QuerySigningInfoResponse): QuerySigningInfoResponseAmino { const obj: any = {}; obj.val_signing_info = message.valSigningInfo ? ValidatorSigningInfo.toAmino(message.valSigningInfo) : undefined; return obj; }, fromAminoMsg(object: QuerySigningInfoResponseAminoMsg): QuerySigningInfoResponse { return QuerySigningInfoResponse.fromAmino(object.value); }, toAminoMsg(message: QuerySigningInfoResponse): QuerySigningInfoResponseAminoMsg { return { type: "cosmos-sdk/QuerySigningInfoResponse", value: QuerySigningInfoResponse.toAmino(message) }; }, fromProtoMsg(message: QuerySigningInfoResponseProtoMsg): QuerySigningInfoResponse { return QuerySigningInfoResponse.decode(message.value); }, toProto(message: QuerySigningInfoResponse): Uint8Array { return QuerySigningInfoResponse.encode(message).finish(); }, toProtoMsg(message: QuerySigningInfoResponse): QuerySigningInfoResponseProtoMsg { return { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfoResponse", value: QuerySigningInfoResponse.encode(message).finish() }; } }; function createBaseQuerySigningInfosRequest(): QuerySigningInfosRequest { return { pagination: undefined }; } export const QuerySigningInfosRequest = { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosRequest", encode(message: QuerySigningInfosRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, fromJSON(object: any): QuerySigningInfosRequest { return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, fromPartial(object: Partial): QuerySigningInfosRequest { const message = createBaseQuerySigningInfosRequest(); message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; }, fromAmino(object: QuerySigningInfosRequestAmino): QuerySigningInfosRequest { const message = createBaseQuerySigningInfosRequest(); if (object.pagination !== undefined && object.pagination !== null) { message.pagination = PageRequest.fromAmino(object.pagination); } return message; }, toAmino(message: QuerySigningInfosRequest): QuerySigningInfosRequestAmino { const obj: any = {}; obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined; return obj; }, fromAminoMsg(object: QuerySigningInfosRequestAminoMsg): QuerySigningInfosRequest { return QuerySigningInfosRequest.fromAmino(object.value); }, toAminoMsg(message: QuerySigningInfosRequest): QuerySigningInfosRequestAminoMsg { return { type: "cosmos-sdk/QuerySigningInfosRequest", value: QuerySigningInfosRequest.toAmino(message) }; }, fromProtoMsg(message: QuerySigningInfosRequestProtoMsg): QuerySigningInfosRequest { return QuerySigningInfosRequest.decode(message.value); }, toProto(message: QuerySigningInfosRequest): Uint8Array { return QuerySigningInfosRequest.encode(message).finish(); }, toProtoMsg(message: QuerySigningInfosRequest): QuerySigningInfosRequestProtoMsg { return { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosRequest", value: QuerySigningInfosRequest.encode(message).finish() }; } }; function createBaseQuerySigningInfosResponse(): QuerySigningInfosResponse { return { info: [], pagination: undefined }; } export const QuerySigningInfosResponse = { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosResponse", encode(message: QuerySigningInfosResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { for (const v of message.info) { ValidatorSigningInfo.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, fromJSON(object: any): QuerySigningInfosResponse { return { info: Array.isArray(object?.info) ? object.info.map((e: any) => ValidatorSigningInfo.fromJSON(e)) : [], pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, fromPartial(object: Partial): QuerySigningInfosResponse { const message = createBaseQuerySigningInfosResponse(); message.info = object.info?.map(e => ValidatorSigningInfo.fromPartial(e)) || []; message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; }, fromAmino(object: QuerySigningInfosResponseAmino): QuerySigningInfosResponse { const message = createBaseQuerySigningInfosResponse(); message.info = object.info?.map(e => ValidatorSigningInfo.fromAmino(e)) || []; if (object.pagination !== undefined && object.pagination !== null) { message.pagination = PageResponse.fromAmino(object.pagination); } return message; }, toAmino(message: QuerySigningInfosResponse): QuerySigningInfosResponseAmino { const obj: any = {}; if (message.info) { obj.info = message.info.map(e => e ? ValidatorSigningInfo.toAmino(e) : undefined); } else { obj.info = message.info; } obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined; return obj; }, fromAminoMsg(object: QuerySigningInfosResponseAminoMsg): QuerySigningInfosResponse { return QuerySigningInfosResponse.fromAmino(object.value); }, toAminoMsg(message: QuerySigningInfosResponse): QuerySigningInfosResponseAminoMsg { return { type: "cosmos-sdk/QuerySigningInfosResponse", value: QuerySigningInfosResponse.toAmino(message) }; }, fromProtoMsg(message: QuerySigningInfosResponseProtoMsg): QuerySigningInfosResponse { return QuerySigningInfosResponse.decode(message.value); }, toProto(message: QuerySigningInfosResponse): Uint8Array { return QuerySigningInfosResponse.encode(message).finish(); }, toProtoMsg(message: QuerySigningInfosResponse): QuerySigningInfosResponseProtoMsg { return { typeUrl: "/cosmos.slashing.v1beta1.QuerySigningInfosResponse", value: QuerySigningInfosResponse.encode(message).finish() }; } };