github.com/cosmos/cosmos-sdk@v0.50.10/x/slashing/types/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/slashing/v1beta1/query.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 _ "github.com/cosmos/cosmos-proto" 10 query "github.com/cosmos/cosmos-sdk/types/query" 11 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 12 _ "github.com/cosmos/gogoproto/gogoproto" 13 grpc1 "github.com/cosmos/gogoproto/grpc" 14 proto "github.com/cosmos/gogoproto/proto" 15 _ "google.golang.org/genproto/googleapis/api/annotations" 16 grpc "google.golang.org/grpc" 17 codes "google.golang.org/grpc/codes" 18 status "google.golang.org/grpc/status" 19 io "io" 20 math "math" 21 math_bits "math/bits" 22 ) 23 24 // Reference imports to suppress errors if they are not otherwise used. 25 var _ = proto.Marshal 26 var _ = fmt.Errorf 27 var _ = math.Inf 28 29 // This is a compile-time assertion to ensure that this generated file 30 // is compatible with the proto package it is being compiled against. 31 // A compilation error at this line likely means your copy of the 32 // proto package needs to be updated. 33 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 34 35 // QueryParamsRequest is the request type for the Query/Params RPC method 36 type QueryParamsRequest struct { 37 } 38 39 func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } 40 func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } 41 func (*QueryParamsRequest) ProtoMessage() {} 42 func (*QueryParamsRequest) Descriptor() ([]byte, []int) { 43 return fileDescriptor_791b11d41a861ed0, []int{0} 44 } 45 func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47 } 48 func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 if deterministic { 50 return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) 51 } else { 52 b = b[:cap(b)] 53 n, err := m.MarshalToSizedBuffer(b) 54 if err != nil { 55 return nil, err 56 } 57 return b[:n], nil 58 } 59 } 60 func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { 61 xxx_messageInfo_QueryParamsRequest.Merge(m, src) 62 } 63 func (m *QueryParamsRequest) XXX_Size() int { 64 return m.Size() 65 } 66 func (m *QueryParamsRequest) XXX_DiscardUnknown() { 67 xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) 68 } 69 70 var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo 71 72 // QueryParamsResponse is the response type for the Query/Params RPC method 73 type QueryParamsResponse struct { 74 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 75 } 76 77 func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } 78 func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } 79 func (*QueryParamsResponse) ProtoMessage() {} 80 func (*QueryParamsResponse) Descriptor() ([]byte, []int) { 81 return fileDescriptor_791b11d41a861ed0, []int{1} 82 } 83 func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 if deterministic { 88 return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) 89 } else { 90 b = b[:cap(b)] 91 n, err := m.MarshalToSizedBuffer(b) 92 if err != nil { 93 return nil, err 94 } 95 return b[:n], nil 96 } 97 } 98 func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_QueryParamsResponse.Merge(m, src) 100 } 101 func (m *QueryParamsResponse) XXX_Size() int { 102 return m.Size() 103 } 104 func (m *QueryParamsResponse) XXX_DiscardUnknown() { 105 xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo 109 110 func (m *QueryParamsResponse) GetParams() Params { 111 if m != nil { 112 return m.Params 113 } 114 return Params{} 115 } 116 117 // QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC 118 // method 119 type QuerySigningInfoRequest struct { 120 // cons_address is the address to query signing info of 121 ConsAddress string `protobuf:"bytes,1,opt,name=cons_address,json=consAddress,proto3" json:"cons_address,omitempty"` 122 } 123 124 func (m *QuerySigningInfoRequest) Reset() { *m = QuerySigningInfoRequest{} } 125 func (m *QuerySigningInfoRequest) String() string { return proto.CompactTextString(m) } 126 func (*QuerySigningInfoRequest) ProtoMessage() {} 127 func (*QuerySigningInfoRequest) Descriptor() ([]byte, []int) { 128 return fileDescriptor_791b11d41a861ed0, []int{2} 129 } 130 func (m *QuerySigningInfoRequest) XXX_Unmarshal(b []byte) error { 131 return m.Unmarshal(b) 132 } 133 func (m *QuerySigningInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 134 if deterministic { 135 return xxx_messageInfo_QuerySigningInfoRequest.Marshal(b, m, deterministic) 136 } else { 137 b = b[:cap(b)] 138 n, err := m.MarshalToSizedBuffer(b) 139 if err != nil { 140 return nil, err 141 } 142 return b[:n], nil 143 } 144 } 145 func (m *QuerySigningInfoRequest) XXX_Merge(src proto.Message) { 146 xxx_messageInfo_QuerySigningInfoRequest.Merge(m, src) 147 } 148 func (m *QuerySigningInfoRequest) XXX_Size() int { 149 return m.Size() 150 } 151 func (m *QuerySigningInfoRequest) XXX_DiscardUnknown() { 152 xxx_messageInfo_QuerySigningInfoRequest.DiscardUnknown(m) 153 } 154 155 var xxx_messageInfo_QuerySigningInfoRequest proto.InternalMessageInfo 156 157 func (m *QuerySigningInfoRequest) GetConsAddress() string { 158 if m != nil { 159 return m.ConsAddress 160 } 161 return "" 162 } 163 164 // QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC 165 // method 166 type QuerySigningInfoResponse struct { 167 // val_signing_info is the signing info of requested val cons address 168 ValSigningInfo ValidatorSigningInfo `protobuf:"bytes,1,opt,name=val_signing_info,json=valSigningInfo,proto3" json:"val_signing_info"` 169 } 170 171 func (m *QuerySigningInfoResponse) Reset() { *m = QuerySigningInfoResponse{} } 172 func (m *QuerySigningInfoResponse) String() string { return proto.CompactTextString(m) } 173 func (*QuerySigningInfoResponse) ProtoMessage() {} 174 func (*QuerySigningInfoResponse) Descriptor() ([]byte, []int) { 175 return fileDescriptor_791b11d41a861ed0, []int{3} 176 } 177 func (m *QuerySigningInfoResponse) XXX_Unmarshal(b []byte) error { 178 return m.Unmarshal(b) 179 } 180 func (m *QuerySigningInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 181 if deterministic { 182 return xxx_messageInfo_QuerySigningInfoResponse.Marshal(b, m, deterministic) 183 } else { 184 b = b[:cap(b)] 185 n, err := m.MarshalToSizedBuffer(b) 186 if err != nil { 187 return nil, err 188 } 189 return b[:n], nil 190 } 191 } 192 func (m *QuerySigningInfoResponse) XXX_Merge(src proto.Message) { 193 xxx_messageInfo_QuerySigningInfoResponse.Merge(m, src) 194 } 195 func (m *QuerySigningInfoResponse) XXX_Size() int { 196 return m.Size() 197 } 198 func (m *QuerySigningInfoResponse) XXX_DiscardUnknown() { 199 xxx_messageInfo_QuerySigningInfoResponse.DiscardUnknown(m) 200 } 201 202 var xxx_messageInfo_QuerySigningInfoResponse proto.InternalMessageInfo 203 204 func (m *QuerySigningInfoResponse) GetValSigningInfo() ValidatorSigningInfo { 205 if m != nil { 206 return m.ValSigningInfo 207 } 208 return ValidatorSigningInfo{} 209 } 210 211 // QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC 212 // method 213 type QuerySigningInfosRequest struct { 214 Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` 215 } 216 217 func (m *QuerySigningInfosRequest) Reset() { *m = QuerySigningInfosRequest{} } 218 func (m *QuerySigningInfosRequest) String() string { return proto.CompactTextString(m) } 219 func (*QuerySigningInfosRequest) ProtoMessage() {} 220 func (*QuerySigningInfosRequest) Descriptor() ([]byte, []int) { 221 return fileDescriptor_791b11d41a861ed0, []int{4} 222 } 223 func (m *QuerySigningInfosRequest) XXX_Unmarshal(b []byte) error { 224 return m.Unmarshal(b) 225 } 226 func (m *QuerySigningInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 227 if deterministic { 228 return xxx_messageInfo_QuerySigningInfosRequest.Marshal(b, m, deterministic) 229 } else { 230 b = b[:cap(b)] 231 n, err := m.MarshalToSizedBuffer(b) 232 if err != nil { 233 return nil, err 234 } 235 return b[:n], nil 236 } 237 } 238 func (m *QuerySigningInfosRequest) XXX_Merge(src proto.Message) { 239 xxx_messageInfo_QuerySigningInfosRequest.Merge(m, src) 240 } 241 func (m *QuerySigningInfosRequest) XXX_Size() int { 242 return m.Size() 243 } 244 func (m *QuerySigningInfosRequest) XXX_DiscardUnknown() { 245 xxx_messageInfo_QuerySigningInfosRequest.DiscardUnknown(m) 246 } 247 248 var xxx_messageInfo_QuerySigningInfosRequest proto.InternalMessageInfo 249 250 func (m *QuerySigningInfosRequest) GetPagination() *query.PageRequest { 251 if m != nil { 252 return m.Pagination 253 } 254 return nil 255 } 256 257 // QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC 258 // method 259 type QuerySigningInfosResponse struct { 260 // info is the signing info of all validators 261 Info []ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"` 262 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 263 } 264 265 func (m *QuerySigningInfosResponse) Reset() { *m = QuerySigningInfosResponse{} } 266 func (m *QuerySigningInfosResponse) String() string { return proto.CompactTextString(m) } 267 func (*QuerySigningInfosResponse) ProtoMessage() {} 268 func (*QuerySigningInfosResponse) Descriptor() ([]byte, []int) { 269 return fileDescriptor_791b11d41a861ed0, []int{5} 270 } 271 func (m *QuerySigningInfosResponse) XXX_Unmarshal(b []byte) error { 272 return m.Unmarshal(b) 273 } 274 func (m *QuerySigningInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 275 if deterministic { 276 return xxx_messageInfo_QuerySigningInfosResponse.Marshal(b, m, deterministic) 277 } else { 278 b = b[:cap(b)] 279 n, err := m.MarshalToSizedBuffer(b) 280 if err != nil { 281 return nil, err 282 } 283 return b[:n], nil 284 } 285 } 286 func (m *QuerySigningInfosResponse) XXX_Merge(src proto.Message) { 287 xxx_messageInfo_QuerySigningInfosResponse.Merge(m, src) 288 } 289 func (m *QuerySigningInfosResponse) XXX_Size() int { 290 return m.Size() 291 } 292 func (m *QuerySigningInfosResponse) XXX_DiscardUnknown() { 293 xxx_messageInfo_QuerySigningInfosResponse.DiscardUnknown(m) 294 } 295 296 var xxx_messageInfo_QuerySigningInfosResponse proto.InternalMessageInfo 297 298 func (m *QuerySigningInfosResponse) GetInfo() []ValidatorSigningInfo { 299 if m != nil { 300 return m.Info 301 } 302 return nil 303 } 304 305 func (m *QuerySigningInfosResponse) GetPagination() *query.PageResponse { 306 if m != nil { 307 return m.Pagination 308 } 309 return nil 310 } 311 312 func init() { 313 proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.slashing.v1beta1.QueryParamsRequest") 314 proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.slashing.v1beta1.QueryParamsResponse") 315 proto.RegisterType((*QuerySigningInfoRequest)(nil), "cosmos.slashing.v1beta1.QuerySigningInfoRequest") 316 proto.RegisterType((*QuerySigningInfoResponse)(nil), "cosmos.slashing.v1beta1.QuerySigningInfoResponse") 317 proto.RegisterType((*QuerySigningInfosRequest)(nil), "cosmos.slashing.v1beta1.QuerySigningInfosRequest") 318 proto.RegisterType((*QuerySigningInfosResponse)(nil), "cosmos.slashing.v1beta1.QuerySigningInfosResponse") 319 } 320 321 func init() { 322 proto.RegisterFile("cosmos/slashing/v1beta1/query.proto", fileDescriptor_791b11d41a861ed0) 323 } 324 325 var fileDescriptor_791b11d41a861ed0 = []byte{ 326 // 572 bytes of a gzipped FileDescriptorProto 327 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x41, 0x6b, 0x13, 0x41, 328 0x14, 0xc7, 0x33, 0xad, 0x06, 0x3a, 0x29, 0xa2, 0x63, 0xa1, 0x6d, 0xd0, 0x8d, 0x5d, 0x21, 0x2d, 329 0xd5, 0xec, 0x98, 0x88, 0x78, 0xf2, 0x60, 0x14, 0x8b, 0xe0, 0x41, 0x53, 0x10, 0xf4, 0xb2, 0xcc, 330 0x26, 0xd3, 0xe9, 0xe0, 0x66, 0x66, 0xbb, 0xb3, 0x09, 0x16, 0xd1, 0x83, 0x67, 0x0f, 0x82, 0x9f, 331 0x41, 0xf0, 0xa8, 0xe2, 0x87, 0xe8, 0xb1, 0xe8, 0xc5, 0x93, 0x48, 0x22, 0x78, 0xf7, 0x13, 0xc8, 332 0xce, 0x4c, 0x92, 0x2d, 0x71, 0x35, 0xc5, 0x4b, 0xb2, 0xbc, 0xf7, 0xfe, 0xef, 0xff, 0x7b, 0x2f, 333 0x6f, 0x03, 0x2f, 0xb6, 0xa5, 0xea, 0x4a, 0x85, 0x55, 0x48, 0xd4, 0x2e, 0x17, 0x0c, 0xf7, 0xeb, 334 0x01, 0x4d, 0x48, 0x1d, 0xef, 0xf5, 0x68, 0xbc, 0xef, 0x45, 0xb1, 0x4c, 0x24, 0x5a, 0x36, 0x45, 335 0xde, 0xa8, 0xc8, 0xb3, 0x45, 0xe5, 0x4d, 0xab, 0x0e, 0x88, 0xa2, 0x46, 0x31, 0xd6, 0x47, 0x84, 336 0x71, 0x41, 0x12, 0x2e, 0x85, 0x69, 0x52, 0x5e, 0x62, 0x92, 0x49, 0xfd, 0x88, 0xd3, 0x27, 0x1b, 337 0x3d, 0xc7, 0xa4, 0x64, 0x21, 0xc5, 0x24, 0xe2, 0x98, 0x08, 0x21, 0x13, 0x2d, 0x51, 0x36, 0x5b, 338 0xcd, 0xa3, 0x1b, 0x93, 0x98, 0xba, 0x55, 0x53, 0xe7, 0x9b, 0xf6, 0x96, 0xd6, 0xa4, 0xce, 0x90, 339 0x2e, 0x17, 0x12, 0xeb, 0x4f, 0x13, 0x72, 0x97, 0x20, 0x7a, 0x90, 0xb2, 0xde, 0x27, 0x31, 0xe9, 340 0xaa, 0x16, 0xdd, 0xeb, 0x51, 0x95, 0xb8, 0x8f, 0xe0, 0xd9, 0x23, 0x51, 0x15, 0x49, 0xa1, 0x28, 341 0x6a, 0xc2, 0x62, 0xa4, 0x23, 0x2b, 0xe0, 0x02, 0xd8, 0x28, 0x35, 0x2a, 0x5e, 0xce, 0x32, 0x3c, 342 0x23, 0x6c, 0x2e, 0x1c, 0x7c, 0xab, 0x14, 0xde, 0xfd, 0x7c, 0xbf, 0x09, 0x5a, 0x56, 0xe9, 0xfa, 343 0x70, 0x59, 0xb7, 0xde, 0xe6, 0x4c, 0x70, 0xc1, 0xee, 0x8a, 0x1d, 0x69, 0x5d, 0xd1, 0x6d, 0xb8, 344 0xd8, 0x96, 0x42, 0xf9, 0xa4, 0xd3, 0x89, 0xa9, 0x32, 0x26, 0x0b, 0xcd, 0xb5, 0xcf, 0x9f, 0x6a, 345 0xe7, 0xad, 0xcf, 0xad, 0x14, 0x43, 0xa8, 0x9e, 0xba, 0x69, 0x4a, 0xb6, 0x93, 0x98, 0x0b, 0xd6, 346 0x2a, 0xa5, 0x32, 0x1b, 0x72, 0x5f, 0xc0, 0x95, 0x69, 0x03, 0x3b, 0x40, 0x00, 0x4f, 0xf7, 0x49, 347 0xe8, 0x2b, 0x93, 0xf2, 0xb9, 0xd8, 0x91, 0x76, 0x94, 0x5a, 0xee, 0x28, 0x0f, 0x49, 0xc8, 0x3b, 348 0x24, 0x91, 0x71, 0xa6, 0x61, 0x76, 0xb0, 0x53, 0x7d, 0x12, 0x66, 0x52, 0x6e, 0x30, 0xed, 0x3f, 349 0xda, 0x2b, 0xba, 0x03, 0xe1, 0xe4, 0x16, 0xac, 0x73, 0x75, 0xe4, 0x9c, 0x1e, 0x8e, 0x67, 0x4e, 350 0x6d, 0xb2, 0x46, 0x46, 0xad, 0xb6, 0x95, 0x51, 0xba, 0x1f, 0x01, 0x5c, 0xfd, 0x83, 0x89, 0x9d, 351 0xf2, 0x1e, 0x3c, 0x61, 0x27, 0x9b, 0xff, 0xaf, 0xc9, 0x74, 0x17, 0xb4, 0x75, 0x84, 0x79, 0x4e, 352 0x33, 0xaf, 0xff, 0x93, 0xd9, 0xa0, 0x64, 0xa1, 0x1b, 0xbf, 0xe6, 0xe1, 0x49, 0x0d, 0x8d, 0x5e, 353 0x01, 0x58, 0x34, 0x17, 0x82, 0x2e, 0xe5, 0xd2, 0x4d, 0x9f, 0x65, 0xf9, 0xf2, 0x6c, 0xc5, 0xc6, 354 0xdb, 0x5d, 0x7f, 0xf9, 0xe5, 0xc7, 0x9b, 0xb9, 0x35, 0x54, 0xc1, 0x79, 0x6f, 0x8e, 0x39, 0x49, 355 0xf4, 0x01, 0xc0, 0x52, 0x66, 0x05, 0xe8, 0xca, 0xdf, 0x6d, 0xa6, 0x2f, 0xb7, 0x5c, 0x3f, 0x86, 356 0xc2, 0xd2, 0xdd, 0xd0, 0x74, 0xd7, 0xd1, 0xb5, 0x5c, 0xba, 0xec, 0x95, 0x2a, 0xfc, 0x2c, 0xfb, 357 0x6a, 0x3c, 0x47, 0x6f, 0x01, 0x5c, 0xcc, 0xfe, 0xf8, 0x68, 0x76, 0x84, 0xf1, 0x3a, 0x1b, 0xc7, 358 0x91, 0x58, 0x6c, 0x4f, 0x63, 0x6f, 0xa0, 0xea, 0x6c, 0xd8, 0xcd, 0xad, 0x83, 0x81, 0x03, 0x0e, 359 0x07, 0x0e, 0xf8, 0x3e, 0x70, 0xc0, 0xeb, 0xa1, 0x53, 0x38, 0x1c, 0x3a, 0x85, 0xaf, 0x43, 0xa7, 360 0xf0, 0xb8, 0xc6, 0x78, 0xb2, 0xdb, 0x0b, 0xbc, 0xb6, 0xec, 0x8e, 0x7a, 0x99, 0xaf, 0x9a, 0xea, 361 0x3c, 0xc1, 0x4f, 0x27, 0x8d, 0x93, 0xfd, 0x88, 0xaa, 0xa0, 0xa8, 0xff, 0xaf, 0xae, 0xfe, 0x0e, 362 0x00, 0x00, 0xff, 0xff, 0x19, 0x13, 0x5a, 0xf6, 0xa5, 0x05, 0x00, 0x00, 363 } 364 365 // Reference imports to suppress errors if they are not otherwise used. 366 var _ context.Context 367 var _ grpc.ClientConn 368 369 // This is a compile-time assertion to ensure that this generated file 370 // is compatible with the grpc package it is being compiled against. 371 const _ = grpc.SupportPackageIsVersion4 372 373 // QueryClient is the client API for Query service. 374 // 375 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 376 type QueryClient interface { 377 // Params queries the parameters of slashing module 378 Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) 379 // SigningInfo queries the signing info of given cons address 380 SigningInfo(ctx context.Context, in *QuerySigningInfoRequest, opts ...grpc.CallOption) (*QuerySigningInfoResponse, error) 381 // SigningInfos queries signing info of all validators 382 SigningInfos(ctx context.Context, in *QuerySigningInfosRequest, opts ...grpc.CallOption) (*QuerySigningInfosResponse, error) 383 } 384 385 type queryClient struct { 386 cc grpc1.ClientConn 387 } 388 389 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 390 return &queryClient{cc} 391 } 392 393 func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { 394 out := new(QueryParamsResponse) 395 err := c.cc.Invoke(ctx, "/cosmos.slashing.v1beta1.Query/Params", in, out, opts...) 396 if err != nil { 397 return nil, err 398 } 399 return out, nil 400 } 401 402 func (c *queryClient) SigningInfo(ctx context.Context, in *QuerySigningInfoRequest, opts ...grpc.CallOption) (*QuerySigningInfoResponse, error) { 403 out := new(QuerySigningInfoResponse) 404 err := c.cc.Invoke(ctx, "/cosmos.slashing.v1beta1.Query/SigningInfo", in, out, opts...) 405 if err != nil { 406 return nil, err 407 } 408 return out, nil 409 } 410 411 func (c *queryClient) SigningInfos(ctx context.Context, in *QuerySigningInfosRequest, opts ...grpc.CallOption) (*QuerySigningInfosResponse, error) { 412 out := new(QuerySigningInfosResponse) 413 err := c.cc.Invoke(ctx, "/cosmos.slashing.v1beta1.Query/SigningInfos", in, out, opts...) 414 if err != nil { 415 return nil, err 416 } 417 return out, nil 418 } 419 420 // QueryServer is the server API for Query service. 421 type QueryServer interface { 422 // Params queries the parameters of slashing module 423 Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) 424 // SigningInfo queries the signing info of given cons address 425 SigningInfo(context.Context, *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error) 426 // SigningInfos queries signing info of all validators 427 SigningInfos(context.Context, *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error) 428 } 429 430 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 431 type UnimplementedQueryServer struct { 432 } 433 434 func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { 435 return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") 436 } 437 func (*UnimplementedQueryServer) SigningInfo(ctx context.Context, req *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error) { 438 return nil, status.Errorf(codes.Unimplemented, "method SigningInfo not implemented") 439 } 440 func (*UnimplementedQueryServer) SigningInfos(ctx context.Context, req *QuerySigningInfosRequest) (*QuerySigningInfosResponse, error) { 441 return nil, status.Errorf(codes.Unimplemented, "method SigningInfos not implemented") 442 } 443 444 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 445 s.RegisterService(&_Query_serviceDesc, srv) 446 } 447 448 func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 449 in := new(QueryParamsRequest) 450 if err := dec(in); err != nil { 451 return nil, err 452 } 453 if interceptor == nil { 454 return srv.(QueryServer).Params(ctx, in) 455 } 456 info := &grpc.UnaryServerInfo{ 457 Server: srv, 458 FullMethod: "/cosmos.slashing.v1beta1.Query/Params", 459 } 460 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 461 return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) 462 } 463 return interceptor(ctx, in, info, handler) 464 } 465 466 func _Query_SigningInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 467 in := new(QuerySigningInfoRequest) 468 if err := dec(in); err != nil { 469 return nil, err 470 } 471 if interceptor == nil { 472 return srv.(QueryServer).SigningInfo(ctx, in) 473 } 474 info := &grpc.UnaryServerInfo{ 475 Server: srv, 476 FullMethod: "/cosmos.slashing.v1beta1.Query/SigningInfo", 477 } 478 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 479 return srv.(QueryServer).SigningInfo(ctx, req.(*QuerySigningInfoRequest)) 480 } 481 return interceptor(ctx, in, info, handler) 482 } 483 484 func _Query_SigningInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 485 in := new(QuerySigningInfosRequest) 486 if err := dec(in); err != nil { 487 return nil, err 488 } 489 if interceptor == nil { 490 return srv.(QueryServer).SigningInfos(ctx, in) 491 } 492 info := &grpc.UnaryServerInfo{ 493 Server: srv, 494 FullMethod: "/cosmos.slashing.v1beta1.Query/SigningInfos", 495 } 496 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 497 return srv.(QueryServer).SigningInfos(ctx, req.(*QuerySigningInfosRequest)) 498 } 499 return interceptor(ctx, in, info, handler) 500 } 501 502 var _Query_serviceDesc = grpc.ServiceDesc{ 503 ServiceName: "cosmos.slashing.v1beta1.Query", 504 HandlerType: (*QueryServer)(nil), 505 Methods: []grpc.MethodDesc{ 506 { 507 MethodName: "Params", 508 Handler: _Query_Params_Handler, 509 }, 510 { 511 MethodName: "SigningInfo", 512 Handler: _Query_SigningInfo_Handler, 513 }, 514 { 515 MethodName: "SigningInfos", 516 Handler: _Query_SigningInfos_Handler, 517 }, 518 }, 519 Streams: []grpc.StreamDesc{}, 520 Metadata: "cosmos/slashing/v1beta1/query.proto", 521 } 522 523 func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { 524 size := m.Size() 525 dAtA = make([]byte, size) 526 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 527 if err != nil { 528 return nil, err 529 } 530 return dAtA[:n], nil 531 } 532 533 func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { 534 size := m.Size() 535 return m.MarshalToSizedBuffer(dAtA[:size]) 536 } 537 538 func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 539 i := len(dAtA) 540 _ = i 541 var l int 542 _ = l 543 return len(dAtA) - i, nil 544 } 545 546 func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { 547 size := m.Size() 548 dAtA = make([]byte, size) 549 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 550 if err != nil { 551 return nil, err 552 } 553 return dAtA[:n], nil 554 } 555 556 func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { 557 size := m.Size() 558 return m.MarshalToSizedBuffer(dAtA[:size]) 559 } 560 561 func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 562 i := len(dAtA) 563 _ = i 564 var l int 565 _ = l 566 { 567 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 568 if err != nil { 569 return 0, err 570 } 571 i -= size 572 i = encodeVarintQuery(dAtA, i, uint64(size)) 573 } 574 i-- 575 dAtA[i] = 0xa 576 return len(dAtA) - i, nil 577 } 578 579 func (m *QuerySigningInfoRequest) Marshal() (dAtA []byte, err error) { 580 size := m.Size() 581 dAtA = make([]byte, size) 582 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 583 if err != nil { 584 return nil, err 585 } 586 return dAtA[:n], nil 587 } 588 589 func (m *QuerySigningInfoRequest) MarshalTo(dAtA []byte) (int, error) { 590 size := m.Size() 591 return m.MarshalToSizedBuffer(dAtA[:size]) 592 } 593 594 func (m *QuerySigningInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 595 i := len(dAtA) 596 _ = i 597 var l int 598 _ = l 599 if len(m.ConsAddress) > 0 { 600 i -= len(m.ConsAddress) 601 copy(dAtA[i:], m.ConsAddress) 602 i = encodeVarintQuery(dAtA, i, uint64(len(m.ConsAddress))) 603 i-- 604 dAtA[i] = 0xa 605 } 606 return len(dAtA) - i, nil 607 } 608 609 func (m *QuerySigningInfoResponse) Marshal() (dAtA []byte, err error) { 610 size := m.Size() 611 dAtA = make([]byte, size) 612 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 613 if err != nil { 614 return nil, err 615 } 616 return dAtA[:n], nil 617 } 618 619 func (m *QuerySigningInfoResponse) MarshalTo(dAtA []byte) (int, error) { 620 size := m.Size() 621 return m.MarshalToSizedBuffer(dAtA[:size]) 622 } 623 624 func (m *QuerySigningInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 625 i := len(dAtA) 626 _ = i 627 var l int 628 _ = l 629 { 630 size, err := m.ValSigningInfo.MarshalToSizedBuffer(dAtA[:i]) 631 if err != nil { 632 return 0, err 633 } 634 i -= size 635 i = encodeVarintQuery(dAtA, i, uint64(size)) 636 } 637 i-- 638 dAtA[i] = 0xa 639 return len(dAtA) - i, nil 640 } 641 642 func (m *QuerySigningInfosRequest) Marshal() (dAtA []byte, err error) { 643 size := m.Size() 644 dAtA = make([]byte, size) 645 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 646 if err != nil { 647 return nil, err 648 } 649 return dAtA[:n], nil 650 } 651 652 func (m *QuerySigningInfosRequest) MarshalTo(dAtA []byte) (int, error) { 653 size := m.Size() 654 return m.MarshalToSizedBuffer(dAtA[:size]) 655 } 656 657 func (m *QuerySigningInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 658 i := len(dAtA) 659 _ = i 660 var l int 661 _ = l 662 if m.Pagination != nil { 663 { 664 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 665 if err != nil { 666 return 0, err 667 } 668 i -= size 669 i = encodeVarintQuery(dAtA, i, uint64(size)) 670 } 671 i-- 672 dAtA[i] = 0xa 673 } 674 return len(dAtA) - i, nil 675 } 676 677 func (m *QuerySigningInfosResponse) Marshal() (dAtA []byte, err error) { 678 size := m.Size() 679 dAtA = make([]byte, size) 680 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 681 if err != nil { 682 return nil, err 683 } 684 return dAtA[:n], nil 685 } 686 687 func (m *QuerySigningInfosResponse) MarshalTo(dAtA []byte) (int, error) { 688 size := m.Size() 689 return m.MarshalToSizedBuffer(dAtA[:size]) 690 } 691 692 func (m *QuerySigningInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 693 i := len(dAtA) 694 _ = i 695 var l int 696 _ = l 697 if m.Pagination != nil { 698 { 699 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 700 if err != nil { 701 return 0, err 702 } 703 i -= size 704 i = encodeVarintQuery(dAtA, i, uint64(size)) 705 } 706 i-- 707 dAtA[i] = 0x12 708 } 709 if len(m.Info) > 0 { 710 for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { 711 { 712 size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 713 if err != nil { 714 return 0, err 715 } 716 i -= size 717 i = encodeVarintQuery(dAtA, i, uint64(size)) 718 } 719 i-- 720 dAtA[i] = 0xa 721 } 722 } 723 return len(dAtA) - i, nil 724 } 725 726 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 727 offset -= sovQuery(v) 728 base := offset 729 for v >= 1<<7 { 730 dAtA[offset] = uint8(v&0x7f | 0x80) 731 v >>= 7 732 offset++ 733 } 734 dAtA[offset] = uint8(v) 735 return base 736 } 737 func (m *QueryParamsRequest) Size() (n int) { 738 if m == nil { 739 return 0 740 } 741 var l int 742 _ = l 743 return n 744 } 745 746 func (m *QueryParamsResponse) Size() (n int) { 747 if m == nil { 748 return 0 749 } 750 var l int 751 _ = l 752 l = m.Params.Size() 753 n += 1 + l + sovQuery(uint64(l)) 754 return n 755 } 756 757 func (m *QuerySigningInfoRequest) Size() (n int) { 758 if m == nil { 759 return 0 760 } 761 var l int 762 _ = l 763 l = len(m.ConsAddress) 764 if l > 0 { 765 n += 1 + l + sovQuery(uint64(l)) 766 } 767 return n 768 } 769 770 func (m *QuerySigningInfoResponse) Size() (n int) { 771 if m == nil { 772 return 0 773 } 774 var l int 775 _ = l 776 l = m.ValSigningInfo.Size() 777 n += 1 + l + sovQuery(uint64(l)) 778 return n 779 } 780 781 func (m *QuerySigningInfosRequest) Size() (n int) { 782 if m == nil { 783 return 0 784 } 785 var l int 786 _ = l 787 if m.Pagination != nil { 788 l = m.Pagination.Size() 789 n += 1 + l + sovQuery(uint64(l)) 790 } 791 return n 792 } 793 794 func (m *QuerySigningInfosResponse) Size() (n int) { 795 if m == nil { 796 return 0 797 } 798 var l int 799 _ = l 800 if len(m.Info) > 0 { 801 for _, e := range m.Info { 802 l = e.Size() 803 n += 1 + l + sovQuery(uint64(l)) 804 } 805 } 806 if m.Pagination != nil { 807 l = m.Pagination.Size() 808 n += 1 + l + sovQuery(uint64(l)) 809 } 810 return n 811 } 812 813 func sovQuery(x uint64) (n int) { 814 return (math_bits.Len64(x|1) + 6) / 7 815 } 816 func sozQuery(x uint64) (n int) { 817 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 818 } 819 func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { 820 l := len(dAtA) 821 iNdEx := 0 822 for iNdEx < l { 823 preIndex := iNdEx 824 var wire uint64 825 for shift := uint(0); ; shift += 7 { 826 if shift >= 64 { 827 return ErrIntOverflowQuery 828 } 829 if iNdEx >= l { 830 return io.ErrUnexpectedEOF 831 } 832 b := dAtA[iNdEx] 833 iNdEx++ 834 wire |= uint64(b&0x7F) << shift 835 if b < 0x80 { 836 break 837 } 838 } 839 fieldNum := int32(wire >> 3) 840 wireType := int(wire & 0x7) 841 if wireType == 4 { 842 return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") 843 } 844 if fieldNum <= 0 { 845 return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 846 } 847 switch fieldNum { 848 default: 849 iNdEx = preIndex 850 skippy, err := skipQuery(dAtA[iNdEx:]) 851 if err != nil { 852 return err 853 } 854 if (skippy < 0) || (iNdEx+skippy) < 0 { 855 return ErrInvalidLengthQuery 856 } 857 if (iNdEx + skippy) > l { 858 return io.ErrUnexpectedEOF 859 } 860 iNdEx += skippy 861 } 862 } 863 864 if iNdEx > l { 865 return io.ErrUnexpectedEOF 866 } 867 return nil 868 } 869 func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { 870 l := len(dAtA) 871 iNdEx := 0 872 for iNdEx < l { 873 preIndex := iNdEx 874 var wire uint64 875 for shift := uint(0); ; shift += 7 { 876 if shift >= 64 { 877 return ErrIntOverflowQuery 878 } 879 if iNdEx >= l { 880 return io.ErrUnexpectedEOF 881 } 882 b := dAtA[iNdEx] 883 iNdEx++ 884 wire |= uint64(b&0x7F) << shift 885 if b < 0x80 { 886 break 887 } 888 } 889 fieldNum := int32(wire >> 3) 890 wireType := int(wire & 0x7) 891 if wireType == 4 { 892 return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") 893 } 894 if fieldNum <= 0 { 895 return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 896 } 897 switch fieldNum { 898 case 1: 899 if wireType != 2 { 900 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 901 } 902 var msglen int 903 for shift := uint(0); ; shift += 7 { 904 if shift >= 64 { 905 return ErrIntOverflowQuery 906 } 907 if iNdEx >= l { 908 return io.ErrUnexpectedEOF 909 } 910 b := dAtA[iNdEx] 911 iNdEx++ 912 msglen |= int(b&0x7F) << shift 913 if b < 0x80 { 914 break 915 } 916 } 917 if msglen < 0 { 918 return ErrInvalidLengthQuery 919 } 920 postIndex := iNdEx + msglen 921 if postIndex < 0 { 922 return ErrInvalidLengthQuery 923 } 924 if postIndex > l { 925 return io.ErrUnexpectedEOF 926 } 927 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 928 return err 929 } 930 iNdEx = postIndex 931 default: 932 iNdEx = preIndex 933 skippy, err := skipQuery(dAtA[iNdEx:]) 934 if err != nil { 935 return err 936 } 937 if (skippy < 0) || (iNdEx+skippy) < 0 { 938 return ErrInvalidLengthQuery 939 } 940 if (iNdEx + skippy) > l { 941 return io.ErrUnexpectedEOF 942 } 943 iNdEx += skippy 944 } 945 } 946 947 if iNdEx > l { 948 return io.ErrUnexpectedEOF 949 } 950 return nil 951 } 952 func (m *QuerySigningInfoRequest) Unmarshal(dAtA []byte) error { 953 l := len(dAtA) 954 iNdEx := 0 955 for iNdEx < l { 956 preIndex := iNdEx 957 var wire uint64 958 for shift := uint(0); ; shift += 7 { 959 if shift >= 64 { 960 return ErrIntOverflowQuery 961 } 962 if iNdEx >= l { 963 return io.ErrUnexpectedEOF 964 } 965 b := dAtA[iNdEx] 966 iNdEx++ 967 wire |= uint64(b&0x7F) << shift 968 if b < 0x80 { 969 break 970 } 971 } 972 fieldNum := int32(wire >> 3) 973 wireType := int(wire & 0x7) 974 if wireType == 4 { 975 return fmt.Errorf("proto: QuerySigningInfoRequest: wiretype end group for non-group") 976 } 977 if fieldNum <= 0 { 978 return fmt.Errorf("proto: QuerySigningInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) 979 } 980 switch fieldNum { 981 case 1: 982 if wireType != 2 { 983 return fmt.Errorf("proto: wrong wireType = %d for field ConsAddress", wireType) 984 } 985 var stringLen uint64 986 for shift := uint(0); ; shift += 7 { 987 if shift >= 64 { 988 return ErrIntOverflowQuery 989 } 990 if iNdEx >= l { 991 return io.ErrUnexpectedEOF 992 } 993 b := dAtA[iNdEx] 994 iNdEx++ 995 stringLen |= uint64(b&0x7F) << shift 996 if b < 0x80 { 997 break 998 } 999 } 1000 intStringLen := int(stringLen) 1001 if intStringLen < 0 { 1002 return ErrInvalidLengthQuery 1003 } 1004 postIndex := iNdEx + intStringLen 1005 if postIndex < 0 { 1006 return ErrInvalidLengthQuery 1007 } 1008 if postIndex > l { 1009 return io.ErrUnexpectedEOF 1010 } 1011 m.ConsAddress = string(dAtA[iNdEx:postIndex]) 1012 iNdEx = postIndex 1013 default: 1014 iNdEx = preIndex 1015 skippy, err := skipQuery(dAtA[iNdEx:]) 1016 if err != nil { 1017 return err 1018 } 1019 if (skippy < 0) || (iNdEx+skippy) < 0 { 1020 return ErrInvalidLengthQuery 1021 } 1022 if (iNdEx + skippy) > l { 1023 return io.ErrUnexpectedEOF 1024 } 1025 iNdEx += skippy 1026 } 1027 } 1028 1029 if iNdEx > l { 1030 return io.ErrUnexpectedEOF 1031 } 1032 return nil 1033 } 1034 func (m *QuerySigningInfoResponse) Unmarshal(dAtA []byte) error { 1035 l := len(dAtA) 1036 iNdEx := 0 1037 for iNdEx < l { 1038 preIndex := iNdEx 1039 var wire uint64 1040 for shift := uint(0); ; shift += 7 { 1041 if shift >= 64 { 1042 return ErrIntOverflowQuery 1043 } 1044 if iNdEx >= l { 1045 return io.ErrUnexpectedEOF 1046 } 1047 b := dAtA[iNdEx] 1048 iNdEx++ 1049 wire |= uint64(b&0x7F) << shift 1050 if b < 0x80 { 1051 break 1052 } 1053 } 1054 fieldNum := int32(wire >> 3) 1055 wireType := int(wire & 0x7) 1056 if wireType == 4 { 1057 return fmt.Errorf("proto: QuerySigningInfoResponse: wiretype end group for non-group") 1058 } 1059 if fieldNum <= 0 { 1060 return fmt.Errorf("proto: QuerySigningInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1061 } 1062 switch fieldNum { 1063 case 1: 1064 if wireType != 2 { 1065 return fmt.Errorf("proto: wrong wireType = %d for field ValSigningInfo", wireType) 1066 } 1067 var msglen int 1068 for shift := uint(0); ; shift += 7 { 1069 if shift >= 64 { 1070 return ErrIntOverflowQuery 1071 } 1072 if iNdEx >= l { 1073 return io.ErrUnexpectedEOF 1074 } 1075 b := dAtA[iNdEx] 1076 iNdEx++ 1077 msglen |= int(b&0x7F) << shift 1078 if b < 0x80 { 1079 break 1080 } 1081 } 1082 if msglen < 0 { 1083 return ErrInvalidLengthQuery 1084 } 1085 postIndex := iNdEx + msglen 1086 if postIndex < 0 { 1087 return ErrInvalidLengthQuery 1088 } 1089 if postIndex > l { 1090 return io.ErrUnexpectedEOF 1091 } 1092 if err := m.ValSigningInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1093 return err 1094 } 1095 iNdEx = postIndex 1096 default: 1097 iNdEx = preIndex 1098 skippy, err := skipQuery(dAtA[iNdEx:]) 1099 if err != nil { 1100 return err 1101 } 1102 if (skippy < 0) || (iNdEx+skippy) < 0 { 1103 return ErrInvalidLengthQuery 1104 } 1105 if (iNdEx + skippy) > l { 1106 return io.ErrUnexpectedEOF 1107 } 1108 iNdEx += skippy 1109 } 1110 } 1111 1112 if iNdEx > l { 1113 return io.ErrUnexpectedEOF 1114 } 1115 return nil 1116 } 1117 func (m *QuerySigningInfosRequest) Unmarshal(dAtA []byte) error { 1118 l := len(dAtA) 1119 iNdEx := 0 1120 for iNdEx < l { 1121 preIndex := iNdEx 1122 var wire uint64 1123 for shift := uint(0); ; shift += 7 { 1124 if shift >= 64 { 1125 return ErrIntOverflowQuery 1126 } 1127 if iNdEx >= l { 1128 return io.ErrUnexpectedEOF 1129 } 1130 b := dAtA[iNdEx] 1131 iNdEx++ 1132 wire |= uint64(b&0x7F) << shift 1133 if b < 0x80 { 1134 break 1135 } 1136 } 1137 fieldNum := int32(wire >> 3) 1138 wireType := int(wire & 0x7) 1139 if wireType == 4 { 1140 return fmt.Errorf("proto: QuerySigningInfosRequest: wiretype end group for non-group") 1141 } 1142 if fieldNum <= 0 { 1143 return fmt.Errorf("proto: QuerySigningInfosRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1144 } 1145 switch fieldNum { 1146 case 1: 1147 if wireType != 2 { 1148 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1149 } 1150 var msglen int 1151 for shift := uint(0); ; shift += 7 { 1152 if shift >= 64 { 1153 return ErrIntOverflowQuery 1154 } 1155 if iNdEx >= l { 1156 return io.ErrUnexpectedEOF 1157 } 1158 b := dAtA[iNdEx] 1159 iNdEx++ 1160 msglen |= int(b&0x7F) << shift 1161 if b < 0x80 { 1162 break 1163 } 1164 } 1165 if msglen < 0 { 1166 return ErrInvalidLengthQuery 1167 } 1168 postIndex := iNdEx + msglen 1169 if postIndex < 0 { 1170 return ErrInvalidLengthQuery 1171 } 1172 if postIndex > l { 1173 return io.ErrUnexpectedEOF 1174 } 1175 if m.Pagination == nil { 1176 m.Pagination = &query.PageRequest{} 1177 } 1178 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1179 return err 1180 } 1181 iNdEx = postIndex 1182 default: 1183 iNdEx = preIndex 1184 skippy, err := skipQuery(dAtA[iNdEx:]) 1185 if err != nil { 1186 return err 1187 } 1188 if (skippy < 0) || (iNdEx+skippy) < 0 { 1189 return ErrInvalidLengthQuery 1190 } 1191 if (iNdEx + skippy) > l { 1192 return io.ErrUnexpectedEOF 1193 } 1194 iNdEx += skippy 1195 } 1196 } 1197 1198 if iNdEx > l { 1199 return io.ErrUnexpectedEOF 1200 } 1201 return nil 1202 } 1203 func (m *QuerySigningInfosResponse) Unmarshal(dAtA []byte) error { 1204 l := len(dAtA) 1205 iNdEx := 0 1206 for iNdEx < l { 1207 preIndex := iNdEx 1208 var wire uint64 1209 for shift := uint(0); ; shift += 7 { 1210 if shift >= 64 { 1211 return ErrIntOverflowQuery 1212 } 1213 if iNdEx >= l { 1214 return io.ErrUnexpectedEOF 1215 } 1216 b := dAtA[iNdEx] 1217 iNdEx++ 1218 wire |= uint64(b&0x7F) << shift 1219 if b < 0x80 { 1220 break 1221 } 1222 } 1223 fieldNum := int32(wire >> 3) 1224 wireType := int(wire & 0x7) 1225 if wireType == 4 { 1226 return fmt.Errorf("proto: QuerySigningInfosResponse: wiretype end group for non-group") 1227 } 1228 if fieldNum <= 0 { 1229 return fmt.Errorf("proto: QuerySigningInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1230 } 1231 switch fieldNum { 1232 case 1: 1233 if wireType != 2 { 1234 return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) 1235 } 1236 var msglen int 1237 for shift := uint(0); ; shift += 7 { 1238 if shift >= 64 { 1239 return ErrIntOverflowQuery 1240 } 1241 if iNdEx >= l { 1242 return io.ErrUnexpectedEOF 1243 } 1244 b := dAtA[iNdEx] 1245 iNdEx++ 1246 msglen |= int(b&0x7F) << shift 1247 if b < 0x80 { 1248 break 1249 } 1250 } 1251 if msglen < 0 { 1252 return ErrInvalidLengthQuery 1253 } 1254 postIndex := iNdEx + msglen 1255 if postIndex < 0 { 1256 return ErrInvalidLengthQuery 1257 } 1258 if postIndex > l { 1259 return io.ErrUnexpectedEOF 1260 } 1261 m.Info = append(m.Info, ValidatorSigningInfo{}) 1262 if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1263 return err 1264 } 1265 iNdEx = postIndex 1266 case 2: 1267 if wireType != 2 { 1268 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1269 } 1270 var msglen int 1271 for shift := uint(0); ; shift += 7 { 1272 if shift >= 64 { 1273 return ErrIntOverflowQuery 1274 } 1275 if iNdEx >= l { 1276 return io.ErrUnexpectedEOF 1277 } 1278 b := dAtA[iNdEx] 1279 iNdEx++ 1280 msglen |= int(b&0x7F) << shift 1281 if b < 0x80 { 1282 break 1283 } 1284 } 1285 if msglen < 0 { 1286 return ErrInvalidLengthQuery 1287 } 1288 postIndex := iNdEx + msglen 1289 if postIndex < 0 { 1290 return ErrInvalidLengthQuery 1291 } 1292 if postIndex > l { 1293 return io.ErrUnexpectedEOF 1294 } 1295 if m.Pagination == nil { 1296 m.Pagination = &query.PageResponse{} 1297 } 1298 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1299 return err 1300 } 1301 iNdEx = postIndex 1302 default: 1303 iNdEx = preIndex 1304 skippy, err := skipQuery(dAtA[iNdEx:]) 1305 if err != nil { 1306 return err 1307 } 1308 if (skippy < 0) || (iNdEx+skippy) < 0 { 1309 return ErrInvalidLengthQuery 1310 } 1311 if (iNdEx + skippy) > l { 1312 return io.ErrUnexpectedEOF 1313 } 1314 iNdEx += skippy 1315 } 1316 } 1317 1318 if iNdEx > l { 1319 return io.ErrUnexpectedEOF 1320 } 1321 return nil 1322 } 1323 func skipQuery(dAtA []byte) (n int, err error) { 1324 l := len(dAtA) 1325 iNdEx := 0 1326 depth := 0 1327 for iNdEx < l { 1328 var wire uint64 1329 for shift := uint(0); ; shift += 7 { 1330 if shift >= 64 { 1331 return 0, ErrIntOverflowQuery 1332 } 1333 if iNdEx >= l { 1334 return 0, io.ErrUnexpectedEOF 1335 } 1336 b := dAtA[iNdEx] 1337 iNdEx++ 1338 wire |= (uint64(b) & 0x7F) << shift 1339 if b < 0x80 { 1340 break 1341 } 1342 } 1343 wireType := int(wire & 0x7) 1344 switch wireType { 1345 case 0: 1346 for shift := uint(0); ; shift += 7 { 1347 if shift >= 64 { 1348 return 0, ErrIntOverflowQuery 1349 } 1350 if iNdEx >= l { 1351 return 0, io.ErrUnexpectedEOF 1352 } 1353 iNdEx++ 1354 if dAtA[iNdEx-1] < 0x80 { 1355 break 1356 } 1357 } 1358 case 1: 1359 iNdEx += 8 1360 case 2: 1361 var length int 1362 for shift := uint(0); ; shift += 7 { 1363 if shift >= 64 { 1364 return 0, ErrIntOverflowQuery 1365 } 1366 if iNdEx >= l { 1367 return 0, io.ErrUnexpectedEOF 1368 } 1369 b := dAtA[iNdEx] 1370 iNdEx++ 1371 length |= (int(b) & 0x7F) << shift 1372 if b < 0x80 { 1373 break 1374 } 1375 } 1376 if length < 0 { 1377 return 0, ErrInvalidLengthQuery 1378 } 1379 iNdEx += length 1380 case 3: 1381 depth++ 1382 case 4: 1383 if depth == 0 { 1384 return 0, ErrUnexpectedEndOfGroupQuery 1385 } 1386 depth-- 1387 case 5: 1388 iNdEx += 4 1389 default: 1390 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1391 } 1392 if iNdEx < 0 { 1393 return 0, ErrInvalidLengthQuery 1394 } 1395 if depth == 0 { 1396 return iNdEx, nil 1397 } 1398 } 1399 return 0, io.ErrUnexpectedEOF 1400 } 1401 1402 var ( 1403 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 1404 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 1405 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 1406 )