github.com/supragya/TendermintConnector@v0.0.0-20210619045051-113e32b84fb1/chains/tm34/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 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 crypto "github.com/supragya/TendermintConnector/chains/tm34/proto/tendermint/crypto" 11 types "github.com/supragya/TendermintConnector/chains/tm34/proto/tendermint/types" 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 // 773 bytes of a gzipped FileDescriptorProto 682 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcb, 0x4e, 0xf3, 0x46, 683 0x14, 0xb6, 0x21, 0x17, 0xfe, 0x13, 0x12, 0xf2, 0x0f, 0x94, 0x86, 0x88, 0x9a, 0x34, 0x55, 0x5b, 684 0x94, 0x45, 0x5c, 0x41, 0xd5, 0x0d, 0xdd, 0x94, 0x60, 0x35, 0x51, 0x8a, 0x93, 0x4e, 0x42, 0x41, 685 0x48, 0x95, 0x95, 0xcb, 0x60, 0x2c, 0x88, 0x67, 0xea, 0x71, 0x90, 0xb2, 0xee, 0xae, 0xab, 0x4a, 686 0x7d, 0x89, 0xae, 0xfb, 0x14, 0x2c, 0x59, 0x76, 0x55, 0x55, 0xf0, 0x22, 0x55, 0xc6, 0x13, 0xc7, 687 0xb9, 0xa1, 0xfe, 0x62, 0x37, 0x73, 0xce, 0x99, 0xef, 0x32, 0xf3, 0x25, 0x06, 0xcd, 0x27, 0x6e, 688 0x9f, 0x78, 0x03, 0xc7, 0xf5, 0x75, 0xe6, 0x39, 0x0f, 0x0f, 0x9d, 0x7b, 0xdd, 0x1f, 0x31, 0xc2, 689 0xcb, 0xcc, 0xa3, 0x3e, 0x45, 0x68, 0xda, 0x2f, 0xcb, 0x7e, 0x7e, 0x3f, 0x72, 0xa6, 0xe7, 0x8d, 690 0x98, 0x4f, 0xf5, 0x3b, 0x32, 0x92, 0x27, 0x66, 0xba, 0x02, 0x29, 0x8a, 0x97, 0xdf, 0xb1, 0xa9, 691 0x4d, 0xc5, 0x52, 0x1f, 0xaf, 0x82, 0x6a, 0xb1, 0x06, 0xef, 0x31, 0x19, 0x50, 0x9f, 0xb4, 0x1c, 692 0xdb, 0x25, 0x9e, 0xe1, 0x79, 0xd4, 0x43, 0x08, 0x62, 0x3d, 0xda, 0x27, 0x39, 0xb5, 0xa0, 0x1e, 693 0xc6, 0xb1, 0x58, 0xa3, 0x02, 0xa4, 0xfa, 0x84, 0xf7, 0x3c, 0x87, 0xf9, 0x0e, 0x75, 0x73, 0x6b, 694 0x05, 0xf5, 0xf0, 0x1d, 0x8e, 0x96, 0x8a, 0x25, 0x48, 0x37, 0x87, 0xdd, 0x3a, 0x19, 0x61, 0xf2, 695 0xcb, 0x90, 0x70, 0x1f, 0xed, 0xc1, 0x46, 0xef, 0xb6, 0xe3, 0xb8, 0x96, 0xd3, 0x17, 0x50, 0xef, 696 0x70, 0x52, 0xec, 0x6b, 0xfd, 0xe2, 0x6f, 0x2a, 0x64, 0x26, 0xc3, 0x9c, 0x51, 0x97, 0x13, 0x74, 697 0x02, 0x49, 0x36, 0xec, 0x5a, 0x77, 0x64, 0x24, 0x86, 0x53, 0x47, 0xfb, 0xe5, 0xc8, 0x0d, 0x04, 698 0x6e, 0xcb, 0xcd, 0x61, 0xf7, 0xde, 0xe9, 0xd5, 0xc9, 0xe8, 0x34, 0xf6, 0xf8, 0xcf, 0x81, 0x82, 699 0x13, 0x4c, 0x80, 0xa0, 0x13, 0x88, 0x93, 0xb1, 0x74, 0xa1, 0x2b, 0x75, 0xf4, 0x79, 0x79, 0xf1, 700 0xf2, 0xca, 0x0b, 0x3e, 0x71, 0x70, 0xa6, 0x78, 0x05, 0x5b, 0xe3, 0xea, 0x4f, 0xd4, 0x27, 0x13, 701 0xe9, 0x25, 0x88, 0x3d, 0x50, 0x9f, 0x48, 0x25, 0xbb, 0x51, 0xb8, 0xe0, 0x4e, 0xc5, 0xb0, 0x98, 702 0x99, 0xb1, 0xb9, 0x36, 0x6b, 0xf3, 0x57, 0x15, 0x90, 0x20, 0xec, 0x07, 0xe0, 0xd2, 0xea, 0x57, 703 0xff, 0x07, 0x5d, 0x3a, 0x0c, 0x38, 0xde, 0xe4, 0xef, 0x16, 0xb6, 0xc7, 0xd5, 0xa6, 0x47, 0x19, 704 0xe5, 0x9d, 0xfb, 0x89, 0xc7, 0x6f, 0x60, 0x83, 0xc9, 0x92, 0x54, 0x92, 0x5f, 0x54, 0x12, 0x1e, 705 0x0a, 0x67, 0x5f, 0xf3, 0xfb, 0x87, 0x0a, 0xbb, 0x81, 0xdf, 0x29, 0x99, 0xf4, 0xfc, 0xed, 0x87, 706 0xb0, 0x49, 0xef, 0x53, 0xce, 0x37, 0xf9, 0x4f, 0x43, 0xaa, 0xe9, 0xb8, 0xb6, 0xf4, 0x5d, 0xcc, 707 0xc0, 0x66, 0xb0, 0x0d, 0x94, 0x15, 0xff, 0x8a, 0x43, 0xf2, 0x9c, 0x70, 0xde, 0xb1, 0x09, 0xaa, 708 0xc3, 0x96, 0x0c, 0xa1, 0xe5, 0x05, 0xe3, 0x52, 0xec, 0xa7, 0xcb, 0x18, 0x67, 0xe2, 0x5e, 0x55, 709 0x70, 0x9a, 0xcd, 0xe4, 0xdf, 0x84, 0xec, 0x14, 0x2c, 0x20, 0x93, 0xfa, 0x8b, 0xaf, 0xa1, 0x05, 710 0x93, 0x55, 0x05, 0x67, 0xd8, 0xec, 0x2f, 0xe4, 0x47, 0x78, 0xcf, 0x1d, 0xdb, 0xb5, 0xc6, 0x89, 711 0x08, 0xe5, 0xad, 0x0b, 0xc0, 0xcf, 0x96, 0x01, 0xce, 0x85, 0xba, 0xaa, 0xe0, 0x2d, 0x3e, 0x97, 712 0xf3, 0x6b, 0xd8, 0xe1, 0xe2, 0xbd, 0x26, 0xa0, 0x52, 0x66, 0x4c, 0xa0, 0x7e, 0xb1, 0x0a, 0x75, 713 0x36, 0xcf, 0x55, 0x05, 0x23, 0xbe, 0x98, 0xf2, 0x9f, 0xe1, 0x23, 0x21, 0x77, 0xf2, 0x88, 0xa1, 714 0xe4, 0xb8, 0x00, 0xff, 0x72, 0x15, 0xf8, 0x5c, 0x4e, 0xab, 0x0a, 0xde, 0xe6, 0x4b, 0xe2, 0x7b, 715 0x03, 0x39, 0x29, 0x3d, 0x42, 0x20, 0xe5, 0x27, 0x04, 0x43, 0x69, 0xb5, 0xfc, 0xf9, 0x78, 0x56, 716 0x15, 0xbc, 0xcb, 0x97, 0x07, 0xf7, 0x0c, 0x36, 0x99, 0xe3, 0xda, 0xa1, 0xfa, 0xa4, 0xc0, 0x3e, 717 0x58, 0xfa, 0x82, 0xd3, 0x94, 0x55, 0x15, 0x9c, 0x62, 0xd3, 0x2d, 0xfa, 0x1e, 0xd2, 0x12, 0x45, 718 0x4a, 0xdc, 0x10, 0x30, 0x85, 0xd5, 0x30, 0xa1, 0xb0, 0x4d, 0x16, 0xd9, 0x9f, 0xc6, 0x61, 0x9d, 719 0x0f, 0x07, 0xa5, 0x3f, 0x55, 0x48, 0x88, 0x90, 0x73, 0x84, 0x20, 0x63, 0x60, 0xdc, 0xc0, 0x2d, 720 0xeb, 0xc2, 0xac, 0x9b, 0x8d, 0x4b, 0x33, 0xab, 0x20, 0x0d, 0xf2, 0x61, 0xcd, 0xb8, 0x6a, 0x1a, 721 0x95, 0xb6, 0x71, 0x66, 0x61, 0xa3, 0xd5, 0x6c, 0x98, 0x2d, 0x23, 0xab, 0xa2, 0x1c, 0xec, 0xc8, 722 0xbe, 0xd9, 0xb0, 0x2a, 0x0d, 0xd3, 0x34, 0x2a, 0xed, 0x5a, 0xc3, 0xcc, 0xae, 0xa1, 0x4f, 0x60, 723 0x4f, 0x76, 0xa6, 0x65, 0xab, 0x5d, 0x3b, 0x37, 0x1a, 0x17, 0xed, 0xec, 0x3a, 0xfa, 0x18, 0xb6, 724 0x65, 0x1b, 0x1b, 0xdf, 0x9d, 0x85, 0x8d, 0x58, 0x04, 0xf1, 0x12, 0xd7, 0xda, 0x46, 0xd8, 0x89, 725 0x9f, 0xde, 0x3c, 0x3e, 0x6b, 0xea, 0xd3, 0xb3, 0xa6, 0xfe, 0xfb, 0xac, 0xa9, 0xbf, 0xbf, 0x68, 726 0xca, 0xd3, 0x8b, 0xa6, 0xfc, 0xfd, 0xa2, 0x29, 0xd7, 0x3f, 0xd8, 0x8e, 0x7f, 0x3b, 0xec, 0x96, 727 0x7b, 0x74, 0xa0, 0xf3, 0x21, 0xf3, 0x3a, 0xf6, 0xa8, 0xa3, 0xb7, 0xc3, 0x0b, 0xa9, 0x50, 0xd7, 728 0x25, 0x3d, 0x9f, 0x7a, 0xba, 0xf8, 0x7f, 0xe1, 0xba, 0x3f, 0x38, 0xfe, 0x5a, 0x0f, 0x3e, 0x61, 729 0x8b, 0x1f, 0xcf, 0x6e, 0x42, 0x74, 0x8e, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xca, 0xf2, 0xb7, 730 0xf1, 0x59, 0x07, 0x00, 0x00, 731 } 732 733 func (m *RemoteSignerError) Marshal() (dAtA []byte, err error) { 734 size := m.Size() 735 dAtA = make([]byte, size) 736 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 737 if err != nil { 738 return nil, err 739 } 740 return dAtA[:n], nil 741 } 742 743 func (m *RemoteSignerError) MarshalTo(dAtA []byte) (int, error) { 744 size := m.Size() 745 return m.MarshalToSizedBuffer(dAtA[:size]) 746 } 747 748 func (m *RemoteSignerError) MarshalToSizedBuffer(dAtA []byte) (int, error) { 749 i := len(dAtA) 750 _ = i 751 var l int 752 _ = l 753 if len(m.Description) > 0 { 754 i -= len(m.Description) 755 copy(dAtA[i:], m.Description) 756 i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) 757 i-- 758 dAtA[i] = 0x12 759 } 760 if m.Code != 0 { 761 i = encodeVarintTypes(dAtA, i, uint64(m.Code)) 762 i-- 763 dAtA[i] = 0x8 764 } 765 return len(dAtA) - i, nil 766 } 767 768 func (m *PubKeyRequest) Marshal() (dAtA []byte, err error) { 769 size := m.Size() 770 dAtA = make([]byte, size) 771 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 772 if err != nil { 773 return nil, err 774 } 775 return dAtA[:n], nil 776 } 777 778 func (m *PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { 779 size := m.Size() 780 return m.MarshalToSizedBuffer(dAtA[:size]) 781 } 782 783 func (m *PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 784 i := len(dAtA) 785 _ = i 786 var l int 787 _ = l 788 if len(m.ChainId) > 0 { 789 i -= len(m.ChainId) 790 copy(dAtA[i:], m.ChainId) 791 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) 792 i-- 793 dAtA[i] = 0xa 794 } 795 return len(dAtA) - i, nil 796 } 797 798 func (m *PubKeyResponse) Marshal() (dAtA []byte, err error) { 799 size := m.Size() 800 dAtA = make([]byte, size) 801 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 802 if err != nil { 803 return nil, err 804 } 805 return dAtA[:n], nil 806 } 807 808 func (m *PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { 809 size := m.Size() 810 return m.MarshalToSizedBuffer(dAtA[:size]) 811 } 812 813 func (m *PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 814 i := len(dAtA) 815 _ = i 816 var l int 817 _ = l 818 if m.Error != nil { 819 { 820 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 821 if err != nil { 822 return 0, err 823 } 824 i -= size 825 i = encodeVarintTypes(dAtA, i, uint64(size)) 826 } 827 i-- 828 dAtA[i] = 0x12 829 } 830 { 831 size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) 832 if err != nil { 833 return 0, err 834 } 835 i -= size 836 i = encodeVarintTypes(dAtA, i, uint64(size)) 837 } 838 i-- 839 dAtA[i] = 0xa 840 return len(dAtA) - i, nil 841 } 842 843 func (m *SignVoteRequest) Marshal() (dAtA []byte, err error) { 844 size := m.Size() 845 dAtA = make([]byte, size) 846 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 847 if err != nil { 848 return nil, err 849 } 850 return dAtA[:n], nil 851 } 852 853 func (m *SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { 854 size := m.Size() 855 return m.MarshalToSizedBuffer(dAtA[:size]) 856 } 857 858 func (m *SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 859 i := len(dAtA) 860 _ = i 861 var l int 862 _ = l 863 if len(m.ChainId) > 0 { 864 i -= len(m.ChainId) 865 copy(dAtA[i:], m.ChainId) 866 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) 867 i-- 868 dAtA[i] = 0x12 869 } 870 if m.Vote != nil { 871 { 872 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 873 if err != nil { 874 return 0, err 875 } 876 i -= size 877 i = encodeVarintTypes(dAtA, i, uint64(size)) 878 } 879 i-- 880 dAtA[i] = 0xa 881 } 882 return len(dAtA) - i, nil 883 } 884 885 func (m *SignedVoteResponse) Marshal() (dAtA []byte, err error) { 886 size := m.Size() 887 dAtA = make([]byte, size) 888 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 889 if err != nil { 890 return nil, err 891 } 892 return dAtA[:n], nil 893 } 894 895 func (m *SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { 896 size := m.Size() 897 return m.MarshalToSizedBuffer(dAtA[:size]) 898 } 899 900 func (m *SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 901 i := len(dAtA) 902 _ = i 903 var l int 904 _ = l 905 if m.Error != nil { 906 { 907 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 908 if err != nil { 909 return 0, err 910 } 911 i -= size 912 i = encodeVarintTypes(dAtA, i, uint64(size)) 913 } 914 i-- 915 dAtA[i] = 0x12 916 } 917 { 918 size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) 919 if err != nil { 920 return 0, err 921 } 922 i -= size 923 i = encodeVarintTypes(dAtA, i, uint64(size)) 924 } 925 i-- 926 dAtA[i] = 0xa 927 return len(dAtA) - i, nil 928 } 929 930 func (m *SignProposalRequest) Marshal() (dAtA []byte, err error) { 931 size := m.Size() 932 dAtA = make([]byte, size) 933 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 934 if err != nil { 935 return nil, err 936 } 937 return dAtA[:n], nil 938 } 939 940 func (m *SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { 941 size := m.Size() 942 return m.MarshalToSizedBuffer(dAtA[:size]) 943 } 944 945 func (m *SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 946 i := len(dAtA) 947 _ = i 948 var l int 949 _ = l 950 if len(m.ChainId) > 0 { 951 i -= len(m.ChainId) 952 copy(dAtA[i:], m.ChainId) 953 i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) 954 i-- 955 dAtA[i] = 0x12 956 } 957 if m.Proposal != nil { 958 { 959 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 960 if err != nil { 961 return 0, err 962 } 963 i -= size 964 i = encodeVarintTypes(dAtA, i, uint64(size)) 965 } 966 i-- 967 dAtA[i] = 0xa 968 } 969 return len(dAtA) - i, nil 970 } 971 972 func (m *SignedProposalResponse) Marshal() (dAtA []byte, err error) { 973 size := m.Size() 974 dAtA = make([]byte, size) 975 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 976 if err != nil { 977 return nil, err 978 } 979 return dAtA[:n], nil 980 } 981 982 func (m *SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { 983 size := m.Size() 984 return m.MarshalToSizedBuffer(dAtA[:size]) 985 } 986 987 func (m *SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 988 i := len(dAtA) 989 _ = i 990 var l int 991 _ = l 992 if m.Error != nil { 993 { 994 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 995 if err != nil { 996 return 0, err 997 } 998 i -= size 999 i = encodeVarintTypes(dAtA, i, uint64(size)) 1000 } 1001 i-- 1002 dAtA[i] = 0x12 1003 } 1004 { 1005 size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) 1006 if err != nil { 1007 return 0, err 1008 } 1009 i -= size 1010 i = encodeVarintTypes(dAtA, i, uint64(size)) 1011 } 1012 i-- 1013 dAtA[i] = 0xa 1014 return len(dAtA) - i, nil 1015 } 1016 1017 func (m *PingRequest) Marshal() (dAtA []byte, err error) { 1018 size := m.Size() 1019 dAtA = make([]byte, size) 1020 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1021 if err != nil { 1022 return nil, err 1023 } 1024 return dAtA[:n], nil 1025 } 1026 1027 func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) { 1028 size := m.Size() 1029 return m.MarshalToSizedBuffer(dAtA[:size]) 1030 } 1031 1032 func (m *PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1033 i := len(dAtA) 1034 _ = i 1035 var l int 1036 _ = l 1037 return len(dAtA) - i, nil 1038 } 1039 1040 func (m *PingResponse) Marshal() (dAtA []byte, err error) { 1041 size := m.Size() 1042 dAtA = make([]byte, size) 1043 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1044 if err != nil { 1045 return nil, err 1046 } 1047 return dAtA[:n], nil 1048 } 1049 1050 func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { 1051 size := m.Size() 1052 return m.MarshalToSizedBuffer(dAtA[:size]) 1053 } 1054 1055 func (m *PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1056 i := len(dAtA) 1057 _ = i 1058 var l int 1059 _ = l 1060 return len(dAtA) - i, nil 1061 } 1062 1063 func (m *Message) Marshal() (dAtA []byte, err error) { 1064 size := m.Size() 1065 dAtA = make([]byte, size) 1066 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1067 if err != nil { 1068 return nil, err 1069 } 1070 return dAtA[:n], nil 1071 } 1072 1073 func (m *Message) MarshalTo(dAtA []byte) (int, error) { 1074 size := m.Size() 1075 return m.MarshalToSizedBuffer(dAtA[:size]) 1076 } 1077 1078 func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1079 i := len(dAtA) 1080 _ = i 1081 var l int 1082 _ = l 1083 if m.Sum != nil { 1084 { 1085 size := m.Sum.Size() 1086 i -= size 1087 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 1088 return 0, err 1089 } 1090 } 1091 } 1092 return len(dAtA) - i, nil 1093 } 1094 1095 func (m *Message_PubKeyRequest) MarshalTo(dAtA []byte) (int, error) { 1096 size := m.Size() 1097 return m.MarshalToSizedBuffer(dAtA[:size]) 1098 } 1099 1100 func (m *Message_PubKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1101 i := len(dAtA) 1102 if m.PubKeyRequest != nil { 1103 { 1104 size, err := m.PubKeyRequest.MarshalToSizedBuffer(dAtA[:i]) 1105 if err != nil { 1106 return 0, err 1107 } 1108 i -= size 1109 i = encodeVarintTypes(dAtA, i, uint64(size)) 1110 } 1111 i-- 1112 dAtA[i] = 0xa 1113 } 1114 return len(dAtA) - i, nil 1115 } 1116 func (m *Message_PubKeyResponse) MarshalTo(dAtA []byte) (int, error) { 1117 size := m.Size() 1118 return m.MarshalToSizedBuffer(dAtA[:size]) 1119 } 1120 1121 func (m *Message_PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1122 i := len(dAtA) 1123 if m.PubKeyResponse != nil { 1124 { 1125 size, err := m.PubKeyResponse.MarshalToSizedBuffer(dAtA[:i]) 1126 if err != nil { 1127 return 0, err 1128 } 1129 i -= size 1130 i = encodeVarintTypes(dAtA, i, uint64(size)) 1131 } 1132 i-- 1133 dAtA[i] = 0x12 1134 } 1135 return len(dAtA) - i, nil 1136 } 1137 func (m *Message_SignVoteRequest) MarshalTo(dAtA []byte) (int, error) { 1138 size := m.Size() 1139 return m.MarshalToSizedBuffer(dAtA[:size]) 1140 } 1141 1142 func (m *Message_SignVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1143 i := len(dAtA) 1144 if m.SignVoteRequest != nil { 1145 { 1146 size, err := m.SignVoteRequest.MarshalToSizedBuffer(dAtA[:i]) 1147 if err != nil { 1148 return 0, err 1149 } 1150 i -= size 1151 i = encodeVarintTypes(dAtA, i, uint64(size)) 1152 } 1153 i-- 1154 dAtA[i] = 0x1a 1155 } 1156 return len(dAtA) - i, nil 1157 } 1158 func (m *Message_SignedVoteResponse) MarshalTo(dAtA []byte) (int, error) { 1159 size := m.Size() 1160 return m.MarshalToSizedBuffer(dAtA[:size]) 1161 } 1162 1163 func (m *Message_SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1164 i := len(dAtA) 1165 if m.SignedVoteResponse != nil { 1166 { 1167 size, err := m.SignedVoteResponse.MarshalToSizedBuffer(dAtA[:i]) 1168 if err != nil { 1169 return 0, err 1170 } 1171 i -= size 1172 i = encodeVarintTypes(dAtA, i, uint64(size)) 1173 } 1174 i-- 1175 dAtA[i] = 0x22 1176 } 1177 return len(dAtA) - i, nil 1178 } 1179 func (m *Message_SignProposalRequest) MarshalTo(dAtA []byte) (int, error) { 1180 size := m.Size() 1181 return m.MarshalToSizedBuffer(dAtA[:size]) 1182 } 1183 1184 func (m *Message_SignProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1185 i := len(dAtA) 1186 if m.SignProposalRequest != nil { 1187 { 1188 size, err := m.SignProposalRequest.MarshalToSizedBuffer(dAtA[:i]) 1189 if err != nil { 1190 return 0, err 1191 } 1192 i -= size 1193 i = encodeVarintTypes(dAtA, i, uint64(size)) 1194 } 1195 i-- 1196 dAtA[i] = 0x2a 1197 } 1198 return len(dAtA) - i, nil 1199 } 1200 func (m *Message_SignedProposalResponse) MarshalTo(dAtA []byte) (int, error) { 1201 size := m.Size() 1202 return m.MarshalToSizedBuffer(dAtA[:size]) 1203 } 1204 1205 func (m *Message_SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1206 i := len(dAtA) 1207 if m.SignedProposalResponse != nil { 1208 { 1209 size, err := m.SignedProposalResponse.MarshalToSizedBuffer(dAtA[:i]) 1210 if err != nil { 1211 return 0, err 1212 } 1213 i -= size 1214 i = encodeVarintTypes(dAtA, i, uint64(size)) 1215 } 1216 i-- 1217 dAtA[i] = 0x32 1218 } 1219 return len(dAtA) - i, nil 1220 } 1221 func (m *Message_PingRequest) MarshalTo(dAtA []byte) (int, error) { 1222 size := m.Size() 1223 return m.MarshalToSizedBuffer(dAtA[:size]) 1224 } 1225 1226 func (m *Message_PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1227 i := len(dAtA) 1228 if m.PingRequest != nil { 1229 { 1230 size, err := m.PingRequest.MarshalToSizedBuffer(dAtA[:i]) 1231 if err != nil { 1232 return 0, err 1233 } 1234 i -= size 1235 i = encodeVarintTypes(dAtA, i, uint64(size)) 1236 } 1237 i-- 1238 dAtA[i] = 0x3a 1239 } 1240 return len(dAtA) - i, nil 1241 } 1242 func (m *Message_PingResponse) MarshalTo(dAtA []byte) (int, error) { 1243 size := m.Size() 1244 return m.MarshalToSizedBuffer(dAtA[:size]) 1245 } 1246 1247 func (m *Message_PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1248 i := len(dAtA) 1249 if m.PingResponse != nil { 1250 { 1251 size, err := m.PingResponse.MarshalToSizedBuffer(dAtA[:i]) 1252 if err != nil { 1253 return 0, err 1254 } 1255 i -= size 1256 i = encodeVarintTypes(dAtA, i, uint64(size)) 1257 } 1258 i-- 1259 dAtA[i] = 0x42 1260 } 1261 return len(dAtA) - i, nil 1262 } 1263 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 1264 offset -= sovTypes(v) 1265 base := offset 1266 for v >= 1<<7 { 1267 dAtA[offset] = uint8(v&0x7f | 0x80) 1268 v >>= 7 1269 offset++ 1270 } 1271 dAtA[offset] = uint8(v) 1272 return base 1273 } 1274 func (m *RemoteSignerError) Size() (n int) { 1275 if m == nil { 1276 return 0 1277 } 1278 var l int 1279 _ = l 1280 if m.Code != 0 { 1281 n += 1 + sovTypes(uint64(m.Code)) 1282 } 1283 l = len(m.Description) 1284 if l > 0 { 1285 n += 1 + l + sovTypes(uint64(l)) 1286 } 1287 return n 1288 } 1289 1290 func (m *PubKeyRequest) Size() (n int) { 1291 if m == nil { 1292 return 0 1293 } 1294 var l int 1295 _ = l 1296 l = len(m.ChainId) 1297 if l > 0 { 1298 n += 1 + l + sovTypes(uint64(l)) 1299 } 1300 return n 1301 } 1302 1303 func (m *PubKeyResponse) Size() (n int) { 1304 if m == nil { 1305 return 0 1306 } 1307 var l int 1308 _ = l 1309 l = m.PubKey.Size() 1310 n += 1 + l + sovTypes(uint64(l)) 1311 if m.Error != nil { 1312 l = m.Error.Size() 1313 n += 1 + l + sovTypes(uint64(l)) 1314 } 1315 return n 1316 } 1317 1318 func (m *SignVoteRequest) Size() (n int) { 1319 if m == nil { 1320 return 0 1321 } 1322 var l int 1323 _ = l 1324 if m.Vote != nil { 1325 l = m.Vote.Size() 1326 n += 1 + l + sovTypes(uint64(l)) 1327 } 1328 l = len(m.ChainId) 1329 if l > 0 { 1330 n += 1 + l + sovTypes(uint64(l)) 1331 } 1332 return n 1333 } 1334 1335 func (m *SignedVoteResponse) Size() (n int) { 1336 if m == nil { 1337 return 0 1338 } 1339 var l int 1340 _ = l 1341 l = m.Vote.Size() 1342 n += 1 + l + sovTypes(uint64(l)) 1343 if m.Error != nil { 1344 l = m.Error.Size() 1345 n += 1 + l + sovTypes(uint64(l)) 1346 } 1347 return n 1348 } 1349 1350 func (m *SignProposalRequest) Size() (n int) { 1351 if m == nil { 1352 return 0 1353 } 1354 var l int 1355 _ = l 1356 if m.Proposal != nil { 1357 l = m.Proposal.Size() 1358 n += 1 + l + sovTypes(uint64(l)) 1359 } 1360 l = len(m.ChainId) 1361 if l > 0 { 1362 n += 1 + l + sovTypes(uint64(l)) 1363 } 1364 return n 1365 } 1366 1367 func (m *SignedProposalResponse) Size() (n int) { 1368 if m == nil { 1369 return 0 1370 } 1371 var l int 1372 _ = l 1373 l = m.Proposal.Size() 1374 n += 1 + l + sovTypes(uint64(l)) 1375 if m.Error != nil { 1376 l = m.Error.Size() 1377 n += 1 + l + sovTypes(uint64(l)) 1378 } 1379 return n 1380 } 1381 1382 func (m *PingRequest) Size() (n int) { 1383 if m == nil { 1384 return 0 1385 } 1386 var l int 1387 _ = l 1388 return n 1389 } 1390 1391 func (m *PingResponse) Size() (n int) { 1392 if m == nil { 1393 return 0 1394 } 1395 var l int 1396 _ = l 1397 return n 1398 } 1399 1400 func (m *Message) Size() (n int) { 1401 if m == nil { 1402 return 0 1403 } 1404 var l int 1405 _ = l 1406 if m.Sum != nil { 1407 n += m.Sum.Size() 1408 } 1409 return n 1410 } 1411 1412 func (m *Message_PubKeyRequest) Size() (n int) { 1413 if m == nil { 1414 return 0 1415 } 1416 var l int 1417 _ = l 1418 if m.PubKeyRequest != nil { 1419 l = m.PubKeyRequest.Size() 1420 n += 1 + l + sovTypes(uint64(l)) 1421 } 1422 return n 1423 } 1424 func (m *Message_PubKeyResponse) Size() (n int) { 1425 if m == nil { 1426 return 0 1427 } 1428 var l int 1429 _ = l 1430 if m.PubKeyResponse != nil { 1431 l = m.PubKeyResponse.Size() 1432 n += 1 + l + sovTypes(uint64(l)) 1433 } 1434 return n 1435 } 1436 func (m *Message_SignVoteRequest) Size() (n int) { 1437 if m == nil { 1438 return 0 1439 } 1440 var l int 1441 _ = l 1442 if m.SignVoteRequest != nil { 1443 l = m.SignVoteRequest.Size() 1444 n += 1 + l + sovTypes(uint64(l)) 1445 } 1446 return n 1447 } 1448 func (m *Message_SignedVoteResponse) Size() (n int) { 1449 if m == nil { 1450 return 0 1451 } 1452 var l int 1453 _ = l 1454 if m.SignedVoteResponse != nil { 1455 l = m.SignedVoteResponse.Size() 1456 n += 1 + l + sovTypes(uint64(l)) 1457 } 1458 return n 1459 } 1460 func (m *Message_SignProposalRequest) Size() (n int) { 1461 if m == nil { 1462 return 0 1463 } 1464 var l int 1465 _ = l 1466 if m.SignProposalRequest != nil { 1467 l = m.SignProposalRequest.Size() 1468 n += 1 + l + sovTypes(uint64(l)) 1469 } 1470 return n 1471 } 1472 func (m *Message_SignedProposalResponse) Size() (n int) { 1473 if m == nil { 1474 return 0 1475 } 1476 var l int 1477 _ = l 1478 if m.SignedProposalResponse != nil { 1479 l = m.SignedProposalResponse.Size() 1480 n += 1 + l + sovTypes(uint64(l)) 1481 } 1482 return n 1483 } 1484 func (m *Message_PingRequest) Size() (n int) { 1485 if m == nil { 1486 return 0 1487 } 1488 var l int 1489 _ = l 1490 if m.PingRequest != nil { 1491 l = m.PingRequest.Size() 1492 n += 1 + l + sovTypes(uint64(l)) 1493 } 1494 return n 1495 } 1496 func (m *Message_PingResponse) Size() (n int) { 1497 if m == nil { 1498 return 0 1499 } 1500 var l int 1501 _ = l 1502 if m.PingResponse != nil { 1503 l = m.PingResponse.Size() 1504 n += 1 + l + sovTypes(uint64(l)) 1505 } 1506 return n 1507 } 1508 1509 func sovTypes(x uint64) (n int) { 1510 return (math_bits.Len64(x|1) + 6) / 7 1511 } 1512 func sozTypes(x uint64) (n int) { 1513 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1514 } 1515 func (m *RemoteSignerError) Unmarshal(dAtA []byte) error { 1516 l := len(dAtA) 1517 iNdEx := 0 1518 for iNdEx < l { 1519 preIndex := iNdEx 1520 var wire uint64 1521 for shift := uint(0); ; shift += 7 { 1522 if shift >= 64 { 1523 return ErrIntOverflowTypes 1524 } 1525 if iNdEx >= l { 1526 return io.ErrUnexpectedEOF 1527 } 1528 b := dAtA[iNdEx] 1529 iNdEx++ 1530 wire |= uint64(b&0x7F) << shift 1531 if b < 0x80 { 1532 break 1533 } 1534 } 1535 fieldNum := int32(wire >> 3) 1536 wireType := int(wire & 0x7) 1537 if wireType == 4 { 1538 return fmt.Errorf("proto: RemoteSignerError: wiretype end group for non-group") 1539 } 1540 if fieldNum <= 0 { 1541 return fmt.Errorf("proto: RemoteSignerError: illegal tag %d (wire type %d)", fieldNum, wire) 1542 } 1543 switch fieldNum { 1544 case 1: 1545 if wireType != 0 { 1546 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 1547 } 1548 m.Code = 0 1549 for shift := uint(0); ; shift += 7 { 1550 if shift >= 64 { 1551 return ErrIntOverflowTypes 1552 } 1553 if iNdEx >= l { 1554 return io.ErrUnexpectedEOF 1555 } 1556 b := dAtA[iNdEx] 1557 iNdEx++ 1558 m.Code |= int32(b&0x7F) << shift 1559 if b < 0x80 { 1560 break 1561 } 1562 } 1563 case 2: 1564 if wireType != 2 { 1565 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 1566 } 1567 var stringLen uint64 1568 for shift := uint(0); ; shift += 7 { 1569 if shift >= 64 { 1570 return ErrIntOverflowTypes 1571 } 1572 if iNdEx >= l { 1573 return io.ErrUnexpectedEOF 1574 } 1575 b := dAtA[iNdEx] 1576 iNdEx++ 1577 stringLen |= uint64(b&0x7F) << shift 1578 if b < 0x80 { 1579 break 1580 } 1581 } 1582 intStringLen := int(stringLen) 1583 if intStringLen < 0 { 1584 return ErrInvalidLengthTypes 1585 } 1586 postIndex := iNdEx + intStringLen 1587 if postIndex < 0 { 1588 return ErrInvalidLengthTypes 1589 } 1590 if postIndex > l { 1591 return io.ErrUnexpectedEOF 1592 } 1593 m.Description = string(dAtA[iNdEx:postIndex]) 1594 iNdEx = postIndex 1595 default: 1596 iNdEx = preIndex 1597 skippy, err := skipTypes(dAtA[iNdEx:]) 1598 if err != nil { 1599 return err 1600 } 1601 if (skippy < 0) || (iNdEx+skippy) < 0 { 1602 return ErrInvalidLengthTypes 1603 } 1604 if (iNdEx + skippy) > l { 1605 return io.ErrUnexpectedEOF 1606 } 1607 iNdEx += skippy 1608 } 1609 } 1610 1611 if iNdEx > l { 1612 return io.ErrUnexpectedEOF 1613 } 1614 return nil 1615 } 1616 func (m *PubKeyRequest) Unmarshal(dAtA []byte) error { 1617 l := len(dAtA) 1618 iNdEx := 0 1619 for iNdEx < l { 1620 preIndex := iNdEx 1621 var wire uint64 1622 for shift := uint(0); ; shift += 7 { 1623 if shift >= 64 { 1624 return ErrIntOverflowTypes 1625 } 1626 if iNdEx >= l { 1627 return io.ErrUnexpectedEOF 1628 } 1629 b := dAtA[iNdEx] 1630 iNdEx++ 1631 wire |= uint64(b&0x7F) << shift 1632 if b < 0x80 { 1633 break 1634 } 1635 } 1636 fieldNum := int32(wire >> 3) 1637 wireType := int(wire & 0x7) 1638 if wireType == 4 { 1639 return fmt.Errorf("proto: PubKeyRequest: wiretype end group for non-group") 1640 } 1641 if fieldNum <= 0 { 1642 return fmt.Errorf("proto: PubKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1643 } 1644 switch fieldNum { 1645 case 1: 1646 if wireType != 2 { 1647 return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) 1648 } 1649 var stringLen uint64 1650 for shift := uint(0); ; shift += 7 { 1651 if shift >= 64 { 1652 return ErrIntOverflowTypes 1653 } 1654 if iNdEx >= l { 1655 return io.ErrUnexpectedEOF 1656 } 1657 b := dAtA[iNdEx] 1658 iNdEx++ 1659 stringLen |= uint64(b&0x7F) << shift 1660 if b < 0x80 { 1661 break 1662 } 1663 } 1664 intStringLen := int(stringLen) 1665 if intStringLen < 0 { 1666 return ErrInvalidLengthTypes 1667 } 1668 postIndex := iNdEx + intStringLen 1669 if postIndex < 0 { 1670 return ErrInvalidLengthTypes 1671 } 1672 if postIndex > l { 1673 return io.ErrUnexpectedEOF 1674 } 1675 m.ChainId = string(dAtA[iNdEx:postIndex]) 1676 iNdEx = postIndex 1677 default: 1678 iNdEx = preIndex 1679 skippy, err := skipTypes(dAtA[iNdEx:]) 1680 if err != nil { 1681 return err 1682 } 1683 if (skippy < 0) || (iNdEx+skippy) < 0 { 1684 return ErrInvalidLengthTypes 1685 } 1686 if (iNdEx + skippy) > l { 1687 return io.ErrUnexpectedEOF 1688 } 1689 iNdEx += skippy 1690 } 1691 } 1692 1693 if iNdEx > l { 1694 return io.ErrUnexpectedEOF 1695 } 1696 return nil 1697 } 1698 func (m *PubKeyResponse) Unmarshal(dAtA []byte) error { 1699 l := len(dAtA) 1700 iNdEx := 0 1701 for iNdEx < l { 1702 preIndex := iNdEx 1703 var wire uint64 1704 for shift := uint(0); ; shift += 7 { 1705 if shift >= 64 { 1706 return ErrIntOverflowTypes 1707 } 1708 if iNdEx >= l { 1709 return io.ErrUnexpectedEOF 1710 } 1711 b := dAtA[iNdEx] 1712 iNdEx++ 1713 wire |= uint64(b&0x7F) << shift 1714 if b < 0x80 { 1715 break 1716 } 1717 } 1718 fieldNum := int32(wire >> 3) 1719 wireType := int(wire & 0x7) 1720 if wireType == 4 { 1721 return fmt.Errorf("proto: PubKeyResponse: wiretype end group for non-group") 1722 } 1723 if fieldNum <= 0 { 1724 return fmt.Errorf("proto: PubKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1725 } 1726 switch fieldNum { 1727 case 1: 1728 if wireType != 2 { 1729 return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) 1730 } 1731 var msglen int 1732 for shift := uint(0); ; shift += 7 { 1733 if shift >= 64 { 1734 return ErrIntOverflowTypes 1735 } 1736 if iNdEx >= l { 1737 return io.ErrUnexpectedEOF 1738 } 1739 b := dAtA[iNdEx] 1740 iNdEx++ 1741 msglen |= int(b&0x7F) << shift 1742 if b < 0x80 { 1743 break 1744 } 1745 } 1746 if msglen < 0 { 1747 return ErrInvalidLengthTypes 1748 } 1749 postIndex := iNdEx + msglen 1750 if postIndex < 0 { 1751 return ErrInvalidLengthTypes 1752 } 1753 if postIndex > l { 1754 return io.ErrUnexpectedEOF 1755 } 1756 if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1757 return err 1758 } 1759 iNdEx = postIndex 1760 case 2: 1761 if wireType != 2 { 1762 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 1763 } 1764 var msglen int 1765 for shift := uint(0); ; shift += 7 { 1766 if shift >= 64 { 1767 return ErrIntOverflowTypes 1768 } 1769 if iNdEx >= l { 1770 return io.ErrUnexpectedEOF 1771 } 1772 b := dAtA[iNdEx] 1773 iNdEx++ 1774 msglen |= int(b&0x7F) << shift 1775 if b < 0x80 { 1776 break 1777 } 1778 } 1779 if msglen < 0 { 1780 return ErrInvalidLengthTypes 1781 } 1782 postIndex := iNdEx + msglen 1783 if postIndex < 0 { 1784 return ErrInvalidLengthTypes 1785 } 1786 if postIndex > l { 1787 return io.ErrUnexpectedEOF 1788 } 1789 if m.Error == nil { 1790 m.Error = &RemoteSignerError{} 1791 } 1792 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1793 return err 1794 } 1795 iNdEx = postIndex 1796 default: 1797 iNdEx = preIndex 1798 skippy, err := skipTypes(dAtA[iNdEx:]) 1799 if err != nil { 1800 return err 1801 } 1802 if (skippy < 0) || (iNdEx+skippy) < 0 { 1803 return ErrInvalidLengthTypes 1804 } 1805 if (iNdEx + skippy) > l { 1806 return io.ErrUnexpectedEOF 1807 } 1808 iNdEx += skippy 1809 } 1810 } 1811 1812 if iNdEx > l { 1813 return io.ErrUnexpectedEOF 1814 } 1815 return nil 1816 } 1817 func (m *SignVoteRequest) Unmarshal(dAtA []byte) error { 1818 l := len(dAtA) 1819 iNdEx := 0 1820 for iNdEx < l { 1821 preIndex := iNdEx 1822 var wire uint64 1823 for shift := uint(0); ; shift += 7 { 1824 if shift >= 64 { 1825 return ErrIntOverflowTypes 1826 } 1827 if iNdEx >= l { 1828 return io.ErrUnexpectedEOF 1829 } 1830 b := dAtA[iNdEx] 1831 iNdEx++ 1832 wire |= uint64(b&0x7F) << shift 1833 if b < 0x80 { 1834 break 1835 } 1836 } 1837 fieldNum := int32(wire >> 3) 1838 wireType := int(wire & 0x7) 1839 if wireType == 4 { 1840 return fmt.Errorf("proto: SignVoteRequest: wiretype end group for non-group") 1841 } 1842 if fieldNum <= 0 { 1843 return fmt.Errorf("proto: SignVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1844 } 1845 switch fieldNum { 1846 case 1: 1847 if wireType != 2 { 1848 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 1849 } 1850 var msglen int 1851 for shift := uint(0); ; shift += 7 { 1852 if shift >= 64 { 1853 return ErrIntOverflowTypes 1854 } 1855 if iNdEx >= l { 1856 return io.ErrUnexpectedEOF 1857 } 1858 b := dAtA[iNdEx] 1859 iNdEx++ 1860 msglen |= int(b&0x7F) << shift 1861 if b < 0x80 { 1862 break 1863 } 1864 } 1865 if msglen < 0 { 1866 return ErrInvalidLengthTypes 1867 } 1868 postIndex := iNdEx + msglen 1869 if postIndex < 0 { 1870 return ErrInvalidLengthTypes 1871 } 1872 if postIndex > l { 1873 return io.ErrUnexpectedEOF 1874 } 1875 if m.Vote == nil { 1876 m.Vote = &types.Vote{} 1877 } 1878 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1879 return err 1880 } 1881 iNdEx = postIndex 1882 case 2: 1883 if wireType != 2 { 1884 return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) 1885 } 1886 var stringLen uint64 1887 for shift := uint(0); ; shift += 7 { 1888 if shift >= 64 { 1889 return ErrIntOverflowTypes 1890 } 1891 if iNdEx >= l { 1892 return io.ErrUnexpectedEOF 1893 } 1894 b := dAtA[iNdEx] 1895 iNdEx++ 1896 stringLen |= uint64(b&0x7F) << shift 1897 if b < 0x80 { 1898 break 1899 } 1900 } 1901 intStringLen := int(stringLen) 1902 if intStringLen < 0 { 1903 return ErrInvalidLengthTypes 1904 } 1905 postIndex := iNdEx + intStringLen 1906 if postIndex < 0 { 1907 return ErrInvalidLengthTypes 1908 } 1909 if postIndex > l { 1910 return io.ErrUnexpectedEOF 1911 } 1912 m.ChainId = string(dAtA[iNdEx:postIndex]) 1913 iNdEx = postIndex 1914 default: 1915 iNdEx = preIndex 1916 skippy, err := skipTypes(dAtA[iNdEx:]) 1917 if err != nil { 1918 return err 1919 } 1920 if (skippy < 0) || (iNdEx+skippy) < 0 { 1921 return ErrInvalidLengthTypes 1922 } 1923 if (iNdEx + skippy) > l { 1924 return io.ErrUnexpectedEOF 1925 } 1926 iNdEx += skippy 1927 } 1928 } 1929 1930 if iNdEx > l { 1931 return io.ErrUnexpectedEOF 1932 } 1933 return nil 1934 } 1935 func (m *SignedVoteResponse) Unmarshal(dAtA []byte) error { 1936 l := len(dAtA) 1937 iNdEx := 0 1938 for iNdEx < l { 1939 preIndex := iNdEx 1940 var wire uint64 1941 for shift := uint(0); ; shift += 7 { 1942 if shift >= 64 { 1943 return ErrIntOverflowTypes 1944 } 1945 if iNdEx >= l { 1946 return io.ErrUnexpectedEOF 1947 } 1948 b := dAtA[iNdEx] 1949 iNdEx++ 1950 wire |= uint64(b&0x7F) << shift 1951 if b < 0x80 { 1952 break 1953 } 1954 } 1955 fieldNum := int32(wire >> 3) 1956 wireType := int(wire & 0x7) 1957 if wireType == 4 { 1958 return fmt.Errorf("proto: SignedVoteResponse: wiretype end group for non-group") 1959 } 1960 if fieldNum <= 0 { 1961 return fmt.Errorf("proto: SignedVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1962 } 1963 switch fieldNum { 1964 case 1: 1965 if wireType != 2 { 1966 return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) 1967 } 1968 var msglen int 1969 for shift := uint(0); ; shift += 7 { 1970 if shift >= 64 { 1971 return ErrIntOverflowTypes 1972 } 1973 if iNdEx >= l { 1974 return io.ErrUnexpectedEOF 1975 } 1976 b := dAtA[iNdEx] 1977 iNdEx++ 1978 msglen |= int(b&0x7F) << shift 1979 if b < 0x80 { 1980 break 1981 } 1982 } 1983 if msglen < 0 { 1984 return ErrInvalidLengthTypes 1985 } 1986 postIndex := iNdEx + msglen 1987 if postIndex < 0 { 1988 return ErrInvalidLengthTypes 1989 } 1990 if postIndex > l { 1991 return io.ErrUnexpectedEOF 1992 } 1993 if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1994 return err 1995 } 1996 iNdEx = postIndex 1997 case 2: 1998 if wireType != 2 { 1999 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 2000 } 2001 var msglen int 2002 for shift := uint(0); ; shift += 7 { 2003 if shift >= 64 { 2004 return ErrIntOverflowTypes 2005 } 2006 if iNdEx >= l { 2007 return io.ErrUnexpectedEOF 2008 } 2009 b := dAtA[iNdEx] 2010 iNdEx++ 2011 msglen |= int(b&0x7F) << shift 2012 if b < 0x80 { 2013 break 2014 } 2015 } 2016 if msglen < 0 { 2017 return ErrInvalidLengthTypes 2018 } 2019 postIndex := iNdEx + msglen 2020 if postIndex < 0 { 2021 return ErrInvalidLengthTypes 2022 } 2023 if postIndex > l { 2024 return io.ErrUnexpectedEOF 2025 } 2026 if m.Error == nil { 2027 m.Error = &RemoteSignerError{} 2028 } 2029 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2030 return err 2031 } 2032 iNdEx = postIndex 2033 default: 2034 iNdEx = preIndex 2035 skippy, err := skipTypes(dAtA[iNdEx:]) 2036 if err != nil { 2037 return err 2038 } 2039 if (skippy < 0) || (iNdEx+skippy) < 0 { 2040 return ErrInvalidLengthTypes 2041 } 2042 if (iNdEx + skippy) > l { 2043 return io.ErrUnexpectedEOF 2044 } 2045 iNdEx += skippy 2046 } 2047 } 2048 2049 if iNdEx > l { 2050 return io.ErrUnexpectedEOF 2051 } 2052 return nil 2053 } 2054 func (m *SignProposalRequest) Unmarshal(dAtA []byte) error { 2055 l := len(dAtA) 2056 iNdEx := 0 2057 for iNdEx < l { 2058 preIndex := iNdEx 2059 var wire uint64 2060 for shift := uint(0); ; shift += 7 { 2061 if shift >= 64 { 2062 return ErrIntOverflowTypes 2063 } 2064 if iNdEx >= l { 2065 return io.ErrUnexpectedEOF 2066 } 2067 b := dAtA[iNdEx] 2068 iNdEx++ 2069 wire |= uint64(b&0x7F) << shift 2070 if b < 0x80 { 2071 break 2072 } 2073 } 2074 fieldNum := int32(wire >> 3) 2075 wireType := int(wire & 0x7) 2076 if wireType == 4 { 2077 return fmt.Errorf("proto: SignProposalRequest: wiretype end group for non-group") 2078 } 2079 if fieldNum <= 0 { 2080 return fmt.Errorf("proto: SignProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2081 } 2082 switch fieldNum { 2083 case 1: 2084 if wireType != 2 { 2085 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 2086 } 2087 var msglen int 2088 for shift := uint(0); ; shift += 7 { 2089 if shift >= 64 { 2090 return ErrIntOverflowTypes 2091 } 2092 if iNdEx >= l { 2093 return io.ErrUnexpectedEOF 2094 } 2095 b := dAtA[iNdEx] 2096 iNdEx++ 2097 msglen |= int(b&0x7F) << shift 2098 if b < 0x80 { 2099 break 2100 } 2101 } 2102 if msglen < 0 { 2103 return ErrInvalidLengthTypes 2104 } 2105 postIndex := iNdEx + msglen 2106 if postIndex < 0 { 2107 return ErrInvalidLengthTypes 2108 } 2109 if postIndex > l { 2110 return io.ErrUnexpectedEOF 2111 } 2112 if m.Proposal == nil { 2113 m.Proposal = &types.Proposal{} 2114 } 2115 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2116 return err 2117 } 2118 iNdEx = postIndex 2119 case 2: 2120 if wireType != 2 { 2121 return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) 2122 } 2123 var stringLen uint64 2124 for shift := uint(0); ; shift += 7 { 2125 if shift >= 64 { 2126 return ErrIntOverflowTypes 2127 } 2128 if iNdEx >= l { 2129 return io.ErrUnexpectedEOF 2130 } 2131 b := dAtA[iNdEx] 2132 iNdEx++ 2133 stringLen |= uint64(b&0x7F) << shift 2134 if b < 0x80 { 2135 break 2136 } 2137 } 2138 intStringLen := int(stringLen) 2139 if intStringLen < 0 { 2140 return ErrInvalidLengthTypes 2141 } 2142 postIndex := iNdEx + intStringLen 2143 if postIndex < 0 { 2144 return ErrInvalidLengthTypes 2145 } 2146 if postIndex > l { 2147 return io.ErrUnexpectedEOF 2148 } 2149 m.ChainId = string(dAtA[iNdEx:postIndex]) 2150 iNdEx = postIndex 2151 default: 2152 iNdEx = preIndex 2153 skippy, err := skipTypes(dAtA[iNdEx:]) 2154 if err != nil { 2155 return err 2156 } 2157 if (skippy < 0) || (iNdEx+skippy) < 0 { 2158 return ErrInvalidLengthTypes 2159 } 2160 if (iNdEx + skippy) > l { 2161 return io.ErrUnexpectedEOF 2162 } 2163 iNdEx += skippy 2164 } 2165 } 2166 2167 if iNdEx > l { 2168 return io.ErrUnexpectedEOF 2169 } 2170 return nil 2171 } 2172 func (m *SignedProposalResponse) Unmarshal(dAtA []byte) error { 2173 l := len(dAtA) 2174 iNdEx := 0 2175 for iNdEx < l { 2176 preIndex := iNdEx 2177 var wire uint64 2178 for shift := uint(0); ; shift += 7 { 2179 if shift >= 64 { 2180 return ErrIntOverflowTypes 2181 } 2182 if iNdEx >= l { 2183 return io.ErrUnexpectedEOF 2184 } 2185 b := dAtA[iNdEx] 2186 iNdEx++ 2187 wire |= uint64(b&0x7F) << shift 2188 if b < 0x80 { 2189 break 2190 } 2191 } 2192 fieldNum := int32(wire >> 3) 2193 wireType := int(wire & 0x7) 2194 if wireType == 4 { 2195 return fmt.Errorf("proto: SignedProposalResponse: wiretype end group for non-group") 2196 } 2197 if fieldNum <= 0 { 2198 return fmt.Errorf("proto: SignedProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2199 } 2200 switch fieldNum { 2201 case 1: 2202 if wireType != 2 { 2203 return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) 2204 } 2205 var msglen int 2206 for shift := uint(0); ; shift += 7 { 2207 if shift >= 64 { 2208 return ErrIntOverflowTypes 2209 } 2210 if iNdEx >= l { 2211 return io.ErrUnexpectedEOF 2212 } 2213 b := dAtA[iNdEx] 2214 iNdEx++ 2215 msglen |= int(b&0x7F) << shift 2216 if b < 0x80 { 2217 break 2218 } 2219 } 2220 if msglen < 0 { 2221 return ErrInvalidLengthTypes 2222 } 2223 postIndex := iNdEx + msglen 2224 if postIndex < 0 { 2225 return ErrInvalidLengthTypes 2226 } 2227 if postIndex > l { 2228 return io.ErrUnexpectedEOF 2229 } 2230 if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2231 return err 2232 } 2233 iNdEx = postIndex 2234 case 2: 2235 if wireType != 2 { 2236 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 2237 } 2238 var msglen int 2239 for shift := uint(0); ; shift += 7 { 2240 if shift >= 64 { 2241 return ErrIntOverflowTypes 2242 } 2243 if iNdEx >= l { 2244 return io.ErrUnexpectedEOF 2245 } 2246 b := dAtA[iNdEx] 2247 iNdEx++ 2248 msglen |= int(b&0x7F) << shift 2249 if b < 0x80 { 2250 break 2251 } 2252 } 2253 if msglen < 0 { 2254 return ErrInvalidLengthTypes 2255 } 2256 postIndex := iNdEx + msglen 2257 if postIndex < 0 { 2258 return ErrInvalidLengthTypes 2259 } 2260 if postIndex > l { 2261 return io.ErrUnexpectedEOF 2262 } 2263 if m.Error == nil { 2264 m.Error = &RemoteSignerError{} 2265 } 2266 if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2267 return err 2268 } 2269 iNdEx = postIndex 2270 default: 2271 iNdEx = preIndex 2272 skippy, err := skipTypes(dAtA[iNdEx:]) 2273 if err != nil { 2274 return err 2275 } 2276 if (skippy < 0) || (iNdEx+skippy) < 0 { 2277 return ErrInvalidLengthTypes 2278 } 2279 if (iNdEx + skippy) > l { 2280 return io.ErrUnexpectedEOF 2281 } 2282 iNdEx += skippy 2283 } 2284 } 2285 2286 if iNdEx > l { 2287 return io.ErrUnexpectedEOF 2288 } 2289 return nil 2290 } 2291 func (m *PingRequest) Unmarshal(dAtA []byte) error { 2292 l := len(dAtA) 2293 iNdEx := 0 2294 for iNdEx < l { 2295 preIndex := iNdEx 2296 var wire uint64 2297 for shift := uint(0); ; shift += 7 { 2298 if shift >= 64 { 2299 return ErrIntOverflowTypes 2300 } 2301 if iNdEx >= l { 2302 return io.ErrUnexpectedEOF 2303 } 2304 b := dAtA[iNdEx] 2305 iNdEx++ 2306 wire |= uint64(b&0x7F) << shift 2307 if b < 0x80 { 2308 break 2309 } 2310 } 2311 fieldNum := int32(wire >> 3) 2312 wireType := int(wire & 0x7) 2313 if wireType == 4 { 2314 return fmt.Errorf("proto: PingRequest: wiretype end group for non-group") 2315 } 2316 if fieldNum <= 0 { 2317 return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2318 } 2319 switch fieldNum { 2320 default: 2321 iNdEx = preIndex 2322 skippy, err := skipTypes(dAtA[iNdEx:]) 2323 if err != nil { 2324 return err 2325 } 2326 if (skippy < 0) || (iNdEx+skippy) < 0 { 2327 return ErrInvalidLengthTypes 2328 } 2329 if (iNdEx + skippy) > l { 2330 return io.ErrUnexpectedEOF 2331 } 2332 iNdEx += skippy 2333 } 2334 } 2335 2336 if iNdEx > l { 2337 return io.ErrUnexpectedEOF 2338 } 2339 return nil 2340 } 2341 func (m *PingResponse) Unmarshal(dAtA []byte) error { 2342 l := len(dAtA) 2343 iNdEx := 0 2344 for iNdEx < l { 2345 preIndex := iNdEx 2346 var wire uint64 2347 for shift := uint(0); ; shift += 7 { 2348 if shift >= 64 { 2349 return ErrIntOverflowTypes 2350 } 2351 if iNdEx >= l { 2352 return io.ErrUnexpectedEOF 2353 } 2354 b := dAtA[iNdEx] 2355 iNdEx++ 2356 wire |= uint64(b&0x7F) << shift 2357 if b < 0x80 { 2358 break 2359 } 2360 } 2361 fieldNum := int32(wire >> 3) 2362 wireType := int(wire & 0x7) 2363 if wireType == 4 { 2364 return fmt.Errorf("proto: PingResponse: wiretype end group for non-group") 2365 } 2366 if fieldNum <= 0 { 2367 return fmt.Errorf("proto: PingResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2368 } 2369 switch fieldNum { 2370 default: 2371 iNdEx = preIndex 2372 skippy, err := skipTypes(dAtA[iNdEx:]) 2373 if err != nil { 2374 return err 2375 } 2376 if (skippy < 0) || (iNdEx+skippy) < 0 { 2377 return ErrInvalidLengthTypes 2378 } 2379 if (iNdEx + skippy) > l { 2380 return io.ErrUnexpectedEOF 2381 } 2382 iNdEx += skippy 2383 } 2384 } 2385 2386 if iNdEx > l { 2387 return io.ErrUnexpectedEOF 2388 } 2389 return nil 2390 } 2391 func (m *Message) Unmarshal(dAtA []byte) error { 2392 l := len(dAtA) 2393 iNdEx := 0 2394 for iNdEx < l { 2395 preIndex := iNdEx 2396 var wire uint64 2397 for shift := uint(0); ; shift += 7 { 2398 if shift >= 64 { 2399 return ErrIntOverflowTypes 2400 } 2401 if iNdEx >= l { 2402 return io.ErrUnexpectedEOF 2403 } 2404 b := dAtA[iNdEx] 2405 iNdEx++ 2406 wire |= uint64(b&0x7F) << shift 2407 if b < 0x80 { 2408 break 2409 } 2410 } 2411 fieldNum := int32(wire >> 3) 2412 wireType := int(wire & 0x7) 2413 if wireType == 4 { 2414 return fmt.Errorf("proto: Message: wiretype end group for non-group") 2415 } 2416 if fieldNum <= 0 { 2417 return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) 2418 } 2419 switch fieldNum { 2420 case 1: 2421 if wireType != 2 { 2422 return fmt.Errorf("proto: wrong wireType = %d for field PubKeyRequest", wireType) 2423 } 2424 var msglen int 2425 for shift := uint(0); ; shift += 7 { 2426 if shift >= 64 { 2427 return ErrIntOverflowTypes 2428 } 2429 if iNdEx >= l { 2430 return io.ErrUnexpectedEOF 2431 } 2432 b := dAtA[iNdEx] 2433 iNdEx++ 2434 msglen |= int(b&0x7F) << shift 2435 if b < 0x80 { 2436 break 2437 } 2438 } 2439 if msglen < 0 { 2440 return ErrInvalidLengthTypes 2441 } 2442 postIndex := iNdEx + msglen 2443 if postIndex < 0 { 2444 return ErrInvalidLengthTypes 2445 } 2446 if postIndex > l { 2447 return io.ErrUnexpectedEOF 2448 } 2449 v := &PubKeyRequest{} 2450 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2451 return err 2452 } 2453 m.Sum = &Message_PubKeyRequest{v} 2454 iNdEx = postIndex 2455 case 2: 2456 if wireType != 2 { 2457 return fmt.Errorf("proto: wrong wireType = %d for field PubKeyResponse", wireType) 2458 } 2459 var msglen int 2460 for shift := uint(0); ; shift += 7 { 2461 if shift >= 64 { 2462 return ErrIntOverflowTypes 2463 } 2464 if iNdEx >= l { 2465 return io.ErrUnexpectedEOF 2466 } 2467 b := dAtA[iNdEx] 2468 iNdEx++ 2469 msglen |= int(b&0x7F) << shift 2470 if b < 0x80 { 2471 break 2472 } 2473 } 2474 if msglen < 0 { 2475 return ErrInvalidLengthTypes 2476 } 2477 postIndex := iNdEx + msglen 2478 if postIndex < 0 { 2479 return ErrInvalidLengthTypes 2480 } 2481 if postIndex > l { 2482 return io.ErrUnexpectedEOF 2483 } 2484 v := &PubKeyResponse{} 2485 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2486 return err 2487 } 2488 m.Sum = &Message_PubKeyResponse{v} 2489 iNdEx = postIndex 2490 case 3: 2491 if wireType != 2 { 2492 return fmt.Errorf("proto: wrong wireType = %d for field SignVoteRequest", wireType) 2493 } 2494 var msglen int 2495 for shift := uint(0); ; shift += 7 { 2496 if shift >= 64 { 2497 return ErrIntOverflowTypes 2498 } 2499 if iNdEx >= l { 2500 return io.ErrUnexpectedEOF 2501 } 2502 b := dAtA[iNdEx] 2503 iNdEx++ 2504 msglen |= int(b&0x7F) << shift 2505 if b < 0x80 { 2506 break 2507 } 2508 } 2509 if msglen < 0 { 2510 return ErrInvalidLengthTypes 2511 } 2512 postIndex := iNdEx + msglen 2513 if postIndex < 0 { 2514 return ErrInvalidLengthTypes 2515 } 2516 if postIndex > l { 2517 return io.ErrUnexpectedEOF 2518 } 2519 v := &SignVoteRequest{} 2520 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2521 return err 2522 } 2523 m.Sum = &Message_SignVoteRequest{v} 2524 iNdEx = postIndex 2525 case 4: 2526 if wireType != 2 { 2527 return fmt.Errorf("proto: wrong wireType = %d for field SignedVoteResponse", wireType) 2528 } 2529 var msglen int 2530 for shift := uint(0); ; shift += 7 { 2531 if shift >= 64 { 2532 return ErrIntOverflowTypes 2533 } 2534 if iNdEx >= l { 2535 return io.ErrUnexpectedEOF 2536 } 2537 b := dAtA[iNdEx] 2538 iNdEx++ 2539 msglen |= int(b&0x7F) << shift 2540 if b < 0x80 { 2541 break 2542 } 2543 } 2544 if msglen < 0 { 2545 return ErrInvalidLengthTypes 2546 } 2547 postIndex := iNdEx + msglen 2548 if postIndex < 0 { 2549 return ErrInvalidLengthTypes 2550 } 2551 if postIndex > l { 2552 return io.ErrUnexpectedEOF 2553 } 2554 v := &SignedVoteResponse{} 2555 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2556 return err 2557 } 2558 m.Sum = &Message_SignedVoteResponse{v} 2559 iNdEx = postIndex 2560 case 5: 2561 if wireType != 2 { 2562 return fmt.Errorf("proto: wrong wireType = %d for field SignProposalRequest", wireType) 2563 } 2564 var msglen int 2565 for shift := uint(0); ; shift += 7 { 2566 if shift >= 64 { 2567 return ErrIntOverflowTypes 2568 } 2569 if iNdEx >= l { 2570 return io.ErrUnexpectedEOF 2571 } 2572 b := dAtA[iNdEx] 2573 iNdEx++ 2574 msglen |= int(b&0x7F) << shift 2575 if b < 0x80 { 2576 break 2577 } 2578 } 2579 if msglen < 0 { 2580 return ErrInvalidLengthTypes 2581 } 2582 postIndex := iNdEx + msglen 2583 if postIndex < 0 { 2584 return ErrInvalidLengthTypes 2585 } 2586 if postIndex > l { 2587 return io.ErrUnexpectedEOF 2588 } 2589 v := &SignProposalRequest{} 2590 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2591 return err 2592 } 2593 m.Sum = &Message_SignProposalRequest{v} 2594 iNdEx = postIndex 2595 case 6: 2596 if wireType != 2 { 2597 return fmt.Errorf("proto: wrong wireType = %d for field SignedProposalResponse", wireType) 2598 } 2599 var msglen int 2600 for shift := uint(0); ; shift += 7 { 2601 if shift >= 64 { 2602 return ErrIntOverflowTypes 2603 } 2604 if iNdEx >= l { 2605 return io.ErrUnexpectedEOF 2606 } 2607 b := dAtA[iNdEx] 2608 iNdEx++ 2609 msglen |= int(b&0x7F) << shift 2610 if b < 0x80 { 2611 break 2612 } 2613 } 2614 if msglen < 0 { 2615 return ErrInvalidLengthTypes 2616 } 2617 postIndex := iNdEx + msglen 2618 if postIndex < 0 { 2619 return ErrInvalidLengthTypes 2620 } 2621 if postIndex > l { 2622 return io.ErrUnexpectedEOF 2623 } 2624 v := &SignedProposalResponse{} 2625 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2626 return err 2627 } 2628 m.Sum = &Message_SignedProposalResponse{v} 2629 iNdEx = postIndex 2630 case 7: 2631 if wireType != 2 { 2632 return fmt.Errorf("proto: wrong wireType = %d for field PingRequest", wireType) 2633 } 2634 var msglen int 2635 for shift := uint(0); ; shift += 7 { 2636 if shift >= 64 { 2637 return ErrIntOverflowTypes 2638 } 2639 if iNdEx >= l { 2640 return io.ErrUnexpectedEOF 2641 } 2642 b := dAtA[iNdEx] 2643 iNdEx++ 2644 msglen |= int(b&0x7F) << shift 2645 if b < 0x80 { 2646 break 2647 } 2648 } 2649 if msglen < 0 { 2650 return ErrInvalidLengthTypes 2651 } 2652 postIndex := iNdEx + msglen 2653 if postIndex < 0 { 2654 return ErrInvalidLengthTypes 2655 } 2656 if postIndex > l { 2657 return io.ErrUnexpectedEOF 2658 } 2659 v := &PingRequest{} 2660 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2661 return err 2662 } 2663 m.Sum = &Message_PingRequest{v} 2664 iNdEx = postIndex 2665 case 8: 2666 if wireType != 2 { 2667 return fmt.Errorf("proto: wrong wireType = %d for field PingResponse", wireType) 2668 } 2669 var msglen int 2670 for shift := uint(0); ; shift += 7 { 2671 if shift >= 64 { 2672 return ErrIntOverflowTypes 2673 } 2674 if iNdEx >= l { 2675 return io.ErrUnexpectedEOF 2676 } 2677 b := dAtA[iNdEx] 2678 iNdEx++ 2679 msglen |= int(b&0x7F) << shift 2680 if b < 0x80 { 2681 break 2682 } 2683 } 2684 if msglen < 0 { 2685 return ErrInvalidLengthTypes 2686 } 2687 postIndex := iNdEx + msglen 2688 if postIndex < 0 { 2689 return ErrInvalidLengthTypes 2690 } 2691 if postIndex > l { 2692 return io.ErrUnexpectedEOF 2693 } 2694 v := &PingResponse{} 2695 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2696 return err 2697 } 2698 m.Sum = &Message_PingResponse{v} 2699 iNdEx = postIndex 2700 default: 2701 iNdEx = preIndex 2702 skippy, err := skipTypes(dAtA[iNdEx:]) 2703 if err != nil { 2704 return err 2705 } 2706 if (skippy < 0) || (iNdEx+skippy) < 0 { 2707 return ErrInvalidLengthTypes 2708 } 2709 if (iNdEx + skippy) > l { 2710 return io.ErrUnexpectedEOF 2711 } 2712 iNdEx += skippy 2713 } 2714 } 2715 2716 if iNdEx > l { 2717 return io.ErrUnexpectedEOF 2718 } 2719 return nil 2720 } 2721 func skipTypes(dAtA []byte) (n int, err error) { 2722 l := len(dAtA) 2723 iNdEx := 0 2724 depth := 0 2725 for iNdEx < l { 2726 var wire uint64 2727 for shift := uint(0); ; shift += 7 { 2728 if shift >= 64 { 2729 return 0, ErrIntOverflowTypes 2730 } 2731 if iNdEx >= l { 2732 return 0, io.ErrUnexpectedEOF 2733 } 2734 b := dAtA[iNdEx] 2735 iNdEx++ 2736 wire |= (uint64(b) & 0x7F) << shift 2737 if b < 0x80 { 2738 break 2739 } 2740 } 2741 wireType := int(wire & 0x7) 2742 switch wireType { 2743 case 0: 2744 for shift := uint(0); ; shift += 7 { 2745 if shift >= 64 { 2746 return 0, ErrIntOverflowTypes 2747 } 2748 if iNdEx >= l { 2749 return 0, io.ErrUnexpectedEOF 2750 } 2751 iNdEx++ 2752 if dAtA[iNdEx-1] < 0x80 { 2753 break 2754 } 2755 } 2756 case 1: 2757 iNdEx += 8 2758 case 2: 2759 var length int 2760 for shift := uint(0); ; shift += 7 { 2761 if shift >= 64 { 2762 return 0, ErrIntOverflowTypes 2763 } 2764 if iNdEx >= l { 2765 return 0, io.ErrUnexpectedEOF 2766 } 2767 b := dAtA[iNdEx] 2768 iNdEx++ 2769 length |= (int(b) & 0x7F) << shift 2770 if b < 0x80 { 2771 break 2772 } 2773 } 2774 if length < 0 { 2775 return 0, ErrInvalidLengthTypes 2776 } 2777 iNdEx += length 2778 case 3: 2779 depth++ 2780 case 4: 2781 if depth == 0 { 2782 return 0, ErrUnexpectedEndOfGroupTypes 2783 } 2784 depth-- 2785 case 5: 2786 iNdEx += 4 2787 default: 2788 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2789 } 2790 if iNdEx < 0 { 2791 return 0, ErrInvalidLengthTypes 2792 } 2793 if depth == 0 { 2794 return iNdEx, nil 2795 } 2796 } 2797 return 0, io.ErrUnexpectedEOF 2798 } 2799 2800 var ( 2801 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 2802 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 2803 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 2804 )