github.com/badrootd/nibiru-cometbft@v0.37.5-0.20240307173500-2a75559eee9b/proto/tendermint/privval/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/privval/types.proto 3 4 package privval 5 6 import ( 7 fmt "fmt" 8 crypto "github.com/badrootd/nibiru-cometbft/proto/tendermint/crypto" 9 types "github.com/badrootd/nibiru-cometbft/proto/tendermint/types" 10 _ "github.com/cosmos/gogoproto/gogoproto" 11 proto "github.com/cosmos/gogoproto/proto" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 27 28 type Errors int32 29 30 const ( 31 Errors_ERRORS_UNKNOWN Errors = 0 32 Errors_ERRORS_UNEXPECTED_RESPONSE Errors = 1 33 Errors_ERRORS_NO_CONNECTION Errors = 2 34 Errors_ERRORS_CONNECTION_TIMEOUT Errors = 3 35 Errors_ERRORS_READ_TIMEOUT Errors = 4 36 Errors_ERRORS_WRITE_TIMEOUT Errors = 5 37 ) 38 39 var Errors_name = map[int32]string{ 40 0: "ERRORS_UNKNOWN", 41 1: "ERRORS_UNEXPECTED_RESPONSE", 42 2: "ERRORS_NO_CONNECTION", 43 3: "ERRORS_CONNECTION_TIMEOUT", 44 4: "ERRORS_READ_TIMEOUT", 45 5: "ERRORS_WRITE_TIMEOUT", 46 } 47 48 var Errors_value = map[string]int32{ 49 "ERRORS_UNKNOWN": 0, 50 "ERRORS_UNEXPECTED_RESPONSE": 1, 51 "ERRORS_NO_CONNECTION": 2, 52 "ERRORS_CONNECTION_TIMEOUT": 3, 53 "ERRORS_READ_TIMEOUT": 4, 54 "ERRORS_WRITE_TIMEOUT": 5, 55 } 56 57 func (x Errors) String() string { 58 return proto.EnumName(Errors_name, int32(x)) 59 } 60 61 func (Errors) EnumDescriptor() ([]byte, []int) { 62 return fileDescriptor_cb4e437a5328cf9c, []int{0} 63 } 64 65 type RemoteSignerError struct { 66 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` 67 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 68 } 69 70 func (m *RemoteSignerError) Reset() { *m = RemoteSignerError{} } 71 func (m *RemoteSignerError) String() string { return proto.CompactTextString(m) } 72 func (*RemoteSignerError) ProtoMessage() {} 73 func (*RemoteSignerError) Descriptor() ([]byte, []int) { 74 return fileDescriptor_cb4e437a5328cf9c, []int{0} 75 } 76 func (m *RemoteSignerError) XXX_Unmarshal(b []byte) error { 77 return m.Unmarshal(b) 78 } 79 func (m *RemoteSignerError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 80 if deterministic { 81 return xxx_messageInfo_RemoteSignerError.Marshal(b, m, deterministic) 82 } else { 83 b = b[:cap(b)] 84 n, err := m.MarshalToSizedBuffer(b) 85 if err != nil { 86 return nil, err 87 } 88 return b[:n], nil 89 } 90 } 91 func (m *RemoteSignerError) XXX_Merge(src proto.Message) { 92 xxx_messageInfo_RemoteSignerError.Merge(m, src) 93 } 94 func (m *RemoteSignerError) XXX_Size() int { 95 return m.Size() 96 } 97 func (m *RemoteSignerError) XXX_DiscardUnknown() { 98 xxx_messageInfo_RemoteSignerError.DiscardUnknown(m) 99 } 100 101 var xxx_messageInfo_RemoteSignerError proto.InternalMessageInfo 102 103 func (m *RemoteSignerError) GetCode() int32 { 104 if m != nil { 105 return m.Code 106 } 107 return 0 108 } 109 110 func (m *RemoteSignerError) GetDescription() string { 111 if m != nil { 112 return m.Description 113 } 114 return "" 115 } 116 117 // PubKeyRequest requests the consensus public key from the remote signer. 118 type PubKeyRequest struct { 119 ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` 120 } 121 122 func (m *PubKeyRequest) Reset() { *m = PubKeyRequest{} } 123 func (m *PubKeyRequest) String() string { return proto.CompactTextString(m) } 124 func (*PubKeyRequest) ProtoMessage() {} 125 func (*PubKeyRequest) Descriptor() ([]byte, []int) { 126 return fileDescriptor_cb4e437a5328cf9c, []int{1} 127 } 128 func (m *PubKeyRequest) XXX_Unmarshal(b []byte) error { 129 return m.Unmarshal(b) 130 } 131 func (m *PubKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 132 if deterministic { 133 return xxx_messageInfo_PubKeyRequest.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 *PubKeyRequest) XXX_Merge(src proto.Message) { 144 xxx_messageInfo_PubKeyRequest.Merge(m, src) 145 } 146 func (m *PubKeyRequest) XXX_Size() int { 147 return m.Size() 148 } 149 func (m *PubKeyRequest) XXX_DiscardUnknown() { 150 xxx_messageInfo_PubKeyRequest.DiscardUnknown(m) 151 } 152 153 var xxx_messageInfo_PubKeyRequest proto.InternalMessageInfo 154 155 func (m *PubKeyRequest) GetChainId() string { 156 if m != nil { 157 return m.ChainId 158 } 159 return "" 160 } 161 162 // PubKeyResponse is a response message containing the public key. 163 type PubKeyResponse struct { 164 PubKey crypto.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"` 165 Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` 166 } 167 168 func (m *PubKeyResponse) Reset() { *m = PubKeyResponse{} } 169 func (m *PubKeyResponse) String() string { return proto.CompactTextString(m) } 170 func (*PubKeyResponse) ProtoMessage() {} 171 func (*PubKeyResponse) Descriptor() ([]byte, []int) { 172 return fileDescriptor_cb4e437a5328cf9c, []int{2} 173 } 174 func (m *PubKeyResponse) XXX_Unmarshal(b []byte) error { 175 return m.Unmarshal(b) 176 } 177 func (m *PubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 178 if deterministic { 179 return xxx_messageInfo_PubKeyResponse.Marshal(b, m, deterministic) 180 } else { 181 b = b[:cap(b)] 182 n, err := m.MarshalToSizedBuffer(b) 183 if err != nil { 184 return nil, err 185 } 186 return b[:n], nil 187 } 188 } 189 func (m *PubKeyResponse) XXX_Merge(src proto.Message) { 190 xxx_messageInfo_PubKeyResponse.Merge(m, src) 191 } 192 func (m *PubKeyResponse) XXX_Size() int { 193 return m.Size() 194 } 195 func (m *PubKeyResponse) XXX_DiscardUnknown() { 196 xxx_messageInfo_PubKeyResponse.DiscardUnknown(m) 197 } 198 199 var xxx_messageInfo_PubKeyResponse proto.InternalMessageInfo 200 201 func (m *PubKeyResponse) GetPubKey() crypto.PublicKey { 202 if m != nil { 203 return m.PubKey 204 } 205 return crypto.PublicKey{} 206 } 207 208 func (m *PubKeyResponse) GetError() *RemoteSignerError { 209 if m != nil { 210 return m.Error 211 } 212 return nil 213 } 214 215 // SignVoteRequest is a request to sign a vote 216 type SignVoteRequest struct { 217 Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` 218 ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` 219 } 220 221 func (m *SignVoteRequest) Reset() { *m = SignVoteRequest{} } 222 func (m *SignVoteRequest) String() string { return proto.CompactTextString(m) } 223 func (*SignVoteRequest) ProtoMessage() {} 224 func (*SignVoteRequest) Descriptor() ([]byte, []int) { 225 return fileDescriptor_cb4e437a5328cf9c, []int{3} 226 } 227 func (m *SignVoteRequest) XXX_Unmarshal(b []byte) error { 228 return m.Unmarshal(b) 229 } 230 func (m *SignVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 231 if deterministic { 232 return xxx_messageInfo_SignVoteRequest.Marshal(b, m, deterministic) 233 } else { 234 b = b[:cap(b)] 235 n, err := m.MarshalToSizedBuffer(b) 236 if err != nil { 237 return nil, err 238 } 239 return b[:n], nil 240 } 241 } 242 func (m *SignVoteRequest) XXX_Merge(src proto.Message) { 243 xxx_messageInfo_SignVoteRequest.Merge(m, src) 244 } 245 func (m *SignVoteRequest) XXX_Size() int { 246 return m.Size() 247 } 248 func (m *SignVoteRequest) XXX_DiscardUnknown() { 249 xxx_messageInfo_SignVoteRequest.DiscardUnknown(m) 250 } 251 252 var xxx_messageInfo_SignVoteRequest proto.InternalMessageInfo 253 254 func (m *SignVoteRequest) GetVote() *types.Vote { 255 if m != nil { 256 return m.Vote 257 } 258 return nil 259 } 260 261 func (m *SignVoteRequest) GetChainId() string { 262 if m != nil { 263 return m.ChainId 264 } 265 return "" 266 } 267 268 // SignedVoteResponse is a response containing a signed vote or an error 269 type SignedVoteResponse struct { 270 Vote types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"` 271 Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` 272 } 273 274 func (m *SignedVoteResponse) Reset() { *m = SignedVoteResponse{} } 275 func (m *SignedVoteResponse) String() string { return proto.CompactTextString(m) } 276 func (*SignedVoteResponse) ProtoMessage() {} 277 func (*SignedVoteResponse) Descriptor() ([]byte, []int) { 278 return fileDescriptor_cb4e437a5328cf9c, []int{4} 279 } 280 func (m *SignedVoteResponse) XXX_Unmarshal(b []byte) error { 281 return m.Unmarshal(b) 282 } 283 func (m *SignedVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 284 if deterministic { 285 return xxx_messageInfo_SignedVoteResponse.Marshal(b, m, deterministic) 286 } else { 287 b = b[:cap(b)] 288 n, err := m.MarshalToSizedBuffer(b) 289 if err != nil { 290 return nil, err 291 } 292 return b[:n], nil 293 } 294 } 295 func (m *SignedVoteResponse) XXX_Merge(src proto.Message) { 296 xxx_messageInfo_SignedVoteResponse.Merge(m, src) 297 } 298 func (m *SignedVoteResponse) XXX_Size() int { 299 return m.Size() 300 } 301 func (m *SignedVoteResponse) XXX_DiscardUnknown() { 302 xxx_messageInfo_SignedVoteResponse.DiscardUnknown(m) 303 } 304 305 var xxx_messageInfo_SignedVoteResponse proto.InternalMessageInfo 306 307 func (m *SignedVoteResponse) GetVote() types.Vote { 308 if m != nil { 309 return m.Vote 310 } 311 return types.Vote{} 312 } 313 314 func (m *SignedVoteResponse) GetError() *RemoteSignerError { 315 if m != nil { 316 return m.Error 317 } 318 return nil 319 } 320 321 // SignProposalRequest is a request to sign a proposal 322 type SignProposalRequest struct { 323 Proposal *types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` 324 ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` 325 } 326 327 func (m *SignProposalRequest) Reset() { *m = SignProposalRequest{} } 328 func (m *SignProposalRequest) String() string { return proto.CompactTextString(m) } 329 func (*SignProposalRequest) ProtoMessage() {} 330 func (*SignProposalRequest) Descriptor() ([]byte, []int) { 331 return fileDescriptor_cb4e437a5328cf9c, []int{5} 332 } 333 func (m *SignProposalRequest) XXX_Unmarshal(b []byte) error { 334 return m.Unmarshal(b) 335 } 336 func (m *SignProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 337 if deterministic { 338 return xxx_messageInfo_SignProposalRequest.Marshal(b, m, deterministic) 339 } else { 340 b = b[:cap(b)] 341 n, err := m.MarshalToSizedBuffer(b) 342 if err != nil { 343 return nil, err 344 } 345 return b[:n], nil 346 } 347 } 348 func (m *SignProposalRequest) XXX_Merge(src proto.Message) { 349 xxx_messageInfo_SignProposalRequest.Merge(m, src) 350 } 351 func (m *SignProposalRequest) XXX_Size() int { 352 return m.Size() 353 } 354 func (m *SignProposalRequest) XXX_DiscardUnknown() { 355 xxx_messageInfo_SignProposalRequest.DiscardUnknown(m) 356 } 357 358 var xxx_messageInfo_SignProposalRequest proto.InternalMessageInfo 359 360 func (m *SignProposalRequest) GetProposal() *types.Proposal { 361 if m != nil { 362 return m.Proposal 363 } 364 return nil 365 } 366 367 func (m *SignProposalRequest) GetChainId() string { 368 if m != nil { 369 return m.ChainId 370 } 371 return "" 372 } 373 374 // SignedProposalResponse is response containing a signed proposal or an error 375 type SignedProposalResponse struct { 376 Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"` 377 Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` 378 } 379 380 func (m *SignedProposalResponse) Reset() { *m = SignedProposalResponse{} } 381 func (m *SignedProposalResponse) String() string { return proto.CompactTextString(m) } 382 func (*SignedProposalResponse) ProtoMessage() {} 383 func (*SignedProposalResponse) Descriptor() ([]byte, []int) { 384 return fileDescriptor_cb4e437a5328cf9c, []int{6} 385 } 386 func (m *SignedProposalResponse) XXX_Unmarshal(b []byte) error { 387 return m.Unmarshal(b) 388 } 389 func (m *SignedProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 390 if deterministic { 391 return xxx_messageInfo_SignedProposalResponse.Marshal(b, m, deterministic) 392 } else { 393 b = b[:cap(b)] 394 n, err := m.MarshalToSizedBuffer(b) 395 if err != nil { 396 return nil, err 397 } 398 return b[:n], nil 399 } 400 } 401 func (m *SignedProposalResponse) XXX_Merge(src proto.Message) { 402 xxx_messageInfo_SignedProposalResponse.Merge(m, src) 403 } 404 func (m *SignedProposalResponse) XXX_Size() int { 405 return m.Size() 406 } 407 func (m *SignedProposalResponse) XXX_DiscardUnknown() { 408 xxx_messageInfo_SignedProposalResponse.DiscardUnknown(m) 409 } 410 411 var xxx_messageInfo_SignedProposalResponse proto.InternalMessageInfo 412 413 func (m *SignedProposalResponse) GetProposal() types.Proposal { 414 if m != nil { 415 return m.Proposal 416 } 417 return types.Proposal{} 418 } 419 420 func (m *SignedProposalResponse) GetError() *RemoteSignerError { 421 if m != nil { 422 return m.Error 423 } 424 return nil 425 } 426 427 // PingRequest is a request to confirm that the connection is alive. 428 type PingRequest struct { 429 } 430 431 func (m *PingRequest) Reset() { *m = PingRequest{} } 432 func (m *PingRequest) String() string { return proto.CompactTextString(m) } 433 func (*PingRequest) ProtoMessage() {} 434 func (*PingRequest) Descriptor() ([]byte, []int) { 435 return fileDescriptor_cb4e437a5328cf9c, []int{7} 436 } 437 func (m *PingRequest) XXX_Unmarshal(b []byte) error { 438 return m.Unmarshal(b) 439 } 440 func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 441 if deterministic { 442 return xxx_messageInfo_PingRequest.Marshal(b, m, deterministic) 443 } else { 444 b = b[:cap(b)] 445 n, err := m.MarshalToSizedBuffer(b) 446 if err != nil { 447 return nil, err 448 } 449 return b[:n], nil 450 } 451 } 452 func (m *PingRequest) XXX_Merge(src proto.Message) { 453 xxx_messageInfo_PingRequest.Merge(m, src) 454 } 455 func (m *PingRequest) XXX_Size() int { 456 return m.Size() 457 } 458 func (m *PingRequest) XXX_DiscardUnknown() { 459 xxx_messageInfo_PingRequest.DiscardUnknown(m) 460 } 461 462 var xxx_messageInfo_PingRequest proto.InternalMessageInfo 463 464 // PingResponse is a response to confirm that the connection is alive. 465 type PingResponse struct { 466 } 467 468 func (m *PingResponse) Reset() { *m = PingResponse{} } 469 func (m *PingResponse) String() string { return proto.CompactTextString(m) } 470 func (*PingResponse) ProtoMessage() {} 471 func (*PingResponse) Descriptor() ([]byte, []int) { 472 return fileDescriptor_cb4e437a5328cf9c, []int{8} 473 } 474 func (m *PingResponse) XXX_Unmarshal(b []byte) error { 475 return m.Unmarshal(b) 476 } 477 func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 478 if deterministic { 479 return xxx_messageInfo_PingResponse.Marshal(b, m, deterministic) 480 } else { 481 b = b[:cap(b)] 482 n, err := m.MarshalToSizedBuffer(b) 483 if err != nil { 484 return nil, err 485 } 486 return b[:n], nil 487 } 488 } 489 func (m *PingResponse) XXX_Merge(src proto.Message) { 490 xxx_messageInfo_PingResponse.Merge(m, src) 491 } 492 func (m *PingResponse) XXX_Size() int { 493 return m.Size() 494 } 495 func (m *PingResponse) XXX_DiscardUnknown() { 496 xxx_messageInfo_PingResponse.DiscardUnknown(m) 497 } 498 499 var xxx_messageInfo_PingResponse proto.InternalMessageInfo 500 501 type Message struct { 502 // Types that are valid to be assigned to Sum: 503 // *Message_PubKeyRequest 504 // *Message_PubKeyResponse 505 // *Message_SignVoteRequest 506 // *Message_SignedVoteResponse 507 // *Message_SignProposalRequest 508 // *Message_SignedProposalResponse 509 // *Message_PingRequest 510 // *Message_PingResponse 511 Sum isMessage_Sum `protobuf_oneof:"sum"` 512 } 513 514 func (m *Message) Reset() { *m = Message{} } 515 func (m *Message) String() string { return proto.CompactTextString(m) } 516 func (*Message) ProtoMessage() {} 517 func (*Message) Descriptor() ([]byte, []int) { 518 return fileDescriptor_cb4e437a5328cf9c, []int{9} 519 } 520 func (m *Message) XXX_Unmarshal(b []byte) error { 521 return m.Unmarshal(b) 522 } 523 func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 524 if deterministic { 525 return xxx_messageInfo_Message.Marshal(b, m, deterministic) 526 } else { 527 b = b[:cap(b)] 528 n, err := m.MarshalToSizedBuffer(b) 529 if err != nil { 530 return nil, err 531 } 532 return b[:n], nil 533 } 534 } 535 func (m *Message) XXX_Merge(src proto.Message) { 536 xxx_messageInfo_Message.Merge(m, src) 537 } 538 func (m *Message) XXX_Size() int { 539 return m.Size() 540 } 541 func (m *Message) XXX_DiscardUnknown() { 542 xxx_messageInfo_Message.DiscardUnknown(m) 543 } 544 545 var xxx_messageInfo_Message proto.InternalMessageInfo 546 547 type isMessage_Sum interface { 548 isMessage_Sum() 549 MarshalTo([]byte) (int, error) 550 Size() int 551 } 552 553 type Message_PubKeyRequest struct { 554 PubKeyRequest *PubKeyRequest `protobuf:"bytes,1,opt,name=pub_key_request,json=pubKeyRequest,proto3,oneof" json:"pub_key_request,omitempty"` 555 } 556 type Message_PubKeyResponse struct { 557 PubKeyResponse *PubKeyResponse `protobuf:"bytes,2,opt,name=pub_key_response,json=pubKeyResponse,proto3,oneof" json:"pub_key_response,omitempty"` 558 } 559 type Message_SignVoteRequest struct { 560 SignVoteRequest *SignVoteRequest `protobuf:"bytes,3,opt,name=sign_vote_request,json=signVoteRequest,proto3,oneof" json:"sign_vote_request,omitempty"` 561 } 562 type Message_SignedVoteResponse struct { 563 SignedVoteResponse *SignedVoteResponse `protobuf:"bytes,4,opt,name=signed_vote_response,json=signedVoteResponse,proto3,oneof" json:"signed_vote_response,omitempty"` 564 } 565 type Message_SignProposalRequest struct { 566 SignProposalRequest *SignProposalRequest `protobuf:"bytes,5,opt,name=sign_proposal_request,json=signProposalRequest,proto3,oneof" json:"sign_proposal_request,omitempty"` 567 } 568 type Message_SignedProposalResponse struct { 569 SignedProposalResponse *SignedProposalResponse `protobuf:"bytes,6,opt,name=signed_proposal_response,json=signedProposalResponse,proto3,oneof" json:"signed_proposal_response,omitempty"` 570 } 571 type Message_PingRequest struct { 572 PingRequest *PingRequest `protobuf:"bytes,7,opt,name=ping_request,json=pingRequest,proto3,oneof" json:"ping_request,omitempty"` 573 } 574 type Message_PingResponse struct { 575 PingResponse *PingResponse `protobuf:"bytes,8,opt,name=ping_response,json=pingResponse,proto3,oneof" json:"ping_response,omitempty"` 576 } 577 578 func (*Message_PubKeyRequest) isMessage_Sum() {} 579 func (*Message_PubKeyResponse) isMessage_Sum() {} 580 func (*Message_SignVoteRequest) isMessage_Sum() {} 581 func (*Message_SignedVoteResponse) isMessage_Sum() {} 582 func (*Message_SignProposalRequest) isMessage_Sum() {} 583 func (*Message_SignedProposalResponse) isMessage_Sum() {} 584 func (*Message_PingRequest) isMessage_Sum() {} 585 func (*Message_PingResponse) isMessage_Sum() {} 586 587 func (m *Message) GetSum() isMessage_Sum { 588 if m != nil { 589 return m.Sum 590 } 591 return nil 592 } 593 594 func (m *Message) GetPubKeyRequest() *PubKeyRequest { 595 if x, ok := m.GetSum().(*Message_PubKeyRequest); ok { 596 return x.PubKeyRequest 597 } 598 return nil 599 } 600 601 func (m *Message) GetPubKeyResponse() *PubKeyResponse { 602 if x, ok := m.GetSum().(*Message_PubKeyResponse); ok { 603 return x.PubKeyResponse 604 } 605 return nil 606 } 607 608 func (m *Message) GetSignVoteRequest() *SignVoteRequest { 609 if x, ok := m.GetSum().(*Message_SignVoteRequest); ok { 610 return x.SignVoteRequest 611 } 612 return nil 613 } 614 615 func (m *Message) GetSignedVoteResponse() *SignedVoteResponse { 616 if x, ok := m.GetSum().(*Message_SignedVoteResponse); ok { 617 return x.SignedVoteResponse 618 } 619 return nil 620 } 621 622 func (m *Message) GetSignProposalRequest() *SignProposalRequest { 623 if x, ok := m.GetSum().(*Message_SignProposalRequest); ok { 624 return x.SignProposalRequest 625 } 626 return nil 627 } 628 629 func (m *Message) GetSignedProposalResponse() *SignedProposalResponse { 630 if x, ok := m.GetSum().(*Message_SignedProposalResponse); ok { 631 return x.SignedProposalResponse 632 } 633 return nil 634 } 635 636 func (m *Message) GetPingRequest() *PingRequest { 637 if x, ok := m.GetSum().(*Message_PingRequest); ok { 638 return x.PingRequest 639 } 640 return nil 641 } 642 643 func (m *Message) GetPingResponse() *PingResponse { 644 if x, ok := m.GetSum().(*Message_PingResponse); ok { 645 return x.PingResponse 646 } 647 return nil 648 } 649 650 // XXX_OneofWrappers is for the internal use of the proto package. 651 func (*Message) XXX_OneofWrappers() []interface{} { 652 return []interface{}{ 653 (*Message_PubKeyRequest)(nil), 654 (*Message_PubKeyResponse)(nil), 655 (*Message_SignVoteRequest)(nil), 656 (*Message_SignedVoteResponse)(nil), 657 (*Message_SignProposalRequest)(nil), 658 (*Message_SignedProposalResponse)(nil), 659 (*Message_PingRequest)(nil), 660 (*Message_PingResponse)(nil), 661 } 662 } 663 664 func init() { 665 proto.RegisterEnum("tendermint.privval.Errors", Errors_name, Errors_value) 666 proto.RegisterType((*RemoteSignerError)(nil), "tendermint.privval.RemoteSignerError") 667 proto.RegisterType((*PubKeyRequest)(nil), "tendermint.privval.PubKeyRequest") 668 proto.RegisterType((*PubKeyResponse)(nil), "tendermint.privval.PubKeyResponse") 669 proto.RegisterType((*SignVoteRequest)(nil), "tendermint.privval.SignVoteRequest") 670 proto.RegisterType((*SignedVoteResponse)(nil), "tendermint.privval.SignedVoteResponse") 671 proto.RegisterType((*SignProposalRequest)(nil), "tendermint.privval.SignProposalRequest") 672 proto.RegisterType((*SignedProposalResponse)(nil), "tendermint.privval.SignedProposalResponse") 673 proto.RegisterType((*PingRequest)(nil), "tendermint.privval.PingRequest") 674 proto.RegisterType((*PingResponse)(nil), "tendermint.privval.PingResponse") 675 proto.RegisterType((*Message)(nil), "tendermint.privval.Message") 676 } 677 678 func init() { proto.RegisterFile("tendermint/privval/types.proto", fileDescriptor_cb4e437a5328cf9c) } 679 680 var fileDescriptor_cb4e437a5328cf9c = []byte{ 681 // 756 bytes of a gzipped FileDescriptorProto 682 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x4f, 0xe3, 0x46, 683 0x18, 0xb6, 0x21, 0x1f, 0xf0, 0x86, 0x84, 0x30, 0x50, 0x1a, 0x22, 0x6a, 0xd2, 0x54, 0x6d, 0x51, 684 0x0e, 0x49, 0x45, 0xd5, 0x5e, 0xe8, 0xa5, 0x80, 0xd5, 0x44, 0x11, 0x76, 0x3a, 0x09, 0x05, 0x21, 685 0x55, 0x56, 0x3e, 0x06, 0x63, 0x41, 0x3c, 0x5e, 0x8f, 0x83, 0x94, 0xf3, 0xde, 0xf6, 0xb4, 0xd2, 686 0xfe, 0x89, 0x3d, 0xef, 0xaf, 0xe0, 0xc8, 0x71, 0x4f, 0xab, 0x15, 0xfc, 0x91, 0x55, 0xc6, 0x13, 687 0xdb, 0xf9, 0x42, 0xbb, 0xe2, 0x36, 0xf3, 0xbe, 0xef, 0x3c, 0x1f, 0x33, 0x8f, 0x65, 0x50, 0x3c, 688 0x62, 0xf7, 0x88, 0xdb, 0xb7, 0x6c, 0xaf, 0xe2, 0xb8, 0xd6, 0xdd, 0x5d, 0xfb, 0xb6, 0xe2, 0x0d, 689 0x1d, 0xc2, 0xca, 0x8e, 0x4b, 0x3d, 0x8a, 0x50, 0xd8, 0x2f, 0x8b, 0x7e, 0x7e, 0x37, 0x72, 0xa6, 690 0xeb, 0x0e, 0x1d, 0x8f, 0x56, 0x6e, 0xc8, 0x50, 0x9c, 0x98, 0xe8, 0x72, 0xa4, 0x28, 0x5e, 0x7e, 691 0xcb, 0xa4, 0x26, 0xe5, 0xcb, 0xca, 0x68, 0xe5, 0x57, 0x8b, 0x35, 0xd8, 0xc0, 0xa4, 0x4f, 0x3d, 692 0xd2, 0xb4, 0x4c, 0x9b, 0xb8, 0xaa, 0xeb, 0x52, 0x17, 0x21, 0x88, 0x75, 0x69, 0x8f, 0xe4, 0xe4, 693 0x82, 0xbc, 0x1f, 0xc7, 0x7c, 0x8d, 0x0a, 0x90, 0xea, 0x11, 0xd6, 0x75, 0x2d, 0xc7, 0xb3, 0xa8, 694 0x9d, 0x5b, 0x2a, 0xc8, 0xfb, 0xab, 0x38, 0x5a, 0x2a, 0x96, 0x20, 0xdd, 0x18, 0x74, 0xea, 0x64, 695 0x88, 0xc9, 0xab, 0x01, 0x61, 0x1e, 0xda, 0x81, 0x95, 0xee, 0x75, 0xdb, 0xb2, 0x0d, 0xab, 0xc7, 696 0xa1, 0x56, 0x71, 0x92, 0xef, 0x6b, 0xbd, 0xe2, 0x1b, 0x19, 0x32, 0xe3, 0x61, 0xe6, 0x50, 0x9b, 697 0x11, 0x74, 0x08, 0x49, 0x67, 0xd0, 0x31, 0x6e, 0xc8, 0x90, 0x0f, 0xa7, 0x0e, 0x76, 0xcb, 0x91, 698 0x1b, 0xf0, 0xdd, 0x96, 0x1b, 0x83, 0xce, 0xad, 0xd5, 0xad, 0x93, 0xe1, 0x51, 0xec, 0xfe, 0xd3, 699 0x9e, 0x84, 0x13, 0x0e, 0x07, 0x41, 0x87, 0x10, 0x27, 0x23, 0xe9, 0x5c, 0x57, 0xea, 0xe0, 0xe7, 700 0xf2, 0xec, 0xe5, 0x95, 0x67, 0x7c, 0x62, 0xff, 0x4c, 0xf1, 0x02, 0xd6, 0x47, 0xd5, 0xff, 0xa8, 701 0x47, 0xc6, 0xd2, 0x4b, 0x10, 0xbb, 0xa3, 0x1e, 0x11, 0x4a, 0xb6, 0xa3, 0x70, 0xfe, 0x9d, 0xf2, 702 0x61, 0x3e, 0x33, 0x61, 0x73, 0x69, 0xd2, 0xe6, 0x6b, 0x19, 0x10, 0x27, 0xec, 0xf9, 0xe0, 0xc2, 703 0xea, 0x6f, 0x5f, 0x83, 0x2e, 0x1c, 0xfa, 0x1c, 0x2f, 0xf2, 0x77, 0x0d, 0x9b, 0xa3, 0x6a, 0xc3, 704 0xa5, 0x0e, 0x65, 0xed, 0xdb, 0xb1, 0xc7, 0x3f, 0x61, 0xc5, 0x11, 0x25, 0xa1, 0x24, 0x3f, 0xab, 705 0x24, 0x38, 0x14, 0xcc, 0x3e, 0xe7, 0xf7, 0x9d, 0x0c, 0xdb, 0xbe, 0xdf, 0x90, 0x4c, 0x78, 0xfe, 706 0xeb, 0x5b, 0xd8, 0x84, 0xf7, 0x90, 0xf3, 0x45, 0xfe, 0xd3, 0x90, 0x6a, 0x58, 0xb6, 0x29, 0x7c, 707 0x17, 0x33, 0xb0, 0xe6, 0x6f, 0x7d, 0x65, 0xc5, 0x0f, 0x71, 0x48, 0x9e, 0x12, 0xc6, 0xda, 0x26, 708 0x41, 0x75, 0x58, 0x17, 0x21, 0x34, 0x5c, 0x7f, 0x5c, 0x88, 0xfd, 0x71, 0x1e, 0xe3, 0x44, 0xdc, 709 0xab, 0x12, 0x4e, 0x3b, 0x13, 0xf9, 0xd7, 0x20, 0x1b, 0x82, 0xf9, 0x64, 0x42, 0x7f, 0xf1, 0x39, 710 0x34, 0x7f, 0xb2, 0x2a, 0xe1, 0x8c, 0x33, 0xf9, 0x85, 0xfc, 0x0b, 0x1b, 0xcc, 0x32, 0x6d, 0x63, 711 0x94, 0x88, 0x40, 0xde, 0x32, 0x07, 0xfc, 0x69, 0x1e, 0xe0, 0x54, 0xa8, 0xab, 0x12, 0x5e, 0x67, 712 0x53, 0x39, 0xbf, 0x84, 0x2d, 0xc6, 0xdf, 0x6b, 0x0c, 0x2a, 0x64, 0xc6, 0x38, 0xea, 0x2f, 0x8b, 713 0x50, 0x27, 0xf3, 0x5c, 0x95, 0x30, 0x62, 0xb3, 0x29, 0xff, 0x1f, 0xbe, 0xe3, 0x72, 0xc7, 0x8f, 714 0x18, 0x48, 0x8e, 0x73, 0xf0, 0x5f, 0x17, 0x81, 0x4f, 0xe5, 0xb4, 0x2a, 0xe1, 0x4d, 0x36, 0x27, 715 0xbe, 0x57, 0x90, 0x13, 0xd2, 0x23, 0x04, 0x42, 0x7e, 0x82, 0x33, 0x94, 0x16, 0xcb, 0x9f, 0x8e, 716 0x67, 0x55, 0xc2, 0xdb, 0x6c, 0x7e, 0x70, 0x4f, 0x60, 0xcd, 0xb1, 0x6c, 0x33, 0x50, 0x9f, 0xe4, 717 0xd8, 0x7b, 0x73, 0x5f, 0x30, 0x4c, 0x59, 0x55, 0xc2, 0x29, 0x27, 0xdc, 0xa2, 0x7f, 0x20, 0x2d, 718 0x50, 0x84, 0xc4, 0x15, 0x0e, 0x53, 0x58, 0x0c, 0x13, 0x08, 0x5b, 0x73, 0x22, 0xfb, 0xa3, 0x38, 719 0x2c, 0xb3, 0x41, 0xbf, 0xf4, 0x5e, 0x86, 0x04, 0x0f, 0x39, 0x43, 0x08, 0x32, 0x2a, 0xc6, 0x3a, 720 0x6e, 0x1a, 0x67, 0x5a, 0x5d, 0xd3, 0xcf, 0xb5, 0xac, 0x84, 0x14, 0xc8, 0x07, 0x35, 0xf5, 0xa2, 721 0xa1, 0x1e, 0xb7, 0xd4, 0x13, 0x03, 0xab, 0xcd, 0x86, 0xae, 0x35, 0xd5, 0xac, 0x8c, 0x72, 0xb0, 722 0x25, 0xfa, 0x9a, 0x6e, 0x1c, 0xeb, 0x9a, 0xa6, 0x1e, 0xb7, 0x6a, 0xba, 0x96, 0x5d, 0x42, 0x3f, 723 0xc0, 0x8e, 0xe8, 0x84, 0x65, 0xa3, 0x55, 0x3b, 0x55, 0xf5, 0xb3, 0x56, 0x76, 0x19, 0x7d, 0x0f, 724 0x9b, 0xa2, 0x8d, 0xd5, 0xbf, 0x4f, 0x82, 0x46, 0x2c, 0x82, 0x78, 0x8e, 0x6b, 0x2d, 0x35, 0xe8, 725 0xc4, 0x8f, 0xf4, 0xfb, 0x47, 0x45, 0x7e, 0x78, 0x54, 0xe4, 0xcf, 0x8f, 0x8a, 0xfc, 0xf6, 0x49, 726 0x91, 0x1e, 0x9e, 0x14, 0xe9, 0xe3, 0x93, 0x22, 0x5d, 0xfe, 0x61, 0x5a, 0xde, 0xf5, 0xa0, 0x53, 727 0xee, 0xd2, 0x7e, 0xa5, 0x4b, 0xfb, 0xc4, 0xeb, 0x5c, 0x79, 0xe1, 0xc2, 0xff, 0x57, 0xcd, 0xfe, 728 0x25, 0x3b, 0x09, 0xde, 0xf9, 0xfd, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0x9f, 0x99, 0x3e, 729 0x42, 0x07, 0x00, 0x00, 730 } 731 732 func (m *RemoteSignerError) Marshal() (dAtA []byte, err error) { 733 size := m.Size() 734 dAtA = make([]byte, size) 735 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 736 if err != nil { 737 return nil, err 738 } 739 return dAtA[:n], nil 740 } 741 742 func (m *RemoteSignerError) MarshalTo(dAtA []byte) (int, error) { 743 size := m.Size() 744 return m.MarshalToSizedBuffer(dAtA[:size]) 745 } 746 747 func (m *RemoteSignerError) MarshalToSizedBuffer(dAtA []byte) (int, error) { 748 i := len(dAtA) 749 _ = i 750 var l int 751 _ = l 752 if len(m.Description) > 0 { 753 i -= len(m.Description) 754 copy(dAtA[i:], m.Description) 755 i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) 756 i-- 757 dAtA[i] = 0x12 758 } 759 if m.Code != 0 { 760 i = encodeVarintTypes(dAtA, i, uint64(m.Code)) 761 i-- 762 dAtA[i] = 0x8 763 } 764 return len(dAtA) - i, nil 765 } 766 767 func (m *PubKeyRequest) Marshal() (dAtA []byte, err error) { 768 size := m.Size() 769 dAtA = make([]byte, size) 770 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 771 if err != nil { 772 return nil, err 773 } 774 return dAtA[:n], nil 775 } 776 777 func (m *PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { 778 size := m.Size() 779 return m.MarshalToSizedBuffer(dAtA[:size]) 780 } 781 782 func (m *PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 783 i := len(dAtA) 784 _ = i 785 var l int 786 _ = l 787 if len(m.ChainId) > 0 { 788 i -= len(m.ChainId) 789 copy(dAtA[i:], m.ChainId) 790 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) 791 i-- 792 dAtA[i] = 0xa 793 } 794 return len(dAtA) - i, nil 795 } 796 797 func (m *PubKeyResponse) Marshal() (dAtA []byte, err error) { 798 size := m.Size() 799 dAtA = make([]byte, size) 800 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 801 if err != nil { 802 return nil, err 803 } 804 return dAtA[:n], nil 805 } 806 807 func (m *PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { 808 size := m.Size() 809 return m.MarshalToSizedBuffer(dAtA[:size]) 810 } 811 812 func (m *PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 813 i := len(dAtA) 814 _ = i 815 var l int 816 _ = l 817 if m.Error != nil { 818 { 819 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 820 if err != nil { 821 return 0, err 822 } 823 i -= size 824 i = encodeVarintTypes(dAtA, i, uint64(size)) 825 } 826 i-- 827 dAtA[i] = 0x12 828 } 829 { 830 size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) 831 if err != nil { 832 return 0, err 833 } 834 i -= size 835 i = encodeVarintTypes(dAtA, i, uint64(size)) 836 } 837 i-- 838 dAtA[i] = 0xa 839 return len(dAtA) - i, nil 840 } 841 842 func (m *SignVoteRequest) Marshal() (dAtA []byte, err error) { 843 size := m.Size() 844 dAtA = make([]byte, size) 845 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 846 if err != nil { 847 return nil, err 848 } 849 return dAtA[:n], nil 850 } 851 852 func (m *SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { 853 size := m.Size() 854 return m.MarshalToSizedBuffer(dAtA[:size]) 855 } 856 857 func (m *SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 858 i := len(dAtA) 859 _ = i 860 var l int 861 _ = l 862 if len(m.ChainId) > 0 { 863 i -= len(m.ChainId) 864 copy(dAtA[i:], m.ChainId) 865 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) 866 i-- 867 dAtA[i] = 0x12 868 } 869 if m.Vote != nil { 870 { 871 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 872 if err != nil { 873 return 0, err 874 } 875 i -= size 876 i = encodeVarintTypes(dAtA, i, uint64(size)) 877 } 878 i-- 879 dAtA[i] = 0xa 880 } 881 return len(dAtA) - i, nil 882 } 883 884 func (m *SignedVoteResponse) Marshal() (dAtA []byte, err error) { 885 size := m.Size() 886 dAtA = make([]byte, size) 887 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 888 if err != nil { 889 return nil, err 890 } 891 return dAtA[:n], nil 892 } 893 894 func (m *SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { 895 size := m.Size() 896 return m.MarshalToSizedBuffer(dAtA[:size]) 897 } 898 899 func (m *SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 900 i := len(dAtA) 901 _ = i 902 var l int 903 _ = l 904 if m.Error != nil { 905 { 906 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 907 if err != nil { 908 return 0, err 909 } 910 i -= size 911 i = encodeVarintTypes(dAtA, i, uint64(size)) 912 } 913 i-- 914 dAtA[i] = 0x12 915 } 916 { 917 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 918 if err != nil { 919 return 0, err 920 } 921 i -= size 922 i = encodeVarintTypes(dAtA, i, uint64(size)) 923 } 924 i-- 925 dAtA[i] = 0xa 926 return len(dAtA) - i, nil 927 } 928 929 func (m *SignProposalRequest) Marshal() (dAtA []byte, err error) { 930 size := m.Size() 931 dAtA = make([]byte, size) 932 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 933 if err != nil { 934 return nil, err 935 } 936 return dAtA[:n], nil 937 } 938 939 func (m *SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { 940 size := m.Size() 941 return m.MarshalToSizedBuffer(dAtA[:size]) 942 } 943 944 func (m *SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 945 i := len(dAtA) 946 _ = i 947 var l int 948 _ = l 949 if len(m.ChainId) > 0 { 950 i -= len(m.ChainId) 951 copy(dAtA[i:], m.ChainId) 952 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) 953 i-- 954 dAtA[i] = 0x12 955 } 956 if m.Proposal != nil { 957 { 958 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 959 if err != nil { 960 return 0, err 961 } 962 i -= size 963 i = encodeVarintTypes(dAtA, i, uint64(size)) 964 } 965 i-- 966 dAtA[i] = 0xa 967 } 968 return len(dAtA) - i, nil 969 } 970 971 func (m *SignedProposalResponse) Marshal() (dAtA []byte, err error) { 972 size := m.Size() 973 dAtA = make([]byte, size) 974 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 975 if err != nil { 976 return nil, err 977 } 978 return dAtA[:n], nil 979 } 980 981 func (m *SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { 982 size := m.Size() 983 return m.MarshalToSizedBuffer(dAtA[:size]) 984 } 985 986 func (m *SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 987 i := len(dAtA) 988 _ = i 989 var l int 990 _ = l 991 if m.Error != nil { 992 { 993 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 994 if err != nil { 995 return 0, err 996 } 997 i -= size 998 i = encodeVarintTypes(dAtA, i, uint64(size)) 999 } 1000 i-- 1001 dAtA[i] = 0x12 1002 } 1003 { 1004 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 1005 if err != nil { 1006 return 0, err 1007 } 1008 i -= size 1009 i = encodeVarintTypes(dAtA, i, uint64(size)) 1010 } 1011 i-- 1012 dAtA[i] = 0xa 1013 return len(dAtA) - i, nil 1014 } 1015 1016 func (m *PingRequest) Marshal() (dAtA []byte, err error) { 1017 size := m.Size() 1018 dAtA = make([]byte, size) 1019 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1020 if err != nil { 1021 return nil, err 1022 } 1023 return dAtA[:n], nil 1024 } 1025 1026 func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) { 1027 size := m.Size() 1028 return m.MarshalToSizedBuffer(dAtA[:size]) 1029 } 1030 1031 func (m *PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1032 i := len(dAtA) 1033 _ = i 1034 var l int 1035 _ = l 1036 return len(dAtA) - i, nil 1037 } 1038 1039 func (m *PingResponse) Marshal() (dAtA []byte, err error) { 1040 size := m.Size() 1041 dAtA = make([]byte, size) 1042 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1043 if err != nil { 1044 return nil, err 1045 } 1046 return dAtA[:n], nil 1047 } 1048 1049 func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { 1050 size := m.Size() 1051 return m.MarshalToSizedBuffer(dAtA[:size]) 1052 } 1053 1054 func (m *PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1055 i := len(dAtA) 1056 _ = i 1057 var l int 1058 _ = l 1059 return len(dAtA) - i, nil 1060 } 1061 1062 func (m *Message) Marshal() (dAtA []byte, err error) { 1063 size := m.Size() 1064 dAtA = make([]byte, size) 1065 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1066 if err != nil { 1067 return nil, err 1068 } 1069 return dAtA[:n], nil 1070 } 1071 1072 func (m *Message) MarshalTo(dAtA []byte) (int, error) { 1073 size := m.Size() 1074 return m.MarshalToSizedBuffer(dAtA[:size]) 1075 } 1076 1077 func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1078 i := len(dAtA) 1079 _ = i 1080 var l int 1081 _ = l 1082 if m.Sum != nil { 1083 { 1084 size := m.Sum.Size() 1085 i -= size 1086 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 1087 return 0, err 1088 } 1089 } 1090 } 1091 return len(dAtA) - i, nil 1092 } 1093 1094 func (m *Message_PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { 1095 size := m.Size() 1096 return m.MarshalToSizedBuffer(dAtA[:size]) 1097 } 1098 1099 func (m *Message_PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1100 i := len(dAtA) 1101 if m.PubKeyRequest != nil { 1102 { 1103 size, err := m.PubKeyRequest.MarshalToSizedBuffer(dAtA[:i]) 1104 if err != nil { 1105 return 0, err 1106 } 1107 i -= size 1108 i = encodeVarintTypes(dAtA, i, uint64(size)) 1109 } 1110 i-- 1111 dAtA[i] = 0xa 1112 } 1113 return len(dAtA) - i, nil 1114 } 1115 func (m *Message_PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { 1116 size := m.Size() 1117 return m.MarshalToSizedBuffer(dAtA[:size]) 1118 } 1119 1120 func (m *Message_PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1121 i := len(dAtA) 1122 if m.PubKeyResponse != nil { 1123 { 1124 size, err := m.PubKeyResponse.MarshalToSizedBuffer(dAtA[:i]) 1125 if err != nil { 1126 return 0, err 1127 } 1128 i -= size 1129 i = encodeVarintTypes(dAtA, i, uint64(size)) 1130 } 1131 i-- 1132 dAtA[i] = 0x12 1133 } 1134 return len(dAtA) - i, nil 1135 } 1136 func (m *Message_SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { 1137 size := m.Size() 1138 return m.MarshalToSizedBuffer(dAtA[:size]) 1139 } 1140 1141 func (m *Message_SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1142 i := len(dAtA) 1143 if m.SignVoteRequest != nil { 1144 { 1145 size, err := m.SignVoteRequest.MarshalToSizedBuffer(dAtA[:i]) 1146 if err != nil { 1147 return 0, err 1148 } 1149 i -= size 1150 i = encodeVarintTypes(dAtA, i, uint64(size)) 1151 } 1152 i-- 1153 dAtA[i] = 0x1a 1154 } 1155 return len(dAtA) - i, nil 1156 } 1157 func (m *Message_SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { 1158 size := m.Size() 1159 return m.MarshalToSizedBuffer(dAtA[:size]) 1160 } 1161 1162 func (m *Message_SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1163 i := len(dAtA) 1164 if m.SignedVoteResponse != nil { 1165 { 1166 size, err := m.SignedVoteResponse.MarshalToSizedBuffer(dAtA[:i]) 1167 if err != nil { 1168 return 0, err 1169 } 1170 i -= size 1171 i = encodeVarintTypes(dAtA, i, uint64(size)) 1172 } 1173 i-- 1174 dAtA[i] = 0x22 1175 } 1176 return len(dAtA) - i, nil 1177 } 1178 func (m *Message_SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { 1179 size := m.Size() 1180 return m.MarshalToSizedBuffer(dAtA[:size]) 1181 } 1182 1183 func (m *Message_SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1184 i := len(dAtA) 1185 if m.SignProposalRequest != nil { 1186 { 1187 size, err := m.SignProposalRequest.MarshalToSizedBuffer(dAtA[:i]) 1188 if err != nil { 1189 return 0, err 1190 } 1191 i -= size 1192 i = encodeVarintTypes(dAtA, i, uint64(size)) 1193 } 1194 i-- 1195 dAtA[i] = 0x2a 1196 } 1197 return len(dAtA) - i, nil 1198 } 1199 func (m *Message_SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { 1200 size := m.Size() 1201 return m.MarshalToSizedBuffer(dAtA[:size]) 1202 } 1203 1204 func (m *Message_SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1205 i := len(dAtA) 1206 if m.SignedProposalResponse != nil { 1207 { 1208 size, err := m.SignedProposalResponse.MarshalToSizedBuffer(dAtA[:i]) 1209 if err != nil { 1210 return 0, err 1211 } 1212 i -= size 1213 i = encodeVarintTypes(dAtA, i, uint64(size)) 1214 } 1215 i-- 1216 dAtA[i] = 0x32 1217 } 1218 return len(dAtA) - i, nil 1219 } 1220 func (m *Message_PingRequest) MarshalTo(dAtA []byte) (int, error) { 1221 size := m.Size() 1222 return m.MarshalToSizedBuffer(dAtA[:size]) 1223 } 1224 1225 func (m *Message_PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1226 i := len(dAtA) 1227 if m.PingRequest != nil { 1228 { 1229 size, err := m.PingRequest.MarshalToSizedBuffer(dAtA[:i]) 1230 if err != nil { 1231 return 0, err 1232 } 1233 i -= size 1234 i = encodeVarintTypes(dAtA, i, uint64(size)) 1235 } 1236 i-- 1237 dAtA[i] = 0x3a 1238 } 1239 return len(dAtA) - i, nil 1240 } 1241 func (m *Message_PingResponse) MarshalTo(dAtA []byte) (int, error) { 1242 size := m.Size() 1243 return m.MarshalToSizedBuffer(dAtA[:size]) 1244 } 1245 1246 func (m *Message_PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1247 i := len(dAtA) 1248 if m.PingResponse != nil { 1249 { 1250 size, err := m.PingResponse.MarshalToSizedBuffer(dAtA[:i]) 1251 if err != nil { 1252 return 0, err 1253 } 1254 i -= size 1255 i = encodeVarintTypes(dAtA, i, uint64(size)) 1256 } 1257 i-- 1258 dAtA[i] = 0x42 1259 } 1260 return len(dAtA) - i, nil 1261 } 1262 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 1263 offset -= sovTypes(v) 1264 base := offset 1265 for v >= 1<<7 { 1266 dAtA[offset] = uint8(v&0x7f | 0x80) 1267 v >>= 7 1268 offset++ 1269 } 1270 dAtA[offset] = uint8(v) 1271 return base 1272 } 1273 func (m *RemoteSignerError) Size() (n int) { 1274 if m == nil { 1275 return 0 1276 } 1277 var l int 1278 _ = l 1279 if m.Code != 0 { 1280 n += 1 + sovTypes(uint64(m.Code)) 1281 } 1282 l = len(m.Description) 1283 if l > 0 { 1284 n += 1 + l + sovTypes(uint64(l)) 1285 } 1286 return n 1287 } 1288 1289 func (m *PubKeyRequest) Size() (n int) { 1290 if m == nil { 1291 return 0 1292 } 1293 var l int 1294 _ = l 1295 l = len(m.ChainId) 1296 if l > 0 { 1297 n += 1 + l + sovTypes(uint64(l)) 1298 } 1299 return n 1300 } 1301 1302 func (m *PubKeyResponse) Size() (n int) { 1303 if m == nil { 1304 return 0 1305 } 1306 var l int 1307 _ = l 1308 l = m.PubKey.Size() 1309 n += 1 + l + sovTypes(uint64(l)) 1310 if m.Error != nil { 1311 l = m.Error.Size() 1312 n += 1 + l + sovTypes(uint64(l)) 1313 } 1314 return n 1315 } 1316 1317 func (m *SignVoteRequest) Size() (n int) { 1318 if m == nil { 1319 return 0 1320 } 1321 var l int 1322 _ = l 1323 if m.Vote != nil { 1324 l = m.Vote.Size() 1325 n += 1 + l + sovTypes(uint64(l)) 1326 } 1327 l = len(m.ChainId) 1328 if l > 0 { 1329 n += 1 + l + sovTypes(uint64(l)) 1330 } 1331 return n 1332 } 1333 1334 func (m *SignedVoteResponse) Size() (n int) { 1335 if m == nil { 1336 return 0 1337 } 1338 var l int 1339 _ = l 1340 l = m.Vote.Size() 1341 n += 1 + l + sovTypes(uint64(l)) 1342 if m.Error != nil { 1343 l = m.Error.Size() 1344 n += 1 + l + sovTypes(uint64(l)) 1345 } 1346 return n 1347 } 1348 1349 func (m *SignProposalRequest) Size() (n int) { 1350 if m == nil { 1351 return 0 1352 } 1353 var l int 1354 _ = l 1355 if m.Proposal != nil { 1356 l = m.Proposal.Size() 1357 n += 1 + l + sovTypes(uint64(l)) 1358 } 1359 l = len(m.ChainId) 1360 if l > 0 { 1361 n += 1 + l + sovTypes(uint64(l)) 1362 } 1363 return n 1364 } 1365 1366 func (m *SignedProposalResponse) Size() (n int) { 1367 if m == nil { 1368 return 0 1369 } 1370 var l int 1371 _ = l 1372 l = m.Proposal.Size() 1373 n += 1 + l + sovTypes(uint64(l)) 1374 if m.Error != nil { 1375 l = m.Error.Size() 1376 n += 1 + l + sovTypes(uint64(l)) 1377 } 1378 return n 1379 } 1380 1381 func (m *PingRequest) Size() (n int) { 1382 if m == nil { 1383 return 0 1384 } 1385 var l int 1386 _ = l 1387 return n 1388 } 1389 1390 func (m *PingResponse) Size() (n int) { 1391 if m == nil { 1392 return 0 1393 } 1394 var l int 1395 _ = l 1396 return n 1397 } 1398 1399 func (m *Message) Size() (n int) { 1400 if m == nil { 1401 return 0 1402 } 1403 var l int 1404 _ = l 1405 if m.Sum != nil { 1406 n += m.Sum.Size() 1407 } 1408 return n 1409 } 1410 1411 func (m *Message_PubKeyRequest) Size() (n int) { 1412 if m == nil { 1413 return 0 1414 } 1415 var l int 1416 _ = l 1417 if m.PubKeyRequest != nil { 1418 l = m.PubKeyRequest.Size() 1419 n += 1 + l + sovTypes(uint64(l)) 1420 } 1421 return n 1422 } 1423 func (m *Message_PubKeyResponse) Size() (n int) { 1424 if m == nil { 1425 return 0 1426 } 1427 var l int 1428 _ = l 1429 if m.PubKeyResponse != nil { 1430 l = m.PubKeyResponse.Size() 1431 n += 1 + l + sovTypes(uint64(l)) 1432 } 1433 return n 1434 } 1435 func (m *Message_SignVoteRequest) Size() (n int) { 1436 if m == nil { 1437 return 0 1438 } 1439 var l int 1440 _ = l 1441 if m.SignVoteRequest != nil { 1442 l = m.SignVoteRequest.Size() 1443 n += 1 + l + sovTypes(uint64(l)) 1444 } 1445 return n 1446 } 1447 func (m *Message_SignedVoteResponse) Size() (n int) { 1448 if m == nil { 1449 return 0 1450 } 1451 var l int 1452 _ = l 1453 if m.SignedVoteResponse != nil { 1454 l = m.SignedVoteResponse.Size() 1455 n += 1 + l + sovTypes(uint64(l)) 1456 } 1457 return n 1458 } 1459 func (m *Message_SignProposalRequest) Size() (n int) { 1460 if m == nil { 1461 return 0 1462 } 1463 var l int 1464 _ = l 1465 if m.SignProposalRequest != nil { 1466 l = m.SignProposalRequest.Size() 1467 n += 1 + l + sovTypes(uint64(l)) 1468 } 1469 return n 1470 } 1471 func (m *Message_SignedProposalResponse) Size() (n int) { 1472 if m == nil { 1473 return 0 1474 } 1475 var l int 1476 _ = l 1477 if m.SignedProposalResponse != nil { 1478 l = m.SignedProposalResponse.Size() 1479 n += 1 + l + sovTypes(uint64(l)) 1480 } 1481 return n 1482 } 1483 func (m *Message_PingRequest) Size() (n int) { 1484 if m == nil { 1485 return 0 1486 } 1487 var l int 1488 _ = l 1489 if m.PingRequest != nil { 1490 l = m.PingRequest.Size() 1491 n += 1 + l + sovTypes(uint64(l)) 1492 } 1493 return n 1494 } 1495 func (m *Message_PingResponse) Size() (n int) { 1496 if m == nil { 1497 return 0 1498 } 1499 var l int 1500 _ = l 1501 if m.PingResponse != nil { 1502 l = m.PingResponse.Size() 1503 n += 1 + l + sovTypes(uint64(l)) 1504 } 1505 return n 1506 } 1507 1508 func sovTypes(x uint64) (n int) { 1509 return (math_bits.Len64(x|1) + 6) / 7 1510 } 1511 func sozTypes(x uint64) (n int) { 1512 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1513 } 1514 func (m *RemoteSignerError) Unmarshal(dAtA []byte) error { 1515 l := len(dAtA) 1516 iNdEx := 0 1517 for iNdEx < l { 1518 preIndex := iNdEx 1519 var wire uint64 1520 for shift := uint(0); ; shift += 7 { 1521 if shift >= 64 { 1522 return ErrIntOverflowTypes 1523 } 1524 if iNdEx >= l { 1525 return io.ErrUnexpectedEOF 1526 } 1527 b := dAtA[iNdEx] 1528 iNdEx++ 1529 wire |= uint64(b&0x7F) << shift 1530 if b < 0x80 { 1531 break 1532 } 1533 } 1534 fieldNum := int32(wire >> 3) 1535 wireType := int(wire & 0x7) 1536 if wireType == 4 { 1537 return fmt.Errorf("proto: RemoteSignerError: wiretype end group for non-group") 1538 } 1539 if fieldNum <= 0 { 1540 return fmt.Errorf("proto: RemoteSignerError: illegal tag %d (wire type %d)", fieldNum, wire) 1541 } 1542 switch fieldNum { 1543 case 1: 1544 if wireType != 0 { 1545 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 1546 } 1547 m.Code = 0 1548 for shift := uint(0); ; shift += 7 { 1549 if shift >= 64 { 1550 return ErrIntOverflowTypes 1551 } 1552 if iNdEx >= l { 1553 return io.ErrUnexpectedEOF 1554 } 1555 b := dAtA[iNdEx] 1556 iNdEx++ 1557 m.Code |= int32(b&0x7F) << shift 1558 if b < 0x80 { 1559 break 1560 } 1561 } 1562 case 2: 1563 if wireType != 2 { 1564 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 1565 } 1566 var stringLen uint64 1567 for shift := uint(0); ; shift += 7 { 1568 if shift >= 64 { 1569 return ErrIntOverflowTypes 1570 } 1571 if iNdEx >= l { 1572 return io.ErrUnexpectedEOF 1573 } 1574 b := dAtA[iNdEx] 1575 iNdEx++ 1576 stringLen |= uint64(b&0x7F) << shift 1577 if b < 0x80 { 1578 break 1579 } 1580 } 1581 intStringLen := int(stringLen) 1582 if intStringLen < 0 { 1583 return ErrInvalidLengthTypes 1584 } 1585 postIndex := iNdEx + intStringLen 1586 if postIndex < 0 { 1587 return ErrInvalidLengthTypes 1588 } 1589 if postIndex > l { 1590 return io.ErrUnexpectedEOF 1591 } 1592 m.Description = string(dAtA[iNdEx:postIndex]) 1593 iNdEx = postIndex 1594 default: 1595 iNdEx = preIndex 1596 skippy, err := skipTypes(dAtA[iNdEx:]) 1597 if err != nil { 1598 return err 1599 } 1600 if (skippy < 0) || (iNdEx+skippy) < 0 { 1601 return ErrInvalidLengthTypes 1602 } 1603 if (iNdEx + skippy) > l { 1604 return io.ErrUnexpectedEOF 1605 } 1606 iNdEx += skippy 1607 } 1608 } 1609 1610 if iNdEx > l { 1611 return io.ErrUnexpectedEOF 1612 } 1613 return nil 1614 } 1615 func (m *PubKeyRequest) Unmarshal(dAtA []byte) error { 1616 l := len(dAtA) 1617 iNdEx := 0 1618 for iNdEx < l { 1619 preIndex := iNdEx 1620 var wire uint64 1621 for shift := uint(0); ; shift += 7 { 1622 if shift >= 64 { 1623 return ErrIntOverflowTypes 1624 } 1625 if iNdEx >= l { 1626 return io.ErrUnexpectedEOF 1627 } 1628 b := dAtA[iNdEx] 1629 iNdEx++ 1630 wire |= uint64(b&0x7F) << shift 1631 if b < 0x80 { 1632 break 1633 } 1634 } 1635 fieldNum := int32(wire >> 3) 1636 wireType := int(wire & 0x7) 1637 if wireType == 4 { 1638 return fmt.Errorf("proto: PubKeyRequest: wiretype end group for non-group") 1639 } 1640 if fieldNum <= 0 { 1641 return fmt.Errorf("proto: PubKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1642 } 1643 switch fieldNum { 1644 case 1: 1645 if wireType != 2 { 1646 return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) 1647 } 1648 var stringLen uint64 1649 for shift := uint(0); ; shift += 7 { 1650 if shift >= 64 { 1651 return ErrIntOverflowTypes 1652 } 1653 if iNdEx >= l { 1654 return io.ErrUnexpectedEOF 1655 } 1656 b := dAtA[iNdEx] 1657 iNdEx++ 1658 stringLen |= uint64(b&0x7F) << shift 1659 if b < 0x80 { 1660 break 1661 } 1662 } 1663 intStringLen := int(stringLen) 1664 if intStringLen < 0 { 1665 return ErrInvalidLengthTypes 1666 } 1667 postIndex := iNdEx + intStringLen 1668 if postIndex < 0 { 1669 return ErrInvalidLengthTypes 1670 } 1671 if postIndex > l { 1672 return io.ErrUnexpectedEOF 1673 } 1674 m.ChainId = string(dAtA[iNdEx:postIndex]) 1675 iNdEx = postIndex 1676 default: 1677 iNdEx = preIndex 1678 skippy, err := skipTypes(dAtA[iNdEx:]) 1679 if err != nil { 1680 return err 1681 } 1682 if (skippy < 0) || (iNdEx+skippy) < 0 { 1683 return ErrInvalidLengthTypes 1684 } 1685 if (iNdEx + skippy) > l { 1686 return io.ErrUnexpectedEOF 1687 } 1688 iNdEx += skippy 1689 } 1690 } 1691 1692 if iNdEx > l { 1693 return io.ErrUnexpectedEOF 1694 } 1695 return nil 1696 } 1697 func (m *PubKeyResponse) Unmarshal(dAtA []byte) error { 1698 l := len(dAtA) 1699 iNdEx := 0 1700 for iNdEx < l { 1701 preIndex := iNdEx 1702 var wire uint64 1703 for shift := uint(0); ; shift += 7 { 1704 if shift >= 64 { 1705 return ErrIntOverflowTypes 1706 } 1707 if iNdEx >= l { 1708 return io.ErrUnexpectedEOF 1709 } 1710 b := dAtA[iNdEx] 1711 iNdEx++ 1712 wire |= uint64(b&0x7F) << shift 1713 if b < 0x80 { 1714 break 1715 } 1716 } 1717 fieldNum := int32(wire >> 3) 1718 wireType := int(wire & 0x7) 1719 if wireType == 4 { 1720 return fmt.Errorf("proto: PubKeyResponse: wiretype end group for non-group") 1721 } 1722 if fieldNum <= 0 { 1723 return fmt.Errorf("proto: PubKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1724 } 1725 switch fieldNum { 1726 case 1: 1727 if wireType != 2 { 1728 return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) 1729 } 1730 var msglen int 1731 for shift := uint(0); ; shift += 7 { 1732 if shift >= 64 { 1733 return ErrIntOverflowTypes 1734 } 1735 if iNdEx >= l { 1736 return io.ErrUnexpectedEOF 1737 } 1738 b := dAtA[iNdEx] 1739 iNdEx++ 1740 msglen |= int(b&0x7F) << shift 1741 if b < 0x80 { 1742 break 1743 } 1744 } 1745 if msglen < 0 { 1746 return ErrInvalidLengthTypes 1747 } 1748 postIndex := iNdEx + msglen 1749 if postIndex < 0 { 1750 return ErrInvalidLengthTypes 1751 } 1752 if postIndex > l { 1753 return io.ErrUnexpectedEOF 1754 } 1755 if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1756 return err 1757 } 1758 iNdEx = postIndex 1759 case 2: 1760 if wireType != 2 { 1761 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 1762 } 1763 var msglen int 1764 for shift := uint(0); ; shift += 7 { 1765 if shift >= 64 { 1766 return ErrIntOverflowTypes 1767 } 1768 if iNdEx >= l { 1769 return io.ErrUnexpectedEOF 1770 } 1771 b := dAtA[iNdEx] 1772 iNdEx++ 1773 msglen |= int(b&0x7F) << shift 1774 if b < 0x80 { 1775 break 1776 } 1777 } 1778 if msglen < 0 { 1779 return ErrInvalidLengthTypes 1780 } 1781 postIndex := iNdEx + msglen 1782 if postIndex < 0 { 1783 return ErrInvalidLengthTypes 1784 } 1785 if postIndex > l { 1786 return io.ErrUnexpectedEOF 1787 } 1788 if m.Error == nil { 1789 m.Error = &RemoteSignerError{} 1790 } 1791 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1792 return err 1793 } 1794 iNdEx = postIndex 1795 default: 1796 iNdEx = preIndex 1797 skippy, err := skipTypes(dAtA[iNdEx:]) 1798 if err != nil { 1799 return err 1800 } 1801 if (skippy < 0) || (iNdEx+skippy) < 0 { 1802 return ErrInvalidLengthTypes 1803 } 1804 if (iNdEx + skippy) > l { 1805 return io.ErrUnexpectedEOF 1806 } 1807 iNdEx += skippy 1808 } 1809 } 1810 1811 if iNdEx > l { 1812 return io.ErrUnexpectedEOF 1813 } 1814 return nil 1815 } 1816 func (m *SignVoteRequest) Unmarshal(dAtA []byte) error { 1817 l := len(dAtA) 1818 iNdEx := 0 1819 for iNdEx < l { 1820 preIndex := iNdEx 1821 var wire uint64 1822 for shift := uint(0); ; shift += 7 { 1823 if shift >= 64 { 1824 return ErrIntOverflowTypes 1825 } 1826 if iNdEx >= l { 1827 return io.ErrUnexpectedEOF 1828 } 1829 b := dAtA[iNdEx] 1830 iNdEx++ 1831 wire |= uint64(b&0x7F) << shift 1832 if b < 0x80 { 1833 break 1834 } 1835 } 1836 fieldNum := int32(wire >> 3) 1837 wireType := int(wire & 0x7) 1838 if wireType == 4 { 1839 return fmt.Errorf("proto: SignVoteRequest: wiretype end group for non-group") 1840 } 1841 if fieldNum <= 0 { 1842 return fmt.Errorf("proto: SignVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1843 } 1844 switch fieldNum { 1845 case 1: 1846 if wireType != 2 { 1847 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 1848 } 1849 var msglen int 1850 for shift := uint(0); ; shift += 7 { 1851 if shift >= 64 { 1852 return ErrIntOverflowTypes 1853 } 1854 if iNdEx >= l { 1855 return io.ErrUnexpectedEOF 1856 } 1857 b := dAtA[iNdEx] 1858 iNdEx++ 1859 msglen |= int(b&0x7F) << shift 1860 if b < 0x80 { 1861 break 1862 } 1863 } 1864 if msglen < 0 { 1865 return ErrInvalidLengthTypes 1866 } 1867 postIndex := iNdEx + msglen 1868 if postIndex < 0 { 1869 return ErrInvalidLengthTypes 1870 } 1871 if postIndex > l { 1872 return io.ErrUnexpectedEOF 1873 } 1874 if m.Vote == nil { 1875 m.Vote = &types.Vote{} 1876 } 1877 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1878 return err 1879 } 1880 iNdEx = postIndex 1881 case 2: 1882 if wireType != 2 { 1883 return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) 1884 } 1885 var stringLen uint64 1886 for shift := uint(0); ; shift += 7 { 1887 if shift >= 64 { 1888 return ErrIntOverflowTypes 1889 } 1890 if iNdEx >= l { 1891 return io.ErrUnexpectedEOF 1892 } 1893 b := dAtA[iNdEx] 1894 iNdEx++ 1895 stringLen |= uint64(b&0x7F) << shift 1896 if b < 0x80 { 1897 break 1898 } 1899 } 1900 intStringLen := int(stringLen) 1901 if intStringLen < 0 { 1902 return ErrInvalidLengthTypes 1903 } 1904 postIndex := iNdEx + intStringLen 1905 if postIndex < 0 { 1906 return ErrInvalidLengthTypes 1907 } 1908 if postIndex > l { 1909 return io.ErrUnexpectedEOF 1910 } 1911 m.ChainId = string(dAtA[iNdEx:postIndex]) 1912 iNdEx = postIndex 1913 default: 1914 iNdEx = preIndex 1915 skippy, err := skipTypes(dAtA[iNdEx:]) 1916 if err != nil { 1917 return err 1918 } 1919 if (skippy < 0) || (iNdEx+skippy) < 0 { 1920 return ErrInvalidLengthTypes 1921 } 1922 if (iNdEx + skippy) > l { 1923 return io.ErrUnexpectedEOF 1924 } 1925 iNdEx += skippy 1926 } 1927 } 1928 1929 if iNdEx > l { 1930 return io.ErrUnexpectedEOF 1931 } 1932 return nil 1933 } 1934 func (m *SignedVoteResponse) Unmarshal(dAtA []byte) error { 1935 l := len(dAtA) 1936 iNdEx := 0 1937 for iNdEx < l { 1938 preIndex := iNdEx 1939 var wire uint64 1940 for shift := uint(0); ; shift += 7 { 1941 if shift >= 64 { 1942 return ErrIntOverflowTypes 1943 } 1944 if iNdEx >= l { 1945 return io.ErrUnexpectedEOF 1946 } 1947 b := dAtA[iNdEx] 1948 iNdEx++ 1949 wire |= uint64(b&0x7F) << shift 1950 if b < 0x80 { 1951 break 1952 } 1953 } 1954 fieldNum := int32(wire >> 3) 1955 wireType := int(wire & 0x7) 1956 if wireType == 4 { 1957 return fmt.Errorf("proto: SignedVoteResponse: wiretype end group for non-group") 1958 } 1959 if fieldNum <= 0 { 1960 return fmt.Errorf("proto: SignedVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1961 } 1962 switch fieldNum { 1963 case 1: 1964 if wireType != 2 { 1965 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 1966 } 1967 var msglen int 1968 for shift := uint(0); ; shift += 7 { 1969 if shift >= 64 { 1970 return ErrIntOverflowTypes 1971 } 1972 if iNdEx >= l { 1973 return io.ErrUnexpectedEOF 1974 } 1975 b := dAtA[iNdEx] 1976 iNdEx++ 1977 msglen |= int(b&0x7F) << shift 1978 if b < 0x80 { 1979 break 1980 } 1981 } 1982 if msglen < 0 { 1983 return ErrInvalidLengthTypes 1984 } 1985 postIndex := iNdEx + msglen 1986 if postIndex < 0 { 1987 return ErrInvalidLengthTypes 1988 } 1989 if postIndex > l { 1990 return io.ErrUnexpectedEOF 1991 } 1992 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1993 return err 1994 } 1995 iNdEx = postIndex 1996 case 2: 1997 if wireType != 2 { 1998 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 1999 } 2000 var msglen int 2001 for shift := uint(0); ; shift += 7 { 2002 if shift >= 64 { 2003 return ErrIntOverflowTypes 2004 } 2005 if iNdEx >= l { 2006 return io.ErrUnexpectedEOF 2007 } 2008 b := dAtA[iNdEx] 2009 iNdEx++ 2010 msglen |= int(b&0x7F) << shift 2011 if b < 0x80 { 2012 break 2013 } 2014 } 2015 if msglen < 0 { 2016 return ErrInvalidLengthTypes 2017 } 2018 postIndex := iNdEx + msglen 2019 if postIndex < 0 { 2020 return ErrInvalidLengthTypes 2021 } 2022 if postIndex > l { 2023 return io.ErrUnexpectedEOF 2024 } 2025 if m.Error == nil { 2026 m.Error = &RemoteSignerError{} 2027 } 2028 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2029 return err 2030 } 2031 iNdEx = postIndex 2032 default: 2033 iNdEx = preIndex 2034 skippy, err := skipTypes(dAtA[iNdEx:]) 2035 if err != nil { 2036 return err 2037 } 2038 if (skippy < 0) || (iNdEx+skippy) < 0 { 2039 return ErrInvalidLengthTypes 2040 } 2041 if (iNdEx + skippy) > l { 2042 return io.ErrUnexpectedEOF 2043 } 2044 iNdEx += skippy 2045 } 2046 } 2047 2048 if iNdEx > l { 2049 return io.ErrUnexpectedEOF 2050 } 2051 return nil 2052 } 2053 func (m *SignProposalRequest) Unmarshal(dAtA []byte) error { 2054 l := len(dAtA) 2055 iNdEx := 0 2056 for iNdEx < l { 2057 preIndex := iNdEx 2058 var wire uint64 2059 for shift := uint(0); ; shift += 7 { 2060 if shift >= 64 { 2061 return ErrIntOverflowTypes 2062 } 2063 if iNdEx >= l { 2064 return io.ErrUnexpectedEOF 2065 } 2066 b := dAtA[iNdEx] 2067 iNdEx++ 2068 wire |= uint64(b&0x7F) << shift 2069 if b < 0x80 { 2070 break 2071 } 2072 } 2073 fieldNum := int32(wire >> 3) 2074 wireType := int(wire & 0x7) 2075 if wireType == 4 { 2076 return fmt.Errorf("proto: SignProposalRequest: wiretype end group for non-group") 2077 } 2078 if fieldNum <= 0 { 2079 return fmt.Errorf("proto: SignProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2080 } 2081 switch fieldNum { 2082 case 1: 2083 if wireType != 2 { 2084 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 2085 } 2086 var msglen int 2087 for shift := uint(0); ; shift += 7 { 2088 if shift >= 64 { 2089 return ErrIntOverflowTypes 2090 } 2091 if iNdEx >= l { 2092 return io.ErrUnexpectedEOF 2093 } 2094 b := dAtA[iNdEx] 2095 iNdEx++ 2096 msglen |= int(b&0x7F) << shift 2097 if b < 0x80 { 2098 break 2099 } 2100 } 2101 if msglen < 0 { 2102 return ErrInvalidLengthTypes 2103 } 2104 postIndex := iNdEx + msglen 2105 if postIndex < 0 { 2106 return ErrInvalidLengthTypes 2107 } 2108 if postIndex > l { 2109 return io.ErrUnexpectedEOF 2110 } 2111 if m.Proposal == nil { 2112 m.Proposal = &types.Proposal{} 2113 } 2114 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2115 return err 2116 } 2117 iNdEx = postIndex 2118 case 2: 2119 if wireType != 2 { 2120 return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) 2121 } 2122 var stringLen uint64 2123 for shift := uint(0); ; shift += 7 { 2124 if shift >= 64 { 2125 return ErrIntOverflowTypes 2126 } 2127 if iNdEx >= l { 2128 return io.ErrUnexpectedEOF 2129 } 2130 b := dAtA[iNdEx] 2131 iNdEx++ 2132 stringLen |= uint64(b&0x7F) << shift 2133 if b < 0x80 { 2134 break 2135 } 2136 } 2137 intStringLen := int(stringLen) 2138 if intStringLen < 0 { 2139 return ErrInvalidLengthTypes 2140 } 2141 postIndex := iNdEx + intStringLen 2142 if postIndex < 0 { 2143 return ErrInvalidLengthTypes 2144 } 2145 if postIndex > l { 2146 return io.ErrUnexpectedEOF 2147 } 2148 m.ChainId = string(dAtA[iNdEx:postIndex]) 2149 iNdEx = postIndex 2150 default: 2151 iNdEx = preIndex 2152 skippy, err := skipTypes(dAtA[iNdEx:]) 2153 if err != nil { 2154 return err 2155 } 2156 if (skippy < 0) || (iNdEx+skippy) < 0 { 2157 return ErrInvalidLengthTypes 2158 } 2159 if (iNdEx + skippy) > l { 2160 return io.ErrUnexpectedEOF 2161 } 2162 iNdEx += skippy 2163 } 2164 } 2165 2166 if iNdEx > l { 2167 return io.ErrUnexpectedEOF 2168 } 2169 return nil 2170 } 2171 func (m *SignedProposalResponse) Unmarshal(dAtA []byte) error { 2172 l := len(dAtA) 2173 iNdEx := 0 2174 for iNdEx < l { 2175 preIndex := iNdEx 2176 var wire uint64 2177 for shift := uint(0); ; shift += 7 { 2178 if shift >= 64 { 2179 return ErrIntOverflowTypes 2180 } 2181 if iNdEx >= l { 2182 return io.ErrUnexpectedEOF 2183 } 2184 b := dAtA[iNdEx] 2185 iNdEx++ 2186 wire |= uint64(b&0x7F) << shift 2187 if b < 0x80 { 2188 break 2189 } 2190 } 2191 fieldNum := int32(wire >> 3) 2192 wireType := int(wire & 0x7) 2193 if wireType == 4 { 2194 return fmt.Errorf("proto: SignedProposalResponse: wiretype end group for non-group") 2195 } 2196 if fieldNum <= 0 { 2197 return fmt.Errorf("proto: SignedProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2198 } 2199 switch fieldNum { 2200 case 1: 2201 if wireType != 2 { 2202 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 2203 } 2204 var msglen int 2205 for shift := uint(0); ; shift += 7 { 2206 if shift >= 64 { 2207 return ErrIntOverflowTypes 2208 } 2209 if iNdEx >= l { 2210 return io.ErrUnexpectedEOF 2211 } 2212 b := dAtA[iNdEx] 2213 iNdEx++ 2214 msglen |= int(b&0x7F) << shift 2215 if b < 0x80 { 2216 break 2217 } 2218 } 2219 if msglen < 0 { 2220 return ErrInvalidLengthTypes 2221 } 2222 postIndex := iNdEx + msglen 2223 if postIndex < 0 { 2224 return ErrInvalidLengthTypes 2225 } 2226 if postIndex > l { 2227 return io.ErrUnexpectedEOF 2228 } 2229 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2230 return err 2231 } 2232 iNdEx = postIndex 2233 case 2: 2234 if wireType != 2 { 2235 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 2236 } 2237 var msglen int 2238 for shift := uint(0); ; shift += 7 { 2239 if shift >= 64 { 2240 return ErrIntOverflowTypes 2241 } 2242 if iNdEx >= l { 2243 return io.ErrUnexpectedEOF 2244 } 2245 b := dAtA[iNdEx] 2246 iNdEx++ 2247 msglen |= int(b&0x7F) << shift 2248 if b < 0x80 { 2249 break 2250 } 2251 } 2252 if msglen < 0 { 2253 return ErrInvalidLengthTypes 2254 } 2255 postIndex := iNdEx + msglen 2256 if postIndex < 0 { 2257 return ErrInvalidLengthTypes 2258 } 2259 if postIndex > l { 2260 return io.ErrUnexpectedEOF 2261 } 2262 if m.Error == nil { 2263 m.Error = &RemoteSignerError{} 2264 } 2265 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2266 return err 2267 } 2268 iNdEx = postIndex 2269 default: 2270 iNdEx = preIndex 2271 skippy, err := skipTypes(dAtA[iNdEx:]) 2272 if err != nil { 2273 return err 2274 } 2275 if (skippy < 0) || (iNdEx+skippy) < 0 { 2276 return ErrInvalidLengthTypes 2277 } 2278 if (iNdEx + skippy) > l { 2279 return io.ErrUnexpectedEOF 2280 } 2281 iNdEx += skippy 2282 } 2283 } 2284 2285 if iNdEx > l { 2286 return io.ErrUnexpectedEOF 2287 } 2288 return nil 2289 } 2290 func (m *PingRequest) Unmarshal(dAtA []byte) error { 2291 l := len(dAtA) 2292 iNdEx := 0 2293 for iNdEx < l { 2294 preIndex := iNdEx 2295 var wire uint64 2296 for shift := uint(0); ; shift += 7 { 2297 if shift >= 64 { 2298 return ErrIntOverflowTypes 2299 } 2300 if iNdEx >= l { 2301 return io.ErrUnexpectedEOF 2302 } 2303 b := dAtA[iNdEx] 2304 iNdEx++ 2305 wire |= uint64(b&0x7F) << shift 2306 if b < 0x80 { 2307 break 2308 } 2309 } 2310 fieldNum := int32(wire >> 3) 2311 wireType := int(wire & 0x7) 2312 if wireType == 4 { 2313 return fmt.Errorf("proto: PingRequest: wiretype end group for non-group") 2314 } 2315 if fieldNum <= 0 { 2316 return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2317 } 2318 switch fieldNum { 2319 default: 2320 iNdEx = preIndex 2321 skippy, err := skipTypes(dAtA[iNdEx:]) 2322 if err != nil { 2323 return err 2324 } 2325 if (skippy < 0) || (iNdEx+skippy) < 0 { 2326 return ErrInvalidLengthTypes 2327 } 2328 if (iNdEx + skippy) > l { 2329 return io.ErrUnexpectedEOF 2330 } 2331 iNdEx += skippy 2332 } 2333 } 2334 2335 if iNdEx > l { 2336 return io.ErrUnexpectedEOF 2337 } 2338 return nil 2339 } 2340 func (m *PingResponse) Unmarshal(dAtA []byte) error { 2341 l := len(dAtA) 2342 iNdEx := 0 2343 for iNdEx < l { 2344 preIndex := iNdEx 2345 var wire uint64 2346 for shift := uint(0); ; shift += 7 { 2347 if shift >= 64 { 2348 return ErrIntOverflowTypes 2349 } 2350 if iNdEx >= l { 2351 return io.ErrUnexpectedEOF 2352 } 2353 b := dAtA[iNdEx] 2354 iNdEx++ 2355 wire |= uint64(b&0x7F) << shift 2356 if b < 0x80 { 2357 break 2358 } 2359 } 2360 fieldNum := int32(wire >> 3) 2361 wireType := int(wire & 0x7) 2362 if wireType == 4 { 2363 return fmt.Errorf("proto: PingResponse: wiretype end group for non-group") 2364 } 2365 if fieldNum <= 0 { 2366 return fmt.Errorf("proto: PingResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2367 } 2368 switch fieldNum { 2369 default: 2370 iNdEx = preIndex 2371 skippy, err := skipTypes(dAtA[iNdEx:]) 2372 if err != nil { 2373 return err 2374 } 2375 if (skippy < 0) || (iNdEx+skippy) < 0 { 2376 return ErrInvalidLengthTypes 2377 } 2378 if (iNdEx + skippy) > l { 2379 return io.ErrUnexpectedEOF 2380 } 2381 iNdEx += skippy 2382 } 2383 } 2384 2385 if iNdEx > l { 2386 return io.ErrUnexpectedEOF 2387 } 2388 return nil 2389 } 2390 func (m *Message) Unmarshal(dAtA []byte) error { 2391 l := len(dAtA) 2392 iNdEx := 0 2393 for iNdEx < l { 2394 preIndex := iNdEx 2395 var wire uint64 2396 for shift := uint(0); ; shift += 7 { 2397 if shift >= 64 { 2398 return ErrIntOverflowTypes 2399 } 2400 if iNdEx >= l { 2401 return io.ErrUnexpectedEOF 2402 } 2403 b := dAtA[iNdEx] 2404 iNdEx++ 2405 wire |= uint64(b&0x7F) << shift 2406 if b < 0x80 { 2407 break 2408 } 2409 } 2410 fieldNum := int32(wire >> 3) 2411 wireType := int(wire & 0x7) 2412 if wireType == 4 { 2413 return fmt.Errorf("proto: Message: wiretype end group for non-group") 2414 } 2415 if fieldNum <= 0 { 2416 return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) 2417 } 2418 switch fieldNum { 2419 case 1: 2420 if wireType != 2 { 2421 return fmt.Errorf("proto: wrong wireType = %d for field PubKeyRequest", wireType) 2422 } 2423 var msglen int 2424 for shift := uint(0); ; shift += 7 { 2425 if shift >= 64 { 2426 return ErrIntOverflowTypes 2427 } 2428 if iNdEx >= l { 2429 return io.ErrUnexpectedEOF 2430 } 2431 b := dAtA[iNdEx] 2432 iNdEx++ 2433 msglen |= int(b&0x7F) << shift 2434 if b < 0x80 { 2435 break 2436 } 2437 } 2438 if msglen < 0 { 2439 return ErrInvalidLengthTypes 2440 } 2441 postIndex := iNdEx + msglen 2442 if postIndex < 0 { 2443 return ErrInvalidLengthTypes 2444 } 2445 if postIndex > l { 2446 return io.ErrUnexpectedEOF 2447 } 2448 v := &PubKeyRequest{} 2449 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2450 return err 2451 } 2452 m.Sum = &Message_PubKeyRequest{v} 2453 iNdEx = postIndex 2454 case 2: 2455 if wireType != 2 { 2456 return fmt.Errorf("proto: wrong wireType = %d for field PubKeyResponse", wireType) 2457 } 2458 var msglen int 2459 for shift := uint(0); ; shift += 7 { 2460 if shift >= 64 { 2461 return ErrIntOverflowTypes 2462 } 2463 if iNdEx >= l { 2464 return io.ErrUnexpectedEOF 2465 } 2466 b := dAtA[iNdEx] 2467 iNdEx++ 2468 msglen |= int(b&0x7F) << shift 2469 if b < 0x80 { 2470 break 2471 } 2472 } 2473 if msglen < 0 { 2474 return ErrInvalidLengthTypes 2475 } 2476 postIndex := iNdEx + msglen 2477 if postIndex < 0 { 2478 return ErrInvalidLengthTypes 2479 } 2480 if postIndex > l { 2481 return io.ErrUnexpectedEOF 2482 } 2483 v := &PubKeyResponse{} 2484 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2485 return err 2486 } 2487 m.Sum = &Message_PubKeyResponse{v} 2488 iNdEx = postIndex 2489 case 3: 2490 if wireType != 2 { 2491 return fmt.Errorf("proto: wrong wireType = %d for field SignVoteRequest", wireType) 2492 } 2493 var msglen int 2494 for shift := uint(0); ; shift += 7 { 2495 if shift >= 64 { 2496 return ErrIntOverflowTypes 2497 } 2498 if iNdEx >= l { 2499 return io.ErrUnexpectedEOF 2500 } 2501 b := dAtA[iNdEx] 2502 iNdEx++ 2503 msglen |= int(b&0x7F) << shift 2504 if b < 0x80 { 2505 break 2506 } 2507 } 2508 if msglen < 0 { 2509 return ErrInvalidLengthTypes 2510 } 2511 postIndex := iNdEx + msglen 2512 if postIndex < 0 { 2513 return ErrInvalidLengthTypes 2514 } 2515 if postIndex > l { 2516 return io.ErrUnexpectedEOF 2517 } 2518 v := &SignVoteRequest{} 2519 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2520 return err 2521 } 2522 m.Sum = &Message_SignVoteRequest{v} 2523 iNdEx = postIndex 2524 case 4: 2525 if wireType != 2 { 2526 return fmt.Errorf("proto: wrong wireType = %d for field SignedVoteResponse", wireType) 2527 } 2528 var msglen int 2529 for shift := uint(0); ; shift += 7 { 2530 if shift >= 64 { 2531 return ErrIntOverflowTypes 2532 } 2533 if iNdEx >= l { 2534 return io.ErrUnexpectedEOF 2535 } 2536 b := dAtA[iNdEx] 2537 iNdEx++ 2538 msglen |= int(b&0x7F) << shift 2539 if b < 0x80 { 2540 break 2541 } 2542 } 2543 if msglen < 0 { 2544 return ErrInvalidLengthTypes 2545 } 2546 postIndex := iNdEx + msglen 2547 if postIndex < 0 { 2548 return ErrInvalidLengthTypes 2549 } 2550 if postIndex > l { 2551 return io.ErrUnexpectedEOF 2552 } 2553 v := &SignedVoteResponse{} 2554 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2555 return err 2556 } 2557 m.Sum = &Message_SignedVoteResponse{v} 2558 iNdEx = postIndex 2559 case 5: 2560 if wireType != 2 { 2561 return fmt.Errorf("proto: wrong wireType = %d for field SignProposalRequest", wireType) 2562 } 2563 var msglen int 2564 for shift := uint(0); ; shift += 7 { 2565 if shift >= 64 { 2566 return ErrIntOverflowTypes 2567 } 2568 if iNdEx >= l { 2569 return io.ErrUnexpectedEOF 2570 } 2571 b := dAtA[iNdEx] 2572 iNdEx++ 2573 msglen |= int(b&0x7F) << shift 2574 if b < 0x80 { 2575 break 2576 } 2577 } 2578 if msglen < 0 { 2579 return ErrInvalidLengthTypes 2580 } 2581 postIndex := iNdEx + msglen 2582 if postIndex < 0 { 2583 return ErrInvalidLengthTypes 2584 } 2585 if postIndex > l { 2586 return io.ErrUnexpectedEOF 2587 } 2588 v := &SignProposalRequest{} 2589 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2590 return err 2591 } 2592 m.Sum = &Message_SignProposalRequest{v} 2593 iNdEx = postIndex 2594 case 6: 2595 if wireType != 2 { 2596 return fmt.Errorf("proto: wrong wireType = %d for field SignedProposalResponse", wireType) 2597 } 2598 var msglen int 2599 for shift := uint(0); ; shift += 7 { 2600 if shift >= 64 { 2601 return ErrIntOverflowTypes 2602 } 2603 if iNdEx >= l { 2604 return io.ErrUnexpectedEOF 2605 } 2606 b := dAtA[iNdEx] 2607 iNdEx++ 2608 msglen |= int(b&0x7F) << shift 2609 if b < 0x80 { 2610 break 2611 } 2612 } 2613 if msglen < 0 { 2614 return ErrInvalidLengthTypes 2615 } 2616 postIndex := iNdEx + msglen 2617 if postIndex < 0 { 2618 return ErrInvalidLengthTypes 2619 } 2620 if postIndex > l { 2621 return io.ErrUnexpectedEOF 2622 } 2623 v := &SignedProposalResponse{} 2624 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2625 return err 2626 } 2627 m.Sum = &Message_SignedProposalResponse{v} 2628 iNdEx = postIndex 2629 case 7: 2630 if wireType != 2 { 2631 return fmt.Errorf("proto: wrong wireType = %d for field PingRequest", wireType) 2632 } 2633 var msglen int 2634 for shift := uint(0); ; shift += 7 { 2635 if shift >= 64 { 2636 return ErrIntOverflowTypes 2637 } 2638 if iNdEx >= l { 2639 return io.ErrUnexpectedEOF 2640 } 2641 b := dAtA[iNdEx] 2642 iNdEx++ 2643 msglen |= int(b&0x7F) << shift 2644 if b < 0x80 { 2645 break 2646 } 2647 } 2648 if msglen < 0 { 2649 return ErrInvalidLengthTypes 2650 } 2651 postIndex := iNdEx + msglen 2652 if postIndex < 0 { 2653 return ErrInvalidLengthTypes 2654 } 2655 if postIndex > l { 2656 return io.ErrUnexpectedEOF 2657 } 2658 v := &PingRequest{} 2659 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2660 return err 2661 } 2662 m.Sum = &Message_PingRequest{v} 2663 iNdEx = postIndex 2664 case 8: 2665 if wireType != 2 { 2666 return fmt.Errorf("proto: wrong wireType = %d for field PingResponse", wireType) 2667 } 2668 var msglen int 2669 for shift := uint(0); ; shift += 7 { 2670 if shift >= 64 { 2671 return ErrIntOverflowTypes 2672 } 2673 if iNdEx >= l { 2674 return io.ErrUnexpectedEOF 2675 } 2676 b := dAtA[iNdEx] 2677 iNdEx++ 2678 msglen |= int(b&0x7F) << shift 2679 if b < 0x80 { 2680 break 2681 } 2682 } 2683 if msglen < 0 { 2684 return ErrInvalidLengthTypes 2685 } 2686 postIndex := iNdEx + msglen 2687 if postIndex < 0 { 2688 return ErrInvalidLengthTypes 2689 } 2690 if postIndex > l { 2691 return io.ErrUnexpectedEOF 2692 } 2693 v := &PingResponse{} 2694 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2695 return err 2696 } 2697 m.Sum = &Message_PingResponse{v} 2698 iNdEx = postIndex 2699 default: 2700 iNdEx = preIndex 2701 skippy, err := skipTypes(dAtA[iNdEx:]) 2702 if err != nil { 2703 return err 2704 } 2705 if (skippy < 0) || (iNdEx+skippy) < 0 { 2706 return ErrInvalidLengthTypes 2707 } 2708 if (iNdEx + skippy) > l { 2709 return io.ErrUnexpectedEOF 2710 } 2711 iNdEx += skippy 2712 } 2713 } 2714 2715 if iNdEx > l { 2716 return io.ErrUnexpectedEOF 2717 } 2718 return nil 2719 } 2720 func skipTypes(dAtA []byte) (n int, err error) { 2721 l := len(dAtA) 2722 iNdEx := 0 2723 depth := 0 2724 for iNdEx < l { 2725 var wire uint64 2726 for shift := uint(0); ; shift += 7 { 2727 if shift >= 64 { 2728 return 0, ErrIntOverflowTypes 2729 } 2730 if iNdEx >= l { 2731 return 0, io.ErrUnexpectedEOF 2732 } 2733 b := dAtA[iNdEx] 2734 iNdEx++ 2735 wire |= (uint64(b) & 0x7F) << shift 2736 if b < 0x80 { 2737 break 2738 } 2739 } 2740 wireType := int(wire & 0x7) 2741 switch wireType { 2742 case 0: 2743 for shift := uint(0); ; shift += 7 { 2744 if shift >= 64 { 2745 return 0, ErrIntOverflowTypes 2746 } 2747 if iNdEx >= l { 2748 return 0, io.ErrUnexpectedEOF 2749 } 2750 iNdEx++ 2751 if dAtA[iNdEx-1] < 0x80 { 2752 break 2753 } 2754 } 2755 case 1: 2756 iNdEx += 8 2757 case 2: 2758 var length int 2759 for shift := uint(0); ; shift += 7 { 2760 if shift >= 64 { 2761 return 0, ErrIntOverflowTypes 2762 } 2763 if iNdEx >= l { 2764 return 0, io.ErrUnexpectedEOF 2765 } 2766 b := dAtA[iNdEx] 2767 iNdEx++ 2768 length |= (int(b) & 0x7F) << shift 2769 if b < 0x80 { 2770 break 2771 } 2772 } 2773 if length < 0 { 2774 return 0, ErrInvalidLengthTypes 2775 } 2776 iNdEx += length 2777 case 3: 2778 depth++ 2779 case 4: 2780 if depth == 0 { 2781 return 0, ErrUnexpectedEndOfGroupTypes 2782 } 2783 depth-- 2784 case 5: 2785 iNdEx += 4 2786 default: 2787 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2788 } 2789 if iNdEx < 0 { 2790 return 0, ErrInvalidLengthTypes 2791 } 2792 if depth == 0 { 2793 return iNdEx, nil 2794 } 2795 } 2796 return 0, io.ErrUnexpectedEOF 2797 } 2798 2799 var ( 2800 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 2801 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 2802 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 2803 )