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