github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/types/tx/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/tx/v1beta1/tx.proto 3 4 package tx 5 6 import ( 7 fmt "fmt" 8 types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/codec/types" 9 types1 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/crypto/types" 10 //github_com_cosmos_cosmos_sdk_types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types/ibc-adapter/types" 11 github_com_cosmos_cosmos_sdk_types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 12 types2 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 13 signing "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types/tx/signing" 14 _ "github.com/gogo/protobuf/gogoproto" 15 proto "github.com/gogo/protobuf/proto" 16 io "io" 17 math "math" 18 math_bits "math/bits" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 // Tx is the standard type used for broadcasting transactions. 33 type Tx struct { 34 // body is the processable content of the transaction 35 Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` 36 // auth_info is the authorization related content of the transaction, 37 // specifically signers, signer modes and fee 38 AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"` 39 // signatures is a list of signatures that matches the length and order of 40 // AuthInfo's signer_infos to allow connecting signature meta information like 41 // public key and signing mode by position. 42 Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` 43 } 44 45 func (m *Tx) Reset() { *m = Tx{} } 46 func (m *Tx) String() string { return proto.CompactTextString(m) } 47 func (*Tx) ProtoMessage() {} 48 func (*Tx) Descriptor() ([]byte, []int) { 49 return fileDescriptor_96d1575ffde80842, []int{0} 50 } 51 func (m *Tx) XXX_Unmarshal(b []byte) error { 52 return m.Unmarshal(b) 53 } 54 func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 55 if deterministic { 56 return xxx_messageInfo_Tx.Marshal(b, m, deterministic) 57 } else { 58 b = b[:cap(b)] 59 n, err := m.MarshalToSizedBuffer(b) 60 if err != nil { 61 return nil, err 62 } 63 return b[:n], nil 64 } 65 } 66 func (m *Tx) XXX_Merge(src proto.Message) { 67 xxx_messageInfo_Tx.Merge(m, src) 68 } 69 func (m *Tx) XXX_Size() int { 70 return m.Size() 71 } 72 func (m *Tx) XXX_DiscardUnknown() { 73 xxx_messageInfo_Tx.DiscardUnknown(m) 74 } 75 76 var xxx_messageInfo_Tx proto.InternalMessageInfo 77 78 func (m *Tx) GetBody() *TxBody { 79 if m != nil { 80 return m.Body 81 } 82 return nil 83 } 84 85 func (m *Tx) GetAuthInfo() *AuthInfo { 86 if m != nil { 87 return m.AuthInfo 88 } 89 return nil 90 } 91 92 func (m *Tx) GetSignatures() [][]byte { 93 if m != nil { 94 return m.Signatures 95 } 96 return nil 97 } 98 99 // TxRaw is a variant of Tx that pins the signer's exact binary representation 100 // of body and auth_info. This is used for signing, broadcasting and 101 // verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and 102 // the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used 103 // as the transaction ID. 104 type TxRaw struct { 105 // body_bytes is a protobuf serialization of a TxBody that matches the 106 // representation in SignDoc. 107 BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` 108 // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the 109 // representation in SignDoc. 110 AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` 111 // signatures is a list of signatures that matches the length and order of 112 // AuthInfo's signer_infos to allow connecting signature meta information like 113 // public key and signing mode by position. 114 Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` 115 } 116 117 func (m *TxRaw) Reset() { *m = TxRaw{} } 118 func (m *TxRaw) String() string { return proto.CompactTextString(m) } 119 func (*TxRaw) ProtoMessage() {} 120 func (*TxRaw) Descriptor() ([]byte, []int) { 121 return fileDescriptor_96d1575ffde80842, []int{1} 122 } 123 func (m *TxRaw) XXX_Unmarshal(b []byte) error { 124 return m.Unmarshal(b) 125 } 126 func (m *TxRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 127 if deterministic { 128 return xxx_messageInfo_TxRaw.Marshal(b, m, deterministic) 129 } else { 130 b = b[:cap(b)] 131 n, err := m.MarshalToSizedBuffer(b) 132 if err != nil { 133 return nil, err 134 } 135 return b[:n], nil 136 } 137 } 138 func (m *TxRaw) XXX_Merge(src proto.Message) { 139 xxx_messageInfo_TxRaw.Merge(m, src) 140 } 141 func (m *TxRaw) XXX_Size() int { 142 return m.Size() 143 } 144 func (m *TxRaw) XXX_DiscardUnknown() { 145 xxx_messageInfo_TxRaw.DiscardUnknown(m) 146 } 147 148 var xxx_messageInfo_TxRaw proto.InternalMessageInfo 149 150 func (m *TxRaw) GetBodyBytes() []byte { 151 if m != nil { 152 return m.BodyBytes 153 } 154 return nil 155 } 156 157 func (m *TxRaw) GetAuthInfoBytes() []byte { 158 if m != nil { 159 return m.AuthInfoBytes 160 } 161 return nil 162 } 163 164 func (m *TxRaw) GetSignatures() [][]byte { 165 if m != nil { 166 return m.Signatures 167 } 168 return nil 169 } 170 171 // SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. 172 type SignDoc struct { 173 // body_bytes is protobuf serialization of a TxBody that matches the 174 // representation in TxRaw. 175 BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` 176 // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the 177 // representation in TxRaw. 178 AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` 179 // chain_id is the unique identifier of the chain this transaction targets. 180 // It prevents signed transactions from being used on another chain by an 181 // attacker 182 ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` 183 // account_number is the account number of the account in state 184 AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` 185 } 186 187 func (m *SignDoc) Reset() { *m = SignDoc{} } 188 func (m *SignDoc) String() string { return proto.CompactTextString(m) } 189 func (*SignDoc) ProtoMessage() {} 190 func (*SignDoc) Descriptor() ([]byte, []int) { 191 return fileDescriptor_96d1575ffde80842, []int{2} 192 } 193 func (m *SignDoc) XXX_Unmarshal(b []byte) error { 194 return m.Unmarshal(b) 195 } 196 func (m *SignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 197 if deterministic { 198 return xxx_messageInfo_SignDoc.Marshal(b, m, deterministic) 199 } else { 200 b = b[:cap(b)] 201 n, err := m.MarshalToSizedBuffer(b) 202 if err != nil { 203 return nil, err 204 } 205 return b[:n], nil 206 } 207 } 208 func (m *SignDoc) XXX_Merge(src proto.Message) { 209 xxx_messageInfo_SignDoc.Merge(m, src) 210 } 211 func (m *SignDoc) XXX_Size() int { 212 return m.Size() 213 } 214 func (m *SignDoc) XXX_DiscardUnknown() { 215 xxx_messageInfo_SignDoc.DiscardUnknown(m) 216 } 217 218 var xxx_messageInfo_SignDoc proto.InternalMessageInfo 219 220 func (m *SignDoc) GetBodyBytes() []byte { 221 if m != nil { 222 return m.BodyBytes 223 } 224 return nil 225 } 226 227 func (m *SignDoc) GetAuthInfoBytes() []byte { 228 if m != nil { 229 return m.AuthInfoBytes 230 } 231 return nil 232 } 233 234 func (m *SignDoc) GetChainId() string { 235 if m != nil { 236 return m.ChainId 237 } 238 return "" 239 } 240 241 func (m *SignDoc) GetAccountNumber() uint64 { 242 if m != nil { 243 return m.AccountNumber 244 } 245 return 0 246 } 247 248 // TxBody is the body of a transaction that all signers sign over. 249 type TxBody struct { 250 // messages is a list of messages to be executed. The required signers of 251 // those messages define the number and order of elements in AuthInfo's 252 // signer_infos and Tx's signatures. Each required signer address is added to 253 // the list only the first time it occurs. 254 // By convention, the first required signer (usually from the first message) 255 // is referred to as the primary signer and pays the fee for the whole 256 // transaction. 257 Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` 258 // memo is any arbitrary note/comment to be added to the transaction. 259 // WARNING: in clients, any publicly exposed text should not be called memo, 260 // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). 261 Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` 262 // timeout is the block height after which this transaction will not 263 // be processed by the chain 264 TimeoutHeight uint64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` 265 // extension_options are arbitrary options that can be added by chains 266 // when the default options are not sufficient. If any of these are present 267 // and can't be handled, the transaction will be rejected 268 ExtensionOptions []*types.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` 269 // extension_options are arbitrary options that can be added by chains 270 // when the default options are not sufficient. If any of these are present 271 // and can't be handled, they will be ignored 272 NonCriticalExtensionOptions []*types.Any `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"` 273 } 274 275 func (m *TxBody) Reset() { *m = TxBody{} } 276 func (m *TxBody) String() string { return proto.CompactTextString(m) } 277 func (*TxBody) ProtoMessage() {} 278 func (*TxBody) Descriptor() ([]byte, []int) { 279 return fileDescriptor_96d1575ffde80842, []int{3} 280 } 281 func (m *TxBody) XXX_Unmarshal(b []byte) error { 282 return m.Unmarshal(b) 283 } 284 func (m *TxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 285 if deterministic { 286 return xxx_messageInfo_TxBody.Marshal(b, m, deterministic) 287 } else { 288 b = b[:cap(b)] 289 n, err := m.MarshalToSizedBuffer(b) 290 if err != nil { 291 return nil, err 292 } 293 return b[:n], nil 294 } 295 } 296 func (m *TxBody) XXX_Merge(src proto.Message) { 297 xxx_messageInfo_TxBody.Merge(m, src) 298 } 299 func (m *TxBody) XXX_Size() int { 300 return m.Size() 301 } 302 func (m *TxBody) XXX_DiscardUnknown() { 303 xxx_messageInfo_TxBody.DiscardUnknown(m) 304 } 305 306 var xxx_messageInfo_TxBody proto.InternalMessageInfo 307 308 func (m *TxBody) GetMessages() []*types.Any { 309 if m != nil { 310 return m.Messages 311 } 312 return nil 313 } 314 315 func (m *TxBody) GetMemo() string { 316 if m != nil { 317 return m.Memo 318 } 319 return "" 320 } 321 322 func (m *TxBody) GetTimeoutHeight() uint64 { 323 if m != nil { 324 return m.TimeoutHeight 325 } 326 return 0 327 } 328 329 func (m *TxBody) GetExtensionOptions() []*types.Any { 330 if m != nil { 331 return m.ExtensionOptions 332 } 333 return nil 334 } 335 336 func (m *TxBody) GetNonCriticalExtensionOptions() []*types.Any { 337 if m != nil { 338 return m.NonCriticalExtensionOptions 339 } 340 return nil 341 } 342 343 // AuthInfo describes the fee and signer modes that are used to sign a 344 // transaction. 345 type AuthInfo struct { 346 // signer_infos defines the signing modes for the required signers. The number 347 // and order of elements must match the required signers from TxBody's 348 // messages. The first element is the primary signer and the one which pays 349 // the fee. 350 SignerInfos []*SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` 351 // Fee is the fee and gas limit for the transaction. The first signer is the 352 // primary signer and the one which pays the fee. The fee can be calculated 353 // based on the cost of evaluating the body and doing signature verification 354 // of the signers. This can be estimated via simulation. 355 Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` 356 } 357 358 func (m *AuthInfo) Reset() { *m = AuthInfo{} } 359 func (m *AuthInfo) String() string { return proto.CompactTextString(m) } 360 func (*AuthInfo) ProtoMessage() {} 361 func (*AuthInfo) Descriptor() ([]byte, []int) { 362 return fileDescriptor_96d1575ffde80842, []int{4} 363 } 364 func (m *AuthInfo) XXX_Unmarshal(b []byte) error { 365 return m.Unmarshal(b) 366 } 367 func (m *AuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 368 if deterministic { 369 return xxx_messageInfo_AuthInfo.Marshal(b, m, deterministic) 370 } else { 371 b = b[:cap(b)] 372 n, err := m.MarshalToSizedBuffer(b) 373 if err != nil { 374 return nil, err 375 } 376 return b[:n], nil 377 } 378 } 379 func (m *AuthInfo) XXX_Merge(src proto.Message) { 380 xxx_messageInfo_AuthInfo.Merge(m, src) 381 } 382 func (m *AuthInfo) XXX_Size() int { 383 return m.Size() 384 } 385 func (m *AuthInfo) XXX_DiscardUnknown() { 386 xxx_messageInfo_AuthInfo.DiscardUnknown(m) 387 } 388 389 var xxx_messageInfo_AuthInfo proto.InternalMessageInfo 390 391 func (m *AuthInfo) GetSignerInfos() []*SignerInfo { 392 if m != nil { 393 return m.SignerInfos 394 } 395 return nil 396 } 397 398 func (m *AuthInfo) GetFee() *Fee { 399 if m != nil { 400 return m.Fee 401 } 402 return nil 403 } 404 405 // SignerInfo describes the public key and signing mode of a single top-level 406 // signer. 407 type SignerInfo struct { 408 // public_key is the public key of the signer. It is optional for accounts 409 // that already exist in state. If unset, the verifier can use the required \ 410 // signer address for this position and lookup the public key. 411 PublicKey *types.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` 412 // mode_info describes the signing mode of the signer and is a nested 413 // structure to support nested multisig pubkey's 414 ModeInfo *ModeInfo `protobuf:"bytes,2,opt,name=mode_info,json=modeInfo,proto3" json:"mode_info,omitempty"` 415 // sequence is the sequence of the account, which describes the 416 // number of committed transactions signed by a given address. It is used to 417 // prevent replay attacks. 418 Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` 419 } 420 421 func (m *SignerInfo) Reset() { *m = SignerInfo{} } 422 func (m *SignerInfo) String() string { return proto.CompactTextString(m) } 423 func (*SignerInfo) ProtoMessage() {} 424 func (*SignerInfo) Descriptor() ([]byte, []int) { 425 return fileDescriptor_96d1575ffde80842, []int{5} 426 } 427 func (m *SignerInfo) XXX_Unmarshal(b []byte) error { 428 return m.Unmarshal(b) 429 } 430 func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 431 if deterministic { 432 return xxx_messageInfo_SignerInfo.Marshal(b, m, deterministic) 433 } else { 434 b = b[:cap(b)] 435 n, err := m.MarshalToSizedBuffer(b) 436 if err != nil { 437 return nil, err 438 } 439 return b[:n], nil 440 } 441 } 442 func (m *SignerInfo) XXX_Merge(src proto.Message) { 443 xxx_messageInfo_SignerInfo.Merge(m, src) 444 } 445 func (m *SignerInfo) XXX_Size() int { 446 return m.Size() 447 } 448 func (m *SignerInfo) XXX_DiscardUnknown() { 449 xxx_messageInfo_SignerInfo.DiscardUnknown(m) 450 } 451 452 var xxx_messageInfo_SignerInfo proto.InternalMessageInfo 453 454 func (m *SignerInfo) GetPublicKey() *types.Any { 455 if m != nil { 456 return m.PublicKey 457 } 458 return nil 459 } 460 461 func (m *SignerInfo) GetModeInfo() *ModeInfo { 462 if m != nil { 463 return m.ModeInfo 464 } 465 return nil 466 } 467 468 func (m *SignerInfo) GetSequence() uint64 { 469 if m != nil { 470 return m.Sequence 471 } 472 return 0 473 } 474 475 // ModeInfo describes the signing mode of a single or nested multisig signer. 476 type ModeInfo struct { 477 // sum is the oneof that specifies whether this represents a single or nested 478 // multisig signer 479 // 480 // Types that are valid to be assigned to Sum: 481 // *ModeInfo_Single_ 482 // *ModeInfo_Multi_ 483 Sum isModeInfo_Sum `protobuf_oneof:"sum"` 484 } 485 486 func (m *ModeInfo) Reset() { *m = ModeInfo{} } 487 func (m *ModeInfo) String() string { return proto.CompactTextString(m) } 488 func (*ModeInfo) ProtoMessage() {} 489 func (*ModeInfo) Descriptor() ([]byte, []int) { 490 return fileDescriptor_96d1575ffde80842, []int{6} 491 } 492 func (m *ModeInfo) XXX_Unmarshal(b []byte) error { 493 return m.Unmarshal(b) 494 } 495 func (m *ModeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 496 if deterministic { 497 return xxx_messageInfo_ModeInfo.Marshal(b, m, deterministic) 498 } else { 499 b = b[:cap(b)] 500 n, err := m.MarshalToSizedBuffer(b) 501 if err != nil { 502 return nil, err 503 } 504 return b[:n], nil 505 } 506 } 507 func (m *ModeInfo) XXX_Merge(src proto.Message) { 508 xxx_messageInfo_ModeInfo.Merge(m, src) 509 } 510 func (m *ModeInfo) XXX_Size() int { 511 return m.Size() 512 } 513 func (m *ModeInfo) XXX_DiscardUnknown() { 514 xxx_messageInfo_ModeInfo.DiscardUnknown(m) 515 } 516 517 var xxx_messageInfo_ModeInfo proto.InternalMessageInfo 518 519 type isModeInfo_Sum interface { 520 isModeInfo_Sum() 521 MarshalTo([]byte) (int, error) 522 Size() int 523 } 524 525 type ModeInfo_Single_ struct { 526 Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"` 527 } 528 type ModeInfo_Multi_ struct { 529 Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"` 530 } 531 532 func (*ModeInfo_Single_) isModeInfo_Sum() {} 533 func (*ModeInfo_Multi_) isModeInfo_Sum() {} 534 535 func (m *ModeInfo) GetSum() isModeInfo_Sum { 536 if m != nil { 537 return m.Sum 538 } 539 return nil 540 } 541 542 func (m *ModeInfo) GetSingle() *ModeInfo_Single { 543 if x, ok := m.GetSum().(*ModeInfo_Single_); ok { 544 return x.Single 545 } 546 return nil 547 } 548 549 func (m *ModeInfo) GetMulti() *ModeInfo_Multi { 550 if x, ok := m.GetSum().(*ModeInfo_Multi_); ok { 551 return x.Multi 552 } 553 return nil 554 } 555 556 // XXX_OneofWrappers is for the internal use of the proto package. 557 func (*ModeInfo) XXX_OneofWrappers() []interface{} { 558 return []interface{}{ 559 (*ModeInfo_Single_)(nil), 560 (*ModeInfo_Multi_)(nil), 561 } 562 } 563 564 // Single is the mode info for a single signer. It is structured as a message 565 // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the 566 // future 567 type ModeInfo_Single struct { 568 // mode is the signing mode of the single signer 569 Mode signing.SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"` 570 } 571 572 func (m *ModeInfo_Single) Reset() { *m = ModeInfo_Single{} } 573 func (m *ModeInfo_Single) String() string { return proto.CompactTextString(m) } 574 func (*ModeInfo_Single) ProtoMessage() {} 575 func (*ModeInfo_Single) Descriptor() ([]byte, []int) { 576 return fileDescriptor_96d1575ffde80842, []int{6, 0} 577 } 578 func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error { 579 return m.Unmarshal(b) 580 } 581 func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 582 if deterministic { 583 return xxx_messageInfo_ModeInfo_Single.Marshal(b, m, deterministic) 584 } else { 585 b = b[:cap(b)] 586 n, err := m.MarshalToSizedBuffer(b) 587 if err != nil { 588 return nil, err 589 } 590 return b[:n], nil 591 } 592 } 593 func (m *ModeInfo_Single) XXX_Merge(src proto.Message) { 594 xxx_messageInfo_ModeInfo_Single.Merge(m, src) 595 } 596 func (m *ModeInfo_Single) XXX_Size() int { 597 return m.Size() 598 } 599 func (m *ModeInfo_Single) XXX_DiscardUnknown() { 600 xxx_messageInfo_ModeInfo_Single.DiscardUnknown(m) 601 } 602 603 var xxx_messageInfo_ModeInfo_Single proto.InternalMessageInfo 604 605 func (m *ModeInfo_Single) GetMode() signing.SignMode { 606 if m != nil { 607 return m.Mode 608 } 609 return signing.SignMode_SIGN_MODE_UNSPECIFIED 610 } 611 612 // Multi is the mode info for a multisig public key 613 type ModeInfo_Multi struct { 614 // bitarray specifies which keys within the multisig are signing 615 Bitarray *types1.CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"` 616 // mode_infos is the corresponding modes of the signers of the multisig 617 // which could include nested multisig public keys 618 ModeInfos []*ModeInfo `protobuf:"bytes,2,rep,name=mode_infos,json=modeInfos,proto3" json:"mode_infos,omitempty"` 619 } 620 621 func (m *ModeInfo_Multi) Reset() { *m = ModeInfo_Multi{} } 622 func (m *ModeInfo_Multi) String() string { return proto.CompactTextString(m) } 623 func (*ModeInfo_Multi) ProtoMessage() {} 624 func (*ModeInfo_Multi) Descriptor() ([]byte, []int) { 625 return fileDescriptor_96d1575ffde80842, []int{6, 1} 626 } 627 func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error { 628 return m.Unmarshal(b) 629 } 630 func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 631 if deterministic { 632 return xxx_messageInfo_ModeInfo_Multi.Marshal(b, m, deterministic) 633 } else { 634 b = b[:cap(b)] 635 n, err := m.MarshalToSizedBuffer(b) 636 if err != nil { 637 return nil, err 638 } 639 return b[:n], nil 640 } 641 } 642 func (m *ModeInfo_Multi) XXX_Merge(src proto.Message) { 643 xxx_messageInfo_ModeInfo_Multi.Merge(m, src) 644 } 645 func (m *ModeInfo_Multi) XXX_Size() int { 646 return m.Size() 647 } 648 func (m *ModeInfo_Multi) XXX_DiscardUnknown() { 649 xxx_messageInfo_ModeInfo_Multi.DiscardUnknown(m) 650 } 651 652 var xxx_messageInfo_ModeInfo_Multi proto.InternalMessageInfo 653 654 func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray { 655 if m != nil { 656 return m.Bitarray 657 } 658 return nil 659 } 660 661 func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo { 662 if m != nil { 663 return m.ModeInfos 664 } 665 return nil 666 } 667 668 // Fee includes the amount of coins paid in fees and the maximum 669 // gas to be used by the transaction. The ratio yields an effective "gasprice", 670 // which must be above some miminum to be accepted into the mempool. 671 type Fee struct { 672 // amount is the amount of coins to be paid as a fee 673 Amount github_com_cosmos_cosmos_sdk_types.CoinAdapters `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` 674 // gas_limit is the maximum gas that can be used in transaction processing 675 // before an out of gas error occurs 676 GasLimit uint64 `protobuf:"varint,2,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` 677 // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. 678 // the payer must be a tx signer (and thus have signed this field in AuthInfo). 679 // setting this field does *not* change the ordering of required signers for the transaction. 680 Payer string `protobuf:"bytes,3,opt,name=payer,proto3" json:"payer,omitempty"` 681 // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used 682 // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does 683 // not support fee grants, this will fail 684 Granter string `protobuf:"bytes,4,opt,name=granter,proto3" json:"granter,omitempty"` 685 } 686 687 func (m *Fee) Reset() { *m = Fee{} } 688 func (m *Fee) String() string { return proto.CompactTextString(m) } 689 func (*Fee) ProtoMessage() {} 690 func (*Fee) Descriptor() ([]byte, []int) { 691 return fileDescriptor_96d1575ffde80842, []int{7} 692 } 693 func (m *Fee) XXX_Unmarshal(b []byte) error { 694 return m.Unmarshal(b) 695 } 696 func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 697 if deterministic { 698 return xxx_messageInfo_Fee.Marshal(b, m, deterministic) 699 } else { 700 b = b[:cap(b)] 701 n, err := m.MarshalToSizedBuffer(b) 702 if err != nil { 703 return nil, err 704 } 705 return b[:n], nil 706 } 707 } 708 func (m *Fee) XXX_Merge(src proto.Message) { 709 xxx_messageInfo_Fee.Merge(m, src) 710 } 711 func (m *Fee) XXX_Size() int { 712 return m.Size() 713 } 714 func (m *Fee) XXX_DiscardUnknown() { 715 xxx_messageInfo_Fee.DiscardUnknown(m) 716 } 717 718 var xxx_messageInfo_Fee proto.InternalMessageInfo 719 720 func (m *Fee) GetAmount() github_com_cosmos_cosmos_sdk_types.CoinAdapters { 721 if m != nil { 722 return m.Amount 723 } 724 return nil 725 } 726 727 func (m *Fee) GetGasLimit() uint64 { 728 if m != nil { 729 return m.GasLimit 730 } 731 return 0 732 } 733 734 func (m *Fee) GetPayer() string { 735 if m != nil { 736 return m.Payer 737 } 738 return "" 739 } 740 741 func (m *Fee) GetGranter() string { 742 if m != nil { 743 return m.Granter 744 } 745 return "" 746 } 747 748 func init() { 749 proto.RegisterType((*Tx)(nil), "cosmos.tx.v1beta1.Tx") 750 proto.RegisterType((*TxRaw)(nil), "cosmos.tx.v1beta1.TxRaw") 751 proto.RegisterType((*SignDoc)(nil), "cosmos.tx.v1beta1.SignDoc") 752 proto.RegisterType((*TxBody)(nil), "cosmos.tx.v1beta1.TxBody") 753 proto.RegisterType((*AuthInfo)(nil), "cosmos.tx.v1beta1.AuthInfo") 754 proto.RegisterType((*SignerInfo)(nil), "cosmos.tx.v1beta1.SignerInfo") 755 proto.RegisterType((*ModeInfo)(nil), "cosmos.tx.v1beta1.ModeInfo") 756 proto.RegisterType((*ModeInfo_Single)(nil), "cosmos.tx.v1beta1.ModeInfo.Single") 757 proto.RegisterType((*ModeInfo_Multi)(nil), "cosmos.tx.v1beta1.ModeInfo.Multi") 758 proto.RegisterType((*Fee)(nil), "cosmos.tx.v1beta1.Fee") 759 } 760 761 func init() { proto.RegisterFile("cosmos/tx/v1beta1/tx.proto", fileDescriptor_96d1575ffde80842) } 762 763 var fileDescriptor_96d1575ffde80842 = []byte{ 764 // 843 bytes of a gzipped FileDescriptorProto 765 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xdd, 0x6e, 0xdc, 0x44, 766 0x14, 0x5e, 0xef, 0x5f, 0xd6, 0x27, 0x49, 0x4b, 0x47, 0x11, 0xda, 0x6c, 0x54, 0x37, 0x18, 0x15, 767 0xf6, 0x26, 0x76, 0x9b, 0x5e, 0xf0, 0x23, 0x24, 0xc8, 0x16, 0xaa, 0x54, 0xa5, 0x20, 0x4d, 0x72, 768 0xd5, 0x1b, 0x6b, 0xec, 0x9d, 0x78, 0x47, 0x5d, 0xcf, 0x2c, 0x9e, 0x71, 0xb1, 0x1f, 0x02, 0xa9, 769 0x42, 0x42, 0xbc, 0x03, 0x2f, 0xc0, 0x2b, 0xf4, 0xb2, 0x97, 0x5c, 0x41, 0x95, 0x3c, 0x08, 0x68, 770 0xc6, 0x63, 0x27, 0x82, 0x55, 0x72, 0xc3, 0x95, 0xe7, 0x9c, 0xf9, 0xce, 0x37, 0x9f, 0xcf, 0x1f, 771 0x4c, 0x12, 0x21, 0x33, 0x21, 0x43, 0x55, 0x86, 0xaf, 0x1e, 0xc6, 0x54, 0x91, 0x87, 0xa1, 0x2a, 772 0x83, 0x55, 0x2e, 0x94, 0x40, 0x77, 0xea, 0xbb, 0x40, 0x95, 0x81, 0xbd, 0x9b, 0xec, 0xa4, 0x22, 773 0x15, 0xe6, 0x36, 0xd4, 0xa7, 0x1a, 0x38, 0x39, 0xb0, 0x24, 0x49, 0x5e, 0xad, 0x94, 0x08, 0xb3, 774 0x62, 0xa9, 0x98, 0x64, 0x69, 0xcb, 0xd8, 0x38, 0x2c, 0xdc, 0xb3, 0xf0, 0x98, 0x48, 0xda, 0x62, 775 0x12, 0xc1, 0xb8, 0xbd, 0xff, 0xf8, 0x52, 0x93, 0x64, 0x29, 0x67, 0xfc, 0x92, 0xc9, 0xda, 0x16, 776 0xb8, 0x9b, 0x0a, 0x91, 0x2e, 0x69, 0x68, 0xac, 0xb8, 0x38, 0x0b, 0x09, 0xaf, 0xea, 0x2b, 0xff, 777 0x27, 0x07, 0xba, 0xa7, 0x25, 0x3a, 0x80, 0x7e, 0x2c, 0xe6, 0xd5, 0xd8, 0xd9, 0x77, 0xa6, 0x9b, 778 0x87, 0xbb, 0xc1, 0x7f, 0xfe, 0x28, 0x38, 0x2d, 0x67, 0x62, 0x5e, 0x61, 0x03, 0x43, 0x9f, 0x82, 779 0x4b, 0x0a, 0xb5, 0x88, 0x18, 0x3f, 0x13, 0xe3, 0xae, 0x89, 0xd9, 0x5b, 0x13, 0x73, 0x54, 0xa8, 780 0xc5, 0x53, 0x7e, 0x26, 0xf0, 0x88, 0xd8, 0x13, 0xf2, 0x00, 0xb4, 0x36, 0xa2, 0x8a, 0x9c, 0xca, 781 0x71, 0x6f, 0xbf, 0x37, 0xdd, 0xc2, 0x57, 0x3c, 0x3e, 0x87, 0xc1, 0x69, 0x89, 0xc9, 0x8f, 0xe8, 782 0x2e, 0x80, 0x7e, 0x2a, 0x8a, 0x2b, 0x45, 0xa5, 0xd1, 0xb5, 0x85, 0x5d, 0xed, 0x99, 0x69, 0x07, 783 0xfa, 0x08, 0x6e, 0xb7, 0x0a, 0x2c, 0xa6, 0x6b, 0x30, 0xdb, 0xcd, 0x53, 0x35, 0xee, 0xa6, 0xf7, 784 0x7e, 0x76, 0x60, 0xe3, 0x84, 0xa5, 0xfc, 0x6b, 0x91, 0xfc, 0x5f, 0x4f, 0xee, 0xc2, 0x28, 0x59, 785 0x10, 0xc6, 0x23, 0x36, 0x1f, 0xf7, 0xf6, 0x9d, 0xa9, 0x8b, 0x37, 0x8c, 0xfd, 0x74, 0x8e, 0xee, 786 0xc3, 0x2d, 0x92, 0x24, 0xa2, 0xe0, 0x2a, 0xe2, 0x45, 0x16, 0xd3, 0x7c, 0xdc, 0xdf, 0x77, 0xa6, 787 0x7d, 0xbc, 0x6d, 0xbd, 0xdf, 0x19, 0xa7, 0xff, 0x4b, 0x17, 0x86, 0x75, 0xbe, 0xd1, 0x03, 0x18, 788 0x65, 0x54, 0x4a, 0x92, 0x1a, 0x45, 0xbd, 0xe9, 0xe6, 0xe1, 0x4e, 0x50, 0x57, 0x33, 0x68, 0xaa, 789 0x19, 0x1c, 0xf1, 0x0a, 0xb7, 0x28, 0x84, 0xa0, 0x9f, 0xd1, 0xac, 0x2e, 0x8b, 0x8b, 0xcd, 0x59, 790 0xbf, 0xab, 0x58, 0x46, 0x45, 0xa1, 0xa2, 0x05, 0x65, 0xe9, 0x42, 0x19, 0x61, 0x7d, 0xbc, 0x6d, 791 0xbd, 0xc7, 0xc6, 0x89, 0x66, 0x70, 0x87, 0x96, 0x8a, 0x72, 0xc9, 0x04, 0x8f, 0xc4, 0x4a, 0x31, 792 0xc1, 0xe5, 0xf8, 0xef, 0x8d, 0x6b, 0x9e, 0x7d, 0xaf, 0xc5, 0x7f, 0x5f, 0xc3, 0xd1, 0x0b, 0xf0, 793 0xb8, 0xe0, 0x51, 0x92, 0x33, 0xc5, 0x12, 0xb2, 0x8c, 0xd6, 0x10, 0xde, 0xbe, 0x86, 0x70, 0x8f, 794 0x0b, 0xfe, 0xd8, 0xc6, 0x7e, 0xf3, 0x2f, 0x6e, 0xff, 0x15, 0x8c, 0x9a, 0x96, 0x42, 0x5f, 0xc1, 795 0x96, 0x2e, 0x23, 0xcd, 0x4d, 0x3d, 0x9a, 0xe4, 0xdc, 0x5d, 0xd3, 0x85, 0x27, 0x06, 0x66, 0xfa, 796 0x70, 0x53, 0xb6, 0x67, 0x89, 0xa6, 0xd0, 0x3b, 0xa3, 0xd4, 0xb6, 0xef, 0xfb, 0x6b, 0x02, 0x9f, 797 0x50, 0x8a, 0x35, 0xc4, 0xff, 0xd5, 0x01, 0xb8, 0x64, 0x41, 0x8f, 0x00, 0x56, 0x45, 0xbc, 0x64, 798 0x49, 0xf4, 0x92, 0x36, 0x23, 0xb3, 0xfe, 0x6f, 0xdc, 0x1a, 0xf7, 0x8c, 0x9a, 0x91, 0xc9, 0xc4, 799 0x9c, 0xde, 0x34, 0x32, 0xcf, 0xc5, 0x9c, 0xd6, 0x23, 0x93, 0xd9, 0x13, 0x9a, 0xc0, 0x48, 0xd2, 800 0x1f, 0x0a, 0xca, 0x13, 0x6a, 0xcb, 0xd6, 0xda, 0xfe, 0xbb, 0x2e, 0x8c, 0x9a, 0x10, 0xf4, 0x05, 801 0x0c, 0x25, 0xe3, 0xe9, 0x92, 0x5a, 0x4d, 0xfe, 0x35, 0xfc, 0xc1, 0x89, 0x41, 0x1e, 0x77, 0xb0, 802 0x8d, 0x41, 0x9f, 0xc1, 0xc0, 0xec, 0x1f, 0x2b, 0xee, 0x83, 0xeb, 0x82, 0x9f, 0x6b, 0xe0, 0x71, 803 0x07, 0xd7, 0x11, 0x93, 0x23, 0x18, 0xd6, 0x74, 0xe8, 0x13, 0xe8, 0x6b, 0xdd, 0x46, 0xc0, 0xad, 804 0xc3, 0x0f, 0xaf, 0x70, 0x34, 0x1b, 0xe9, 0x6a, 0x55, 0x34, 0x1f, 0x36, 0x01, 0x93, 0xd7, 0x0e, 805 0x0c, 0x0c, 0x2b, 0x7a, 0x06, 0xa3, 0x98, 0x29, 0x92, 0xe7, 0xa4, 0xc9, 0x6d, 0xd8, 0xd0, 0xd4, 806 0x7b, 0x33, 0x68, 0xd7, 0x64, 0xc3, 0xf5, 0x58, 0x64, 0x2b, 0x92, 0xa8, 0x19, 0x53, 0x47, 0x3a, 807 0x0c, 0xb7, 0x04, 0xe8, 0x73, 0x80, 0x36, 0xeb, 0x7a, 0x5c, 0x7b, 0x37, 0xa5, 0xdd, 0x6d, 0xd2, 808 0x2e, 0x67, 0x03, 0xe8, 0xc9, 0x22, 0xf3, 0x7f, 0x77, 0xa0, 0xf7, 0x84, 0x52, 0x94, 0xc0, 0x90, 809 0x64, 0x7a, 0x48, 0x6d, 0xab, 0xb5, 0x4b, 0x52, 0xaf, 0xe7, 0x2b, 0x52, 0x18, 0x9f, 0x3d, 0x78, 810 0xf3, 0xe7, 0xbd, 0xce, 0x6f, 0x7f, 0xdd, 0x9b, 0xa6, 0x4c, 0x2d, 0x8a, 0x38, 0x48, 0x44, 0x16, 811 0x36, 0xab, 0xdf, 0x7c, 0x0e, 0xe4, 0xfc, 0x65, 0xa8, 0xaa, 0x15, 0x95, 0x26, 0x40, 0x62, 0x4b, 812 0x8d, 0xf6, 0xc0, 0x4d, 0x89, 0x8c, 0x96, 0x2c, 0x63, 0xca, 0x14, 0xa2, 0x8f, 0x47, 0x29, 0x91, 813 0xdf, 0x6a, 0x1b, 0xed, 0xc0, 0x60, 0x45, 0x2a, 0x9a, 0xdb, 0xad, 0x52, 0x1b, 0x68, 0x0c, 0x1b, 814 0x69, 0x4e, 0xb8, 0xb2, 0xcb, 0xc4, 0xc5, 0x8d, 0x39, 0xfb, 0xf2, 0xcd, 0xb9, 0xe7, 0xbc, 0x3d, 815 0xf7, 0x9c, 0x77, 0xe7, 0x9e, 0xf3, 0xfa, 0xc2, 0xeb, 0xbc, 0xbd, 0xf0, 0x3a, 0x7f, 0x5c, 0x78, 816 0x9d, 0x17, 0xf7, 0x6f, 0x16, 0x16, 0xaa, 0x32, 0x1e, 0x9a, 0x66, 0x7e, 0xf4, 0x4f, 0x00, 0x00, 817 0x00, 0xff, 0xff, 0xd4, 0xb7, 0x75, 0x7d, 0xfd, 0x06, 0x00, 0x00, 818 } 819 820 func (m *Tx) Marshal() (dAtA []byte, err error) { 821 size := m.Size() 822 dAtA = make([]byte, size) 823 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 824 if err != nil { 825 return nil, err 826 } 827 return dAtA[:n], nil 828 } 829 830 func (m *Tx) MarshalTo(dAtA []byte) (int, error) { 831 size := m.Size() 832 return m.MarshalToSizedBuffer(dAtA[:size]) 833 } 834 835 func (m *Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { 836 i := len(dAtA) 837 _ = i 838 var l int 839 _ = l 840 if len(m.Signatures) > 0 { 841 for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { 842 i -= len(m.Signatures[iNdEx]) 843 copy(dAtA[i:], m.Signatures[iNdEx]) 844 i = encodeVarintTx(dAtA, i, uint64(len(m.Signatures[iNdEx]))) 845 i-- 846 dAtA[i] = 0x1a 847 } 848 } 849 if m.AuthInfo != nil { 850 { 851 size, err := m.AuthInfo.MarshalToSizedBuffer(dAtA[:i]) 852 if err != nil { 853 return 0, err 854 } 855 i -= size 856 i = encodeVarintTx(dAtA, i, uint64(size)) 857 } 858 i-- 859 dAtA[i] = 0x12 860 } 861 if m.Body != nil { 862 { 863 size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) 864 if err != nil { 865 return 0, err 866 } 867 i -= size 868 i = encodeVarintTx(dAtA, i, uint64(size)) 869 } 870 i-- 871 dAtA[i] = 0xa 872 } 873 return len(dAtA) - i, nil 874 } 875 876 func (m *TxRaw) Marshal() (dAtA []byte, err error) { 877 size := m.Size() 878 dAtA = make([]byte, size) 879 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 880 if err != nil { 881 return nil, err 882 } 883 return dAtA[:n], nil 884 } 885 886 func (m *TxRaw) MarshalTo(dAtA []byte) (int, error) { 887 size := m.Size() 888 return m.MarshalToSizedBuffer(dAtA[:size]) 889 } 890 891 func (m *TxRaw) MarshalToSizedBuffer(dAtA []byte) (int, error) { 892 i := len(dAtA) 893 _ = i 894 var l int 895 _ = l 896 if len(m.Signatures) > 0 { 897 for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { 898 i -= len(m.Signatures[iNdEx]) 899 copy(dAtA[i:], m.Signatures[iNdEx]) 900 i = encodeVarintTx(dAtA, i, uint64(len(m.Signatures[iNdEx]))) 901 i-- 902 dAtA[i] = 0x1a 903 } 904 } 905 if len(m.AuthInfoBytes) > 0 { 906 i -= len(m.AuthInfoBytes) 907 copy(dAtA[i:], m.AuthInfoBytes) 908 i = encodeVarintTx(dAtA, i, uint64(len(m.AuthInfoBytes))) 909 i-- 910 dAtA[i] = 0x12 911 } 912 if len(m.BodyBytes) > 0 { 913 i -= len(m.BodyBytes) 914 copy(dAtA[i:], m.BodyBytes) 915 i = encodeVarintTx(dAtA, i, uint64(len(m.BodyBytes))) 916 i-- 917 dAtA[i] = 0xa 918 } 919 return len(dAtA) - i, nil 920 } 921 922 func (m *SignDoc) Marshal() (dAtA []byte, err error) { 923 size := m.Size() 924 dAtA = make([]byte, size) 925 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 926 if err != nil { 927 return nil, err 928 } 929 return dAtA[:n], nil 930 } 931 932 func (m *SignDoc) MarshalTo(dAtA []byte) (int, error) { 933 size := m.Size() 934 return m.MarshalToSizedBuffer(dAtA[:size]) 935 } 936 937 func (m *SignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error) { 938 i := len(dAtA) 939 _ = i 940 var l int 941 _ = l 942 if m.AccountNumber != 0 { 943 i = encodeVarintTx(dAtA, i, uint64(m.AccountNumber)) 944 i-- 945 dAtA[i] = 0x20 946 } 947 if len(m.ChainId) > 0 { 948 i -= len(m.ChainId) 949 copy(dAtA[i:], m.ChainId) 950 i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) 951 i-- 952 dAtA[i] = 0x1a 953 } 954 if len(m.AuthInfoBytes) > 0 { 955 i -= len(m.AuthInfoBytes) 956 copy(dAtA[i:], m.AuthInfoBytes) 957 i = encodeVarintTx(dAtA, i, uint64(len(m.AuthInfoBytes))) 958 i-- 959 dAtA[i] = 0x12 960 } 961 if len(m.BodyBytes) > 0 { 962 i -= len(m.BodyBytes) 963 copy(dAtA[i:], m.BodyBytes) 964 i = encodeVarintTx(dAtA, i, uint64(len(m.BodyBytes))) 965 i-- 966 dAtA[i] = 0xa 967 } 968 return len(dAtA) - i, nil 969 } 970 971 func (m *TxBody) 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 *TxBody) MarshalTo(dAtA []byte) (int, error) { 982 size := m.Size() 983 return m.MarshalToSizedBuffer(dAtA[:size]) 984 } 985 986 func (m *TxBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { 987 i := len(dAtA) 988 _ = i 989 var l int 990 _ = l 991 if len(m.NonCriticalExtensionOptions) > 0 { 992 for iNdEx := len(m.NonCriticalExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { 993 { 994 size, err := m.NonCriticalExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 995 if err != nil { 996 return 0, err 997 } 998 i -= size 999 i = encodeVarintTx(dAtA, i, uint64(size)) 1000 } 1001 i-- 1002 dAtA[i] = 0x7f 1003 i-- 1004 dAtA[i] = 0xfa 1005 } 1006 } 1007 if len(m.ExtensionOptions) > 0 { 1008 for iNdEx := len(m.ExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { 1009 { 1010 size, err := m.ExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1011 if err != nil { 1012 return 0, err 1013 } 1014 i -= size 1015 i = encodeVarintTx(dAtA, i, uint64(size)) 1016 } 1017 i-- 1018 dAtA[i] = 0x3f 1019 i-- 1020 dAtA[i] = 0xfa 1021 } 1022 } 1023 if m.TimeoutHeight != 0 { 1024 i = encodeVarintTx(dAtA, i, uint64(m.TimeoutHeight)) 1025 i-- 1026 dAtA[i] = 0x18 1027 } 1028 if len(m.Memo) > 0 { 1029 i -= len(m.Memo) 1030 copy(dAtA[i:], m.Memo) 1031 i = encodeVarintTx(dAtA, i, uint64(len(m.Memo))) 1032 i-- 1033 dAtA[i] = 0x12 1034 } 1035 if len(m.Messages) > 0 { 1036 for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { 1037 { 1038 size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1039 if err != nil { 1040 return 0, err 1041 } 1042 i -= size 1043 i = encodeVarintTx(dAtA, i, uint64(size)) 1044 } 1045 i-- 1046 dAtA[i] = 0xa 1047 } 1048 } 1049 return len(dAtA) - i, nil 1050 } 1051 1052 func (m *AuthInfo) Marshal() (dAtA []byte, err error) { 1053 size := m.Size() 1054 dAtA = make([]byte, size) 1055 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1056 if err != nil { 1057 return nil, err 1058 } 1059 return dAtA[:n], nil 1060 } 1061 1062 func (m *AuthInfo) MarshalTo(dAtA []byte) (int, error) { 1063 size := m.Size() 1064 return m.MarshalToSizedBuffer(dAtA[:size]) 1065 } 1066 1067 func (m *AuthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1068 i := len(dAtA) 1069 _ = i 1070 var l int 1071 _ = l 1072 if m.Fee != nil { 1073 { 1074 size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) 1075 if err != nil { 1076 return 0, err 1077 } 1078 i -= size 1079 i = encodeVarintTx(dAtA, i, uint64(size)) 1080 } 1081 i-- 1082 dAtA[i] = 0x12 1083 } 1084 if len(m.SignerInfos) > 0 { 1085 for iNdEx := len(m.SignerInfos) - 1; iNdEx >= 0; iNdEx-- { 1086 { 1087 size, err := m.SignerInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1088 if err != nil { 1089 return 0, err 1090 } 1091 i -= size 1092 i = encodeVarintTx(dAtA, i, uint64(size)) 1093 } 1094 i-- 1095 dAtA[i] = 0xa 1096 } 1097 } 1098 return len(dAtA) - i, nil 1099 } 1100 1101 func (m *SignerInfo) Marshal() (dAtA []byte, err error) { 1102 size := m.Size() 1103 dAtA = make([]byte, size) 1104 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1105 if err != nil { 1106 return nil, err 1107 } 1108 return dAtA[:n], nil 1109 } 1110 1111 func (m *SignerInfo) MarshalTo(dAtA []byte) (int, error) { 1112 size := m.Size() 1113 return m.MarshalToSizedBuffer(dAtA[:size]) 1114 } 1115 1116 func (m *SignerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1117 i := len(dAtA) 1118 _ = i 1119 var l int 1120 _ = l 1121 if m.Sequence != 0 { 1122 i = encodeVarintTx(dAtA, i, uint64(m.Sequence)) 1123 i-- 1124 dAtA[i] = 0x18 1125 } 1126 if m.ModeInfo != nil { 1127 { 1128 size, err := m.ModeInfo.MarshalToSizedBuffer(dAtA[:i]) 1129 if err != nil { 1130 return 0, err 1131 } 1132 i -= size 1133 i = encodeVarintTx(dAtA, i, uint64(size)) 1134 } 1135 i-- 1136 dAtA[i] = 0x12 1137 } 1138 if m.PublicKey != nil { 1139 { 1140 size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) 1141 if err != nil { 1142 return 0, err 1143 } 1144 i -= size 1145 i = encodeVarintTx(dAtA, i, uint64(size)) 1146 } 1147 i-- 1148 dAtA[i] = 0xa 1149 } 1150 return len(dAtA) - i, nil 1151 } 1152 1153 func (m *ModeInfo) Marshal() (dAtA []byte, err error) { 1154 size := m.Size() 1155 dAtA = make([]byte, size) 1156 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1157 if err != nil { 1158 return nil, err 1159 } 1160 return dAtA[:n], nil 1161 } 1162 1163 func (m *ModeInfo) MarshalTo(dAtA []byte) (int, error) { 1164 size := m.Size() 1165 return m.MarshalToSizedBuffer(dAtA[:size]) 1166 } 1167 1168 func (m *ModeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1169 i := len(dAtA) 1170 _ = i 1171 var l int 1172 _ = l 1173 if m.Sum != nil { 1174 { 1175 size := m.Sum.Size() 1176 i -= size 1177 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 1178 return 0, err 1179 } 1180 } 1181 } 1182 return len(dAtA) - i, nil 1183 } 1184 1185 func (m *ModeInfo_Single_) MarshalTo(dAtA []byte) (int, error) { 1186 size := m.Size() 1187 return m.MarshalToSizedBuffer(dAtA[:size]) 1188 } 1189 1190 func (m *ModeInfo_Single_) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1191 i := len(dAtA) 1192 if m.Single != nil { 1193 { 1194 size, err := m.Single.MarshalToSizedBuffer(dAtA[:i]) 1195 if err != nil { 1196 return 0, err 1197 } 1198 i -= size 1199 i = encodeVarintTx(dAtA, i, uint64(size)) 1200 } 1201 i-- 1202 dAtA[i] = 0xa 1203 } 1204 return len(dAtA) - i, nil 1205 } 1206 func (m *ModeInfo_Multi_) MarshalTo(dAtA []byte) (int, error) { 1207 size := m.Size() 1208 return m.MarshalToSizedBuffer(dAtA[:size]) 1209 } 1210 1211 func (m *ModeInfo_Multi_) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1212 i := len(dAtA) 1213 if m.Multi != nil { 1214 { 1215 size, err := m.Multi.MarshalToSizedBuffer(dAtA[:i]) 1216 if err != nil { 1217 return 0, err 1218 } 1219 i -= size 1220 i = encodeVarintTx(dAtA, i, uint64(size)) 1221 } 1222 i-- 1223 dAtA[i] = 0x12 1224 } 1225 return len(dAtA) - i, nil 1226 } 1227 func (m *ModeInfo_Single) Marshal() (dAtA []byte, err error) { 1228 size := m.Size() 1229 dAtA = make([]byte, size) 1230 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1231 if err != nil { 1232 return nil, err 1233 } 1234 return dAtA[:n], nil 1235 } 1236 1237 func (m *ModeInfo_Single) MarshalTo(dAtA []byte) (int, error) { 1238 size := m.Size() 1239 return m.MarshalToSizedBuffer(dAtA[:size]) 1240 } 1241 1242 func (m *ModeInfo_Single) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1243 i := len(dAtA) 1244 _ = i 1245 var l int 1246 _ = l 1247 if m.Mode != 0 { 1248 i = encodeVarintTx(dAtA, i, uint64(m.Mode)) 1249 i-- 1250 dAtA[i] = 0x8 1251 } 1252 return len(dAtA) - i, nil 1253 } 1254 1255 func (m *ModeInfo_Multi) Marshal() (dAtA []byte, err error) { 1256 size := m.Size() 1257 dAtA = make([]byte, size) 1258 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1259 if err != nil { 1260 return nil, err 1261 } 1262 return dAtA[:n], nil 1263 } 1264 1265 func (m *ModeInfo_Multi) MarshalTo(dAtA []byte) (int, error) { 1266 size := m.Size() 1267 return m.MarshalToSizedBuffer(dAtA[:size]) 1268 } 1269 1270 func (m *ModeInfo_Multi) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1271 i := len(dAtA) 1272 _ = i 1273 var l int 1274 _ = l 1275 if len(m.ModeInfos) > 0 { 1276 for iNdEx := len(m.ModeInfos) - 1; iNdEx >= 0; iNdEx-- { 1277 { 1278 size, err := m.ModeInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1279 if err != nil { 1280 return 0, err 1281 } 1282 i -= size 1283 i = encodeVarintTx(dAtA, i, uint64(size)) 1284 } 1285 i-- 1286 dAtA[i] = 0x12 1287 } 1288 } 1289 if m.Bitarray != nil { 1290 { 1291 size, err := m.Bitarray.MarshalToSizedBuffer(dAtA[:i]) 1292 if err != nil { 1293 return 0, err 1294 } 1295 i -= size 1296 i = encodeVarintTx(dAtA, i, uint64(size)) 1297 } 1298 i-- 1299 dAtA[i] = 0xa 1300 } 1301 return len(dAtA) - i, nil 1302 } 1303 1304 func (m *Fee) Marshal() (dAtA []byte, err error) { 1305 size := m.Size() 1306 dAtA = make([]byte, size) 1307 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1308 if err != nil { 1309 return nil, err 1310 } 1311 return dAtA[:n], nil 1312 } 1313 1314 func (m *Fee) MarshalTo(dAtA []byte) (int, error) { 1315 size := m.Size() 1316 return m.MarshalToSizedBuffer(dAtA[:size]) 1317 } 1318 1319 func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1320 i := len(dAtA) 1321 _ = i 1322 var l int 1323 _ = l 1324 if len(m.Granter) > 0 { 1325 i -= len(m.Granter) 1326 copy(dAtA[i:], m.Granter) 1327 i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) 1328 i-- 1329 dAtA[i] = 0x22 1330 } 1331 if len(m.Payer) > 0 { 1332 i -= len(m.Payer) 1333 copy(dAtA[i:], m.Payer) 1334 i = encodeVarintTx(dAtA, i, uint64(len(m.Payer))) 1335 i-- 1336 dAtA[i] = 0x1a 1337 } 1338 if m.GasLimit != 0 { 1339 i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) 1340 i-- 1341 dAtA[i] = 0x10 1342 } 1343 if len(m.Amount) > 0 { 1344 for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { 1345 { 1346 size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1347 if err != nil { 1348 return 0, err 1349 } 1350 i -= size 1351 i = encodeVarintTx(dAtA, i, uint64(size)) 1352 } 1353 i-- 1354 dAtA[i] = 0xa 1355 } 1356 } 1357 return len(dAtA) - i, nil 1358 } 1359 1360 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 1361 offset -= sovTx(v) 1362 base := offset 1363 for v >= 1<<7 { 1364 dAtA[offset] = uint8(v&0x7f | 0x80) 1365 v >>= 7 1366 offset++ 1367 } 1368 dAtA[offset] = uint8(v) 1369 return base 1370 } 1371 func (m *Tx) Size() (n int) { 1372 if m == nil { 1373 return 0 1374 } 1375 var l int 1376 _ = l 1377 if m.Body != nil { 1378 l = m.Body.Size() 1379 n += 1 + l + sovTx(uint64(l)) 1380 } 1381 if m.AuthInfo != nil { 1382 l = m.AuthInfo.Size() 1383 n += 1 + l + sovTx(uint64(l)) 1384 } 1385 if len(m.Signatures) > 0 { 1386 for _, b := range m.Signatures { 1387 l = len(b) 1388 n += 1 + l + sovTx(uint64(l)) 1389 } 1390 } 1391 return n 1392 } 1393 1394 func (m *TxRaw) Size() (n int) { 1395 if m == nil { 1396 return 0 1397 } 1398 var l int 1399 _ = l 1400 l = len(m.BodyBytes) 1401 if l > 0 { 1402 n += 1 + l + sovTx(uint64(l)) 1403 } 1404 l = len(m.AuthInfoBytes) 1405 if l > 0 { 1406 n += 1 + l + sovTx(uint64(l)) 1407 } 1408 if len(m.Signatures) > 0 { 1409 for _, b := range m.Signatures { 1410 l = len(b) 1411 n += 1 + l + sovTx(uint64(l)) 1412 } 1413 } 1414 return n 1415 } 1416 1417 func (m *SignDoc) Size() (n int) { 1418 if m == nil { 1419 return 0 1420 } 1421 var l int 1422 _ = l 1423 l = len(m.BodyBytes) 1424 if l > 0 { 1425 n += 1 + l + sovTx(uint64(l)) 1426 } 1427 l = len(m.AuthInfoBytes) 1428 if l > 0 { 1429 n += 1 + l + sovTx(uint64(l)) 1430 } 1431 l = len(m.ChainId) 1432 if l > 0 { 1433 n += 1 + l + sovTx(uint64(l)) 1434 } 1435 if m.AccountNumber != 0 { 1436 n += 1 + sovTx(uint64(m.AccountNumber)) 1437 } 1438 return n 1439 } 1440 1441 func (m *TxBody) Size() (n int) { 1442 if m == nil { 1443 return 0 1444 } 1445 var l int 1446 _ = l 1447 if len(m.Messages) > 0 { 1448 for _, e := range m.Messages { 1449 l = e.Size() 1450 n += 1 + l + sovTx(uint64(l)) 1451 } 1452 } 1453 l = len(m.Memo) 1454 if l > 0 { 1455 n += 1 + l + sovTx(uint64(l)) 1456 } 1457 if m.TimeoutHeight != 0 { 1458 n += 1 + sovTx(uint64(m.TimeoutHeight)) 1459 } 1460 if len(m.ExtensionOptions) > 0 { 1461 for _, e := range m.ExtensionOptions { 1462 l = e.Size() 1463 n += 2 + l + sovTx(uint64(l)) 1464 } 1465 } 1466 if len(m.NonCriticalExtensionOptions) > 0 { 1467 for _, e := range m.NonCriticalExtensionOptions { 1468 l = e.Size() 1469 n += 2 + l + sovTx(uint64(l)) 1470 } 1471 } 1472 return n 1473 } 1474 1475 func (m *AuthInfo) Size() (n int) { 1476 if m == nil { 1477 return 0 1478 } 1479 var l int 1480 _ = l 1481 if len(m.SignerInfos) > 0 { 1482 for _, e := range m.SignerInfos { 1483 l = e.Size() 1484 n += 1 + l + sovTx(uint64(l)) 1485 } 1486 } 1487 if m.Fee != nil { 1488 l = m.Fee.Size() 1489 n += 1 + l + sovTx(uint64(l)) 1490 } 1491 return n 1492 } 1493 1494 func (m *SignerInfo) Size() (n int) { 1495 if m == nil { 1496 return 0 1497 } 1498 var l int 1499 _ = l 1500 if m.PublicKey != nil { 1501 l = m.PublicKey.Size() 1502 n += 1 + l + sovTx(uint64(l)) 1503 } 1504 if m.ModeInfo != nil { 1505 l = m.ModeInfo.Size() 1506 n += 1 + l + sovTx(uint64(l)) 1507 } 1508 if m.Sequence != 0 { 1509 n += 1 + sovTx(uint64(m.Sequence)) 1510 } 1511 return n 1512 } 1513 1514 func (m *ModeInfo) Size() (n int) { 1515 if m == nil { 1516 return 0 1517 } 1518 var l int 1519 _ = l 1520 if m.Sum != nil { 1521 n += m.Sum.Size() 1522 } 1523 return n 1524 } 1525 1526 func (m *ModeInfo_Single_) Size() (n int) { 1527 if m == nil { 1528 return 0 1529 } 1530 var l int 1531 _ = l 1532 if m.Single != nil { 1533 l = m.Single.Size() 1534 n += 1 + l + sovTx(uint64(l)) 1535 } 1536 return n 1537 } 1538 func (m *ModeInfo_Multi_) Size() (n int) { 1539 if m == nil { 1540 return 0 1541 } 1542 var l int 1543 _ = l 1544 if m.Multi != nil { 1545 l = m.Multi.Size() 1546 n += 1 + l + sovTx(uint64(l)) 1547 } 1548 return n 1549 } 1550 func (m *ModeInfo_Single) Size() (n int) { 1551 if m == nil { 1552 return 0 1553 } 1554 var l int 1555 _ = l 1556 if m.Mode != 0 { 1557 n += 1 + sovTx(uint64(m.Mode)) 1558 } 1559 return n 1560 } 1561 1562 func (m *ModeInfo_Multi) Size() (n int) { 1563 if m == nil { 1564 return 0 1565 } 1566 var l int 1567 _ = l 1568 if m.Bitarray != nil { 1569 l = m.Bitarray.Size() 1570 n += 1 + l + sovTx(uint64(l)) 1571 } 1572 if len(m.ModeInfos) > 0 { 1573 for _, e := range m.ModeInfos { 1574 l = e.Size() 1575 n += 1 + l + sovTx(uint64(l)) 1576 } 1577 } 1578 return n 1579 } 1580 1581 func (m *Fee) Size() (n int) { 1582 if m == nil { 1583 return 0 1584 } 1585 var l int 1586 _ = l 1587 if len(m.Amount) > 0 { 1588 for _, e := range m.Amount { 1589 l = e.Size() 1590 n += 1 + l + sovTx(uint64(l)) 1591 } 1592 } 1593 if m.GasLimit != 0 { 1594 n += 1 + sovTx(uint64(m.GasLimit)) 1595 } 1596 l = len(m.Payer) 1597 if l > 0 { 1598 n += 1 + l + sovTx(uint64(l)) 1599 } 1600 l = len(m.Granter) 1601 if l > 0 { 1602 n += 1 + l + sovTx(uint64(l)) 1603 } 1604 return n 1605 } 1606 1607 func sovTx(x uint64) (n int) { 1608 return (math_bits.Len64(x|1) + 6) / 7 1609 } 1610 func sozTx(x uint64) (n int) { 1611 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1612 } 1613 func (m *Tx) Unmarshal(dAtA []byte) error { 1614 l := len(dAtA) 1615 iNdEx := 0 1616 for iNdEx < l { 1617 preIndex := iNdEx 1618 var wire uint64 1619 for shift := uint(0); ; shift += 7 { 1620 if shift >= 64 { 1621 return ErrIntOverflowTx 1622 } 1623 if iNdEx >= l { 1624 return io.ErrUnexpectedEOF 1625 } 1626 b := dAtA[iNdEx] 1627 iNdEx++ 1628 wire |= uint64(b&0x7F) << shift 1629 if b < 0x80 { 1630 break 1631 } 1632 } 1633 fieldNum := int32(wire >> 3) 1634 wireType := int(wire & 0x7) 1635 if wireType == 4 { 1636 return fmt.Errorf("proto: Tx: wiretype end group for non-group") 1637 } 1638 if fieldNum <= 0 { 1639 return fmt.Errorf("proto: Tx: illegal tag %d (wire type %d)", fieldNum, wire) 1640 } 1641 switch fieldNum { 1642 case 1: 1643 if wireType != 2 { 1644 return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) 1645 } 1646 var msglen int 1647 for shift := uint(0); ; shift += 7 { 1648 if shift >= 64 { 1649 return ErrIntOverflowTx 1650 } 1651 if iNdEx >= l { 1652 return io.ErrUnexpectedEOF 1653 } 1654 b := dAtA[iNdEx] 1655 iNdEx++ 1656 msglen |= int(b&0x7F) << shift 1657 if b < 0x80 { 1658 break 1659 } 1660 } 1661 if msglen < 0 { 1662 return ErrInvalidLengthTx 1663 } 1664 postIndex := iNdEx + msglen 1665 if postIndex < 0 { 1666 return ErrInvalidLengthTx 1667 } 1668 if postIndex > l { 1669 return io.ErrUnexpectedEOF 1670 } 1671 if m.Body == nil { 1672 m.Body = &TxBody{} 1673 } 1674 if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1675 return err 1676 } 1677 iNdEx = postIndex 1678 case 2: 1679 if wireType != 2 { 1680 return fmt.Errorf("proto: wrong wireType = %d for field AuthInfo", wireType) 1681 } 1682 var msglen int 1683 for shift := uint(0); ; shift += 7 { 1684 if shift >= 64 { 1685 return ErrIntOverflowTx 1686 } 1687 if iNdEx >= l { 1688 return io.ErrUnexpectedEOF 1689 } 1690 b := dAtA[iNdEx] 1691 iNdEx++ 1692 msglen |= int(b&0x7F) << shift 1693 if b < 0x80 { 1694 break 1695 } 1696 } 1697 if msglen < 0 { 1698 return ErrInvalidLengthTx 1699 } 1700 postIndex := iNdEx + msglen 1701 if postIndex < 0 { 1702 return ErrInvalidLengthTx 1703 } 1704 if postIndex > l { 1705 return io.ErrUnexpectedEOF 1706 } 1707 if m.AuthInfo == nil { 1708 m.AuthInfo = &AuthInfo{} 1709 } 1710 if err := m.AuthInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1711 return err 1712 } 1713 iNdEx = postIndex 1714 case 3: 1715 if wireType != 2 { 1716 return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) 1717 } 1718 var byteLen int 1719 for shift := uint(0); ; shift += 7 { 1720 if shift >= 64 { 1721 return ErrIntOverflowTx 1722 } 1723 if iNdEx >= l { 1724 return io.ErrUnexpectedEOF 1725 } 1726 b := dAtA[iNdEx] 1727 iNdEx++ 1728 byteLen |= int(b&0x7F) << shift 1729 if b < 0x80 { 1730 break 1731 } 1732 } 1733 if byteLen < 0 { 1734 return ErrInvalidLengthTx 1735 } 1736 postIndex := iNdEx + byteLen 1737 if postIndex < 0 { 1738 return ErrInvalidLengthTx 1739 } 1740 if postIndex > l { 1741 return io.ErrUnexpectedEOF 1742 } 1743 m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) 1744 copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) 1745 iNdEx = postIndex 1746 default: 1747 iNdEx = preIndex 1748 skippy, err := skipTx(dAtA[iNdEx:]) 1749 if err != nil { 1750 return err 1751 } 1752 if (skippy < 0) || (iNdEx+skippy) < 0 { 1753 return ErrInvalidLengthTx 1754 } 1755 if (iNdEx + skippy) > l { 1756 return io.ErrUnexpectedEOF 1757 } 1758 iNdEx += skippy 1759 } 1760 } 1761 1762 if iNdEx > l { 1763 return io.ErrUnexpectedEOF 1764 } 1765 return nil 1766 } 1767 func (m *TxRaw) Unmarshal(dAtA []byte) error { 1768 l := len(dAtA) 1769 iNdEx := 0 1770 for iNdEx < l { 1771 preIndex := iNdEx 1772 var wire uint64 1773 for shift := uint(0); ; shift += 7 { 1774 if shift >= 64 { 1775 return ErrIntOverflowTx 1776 } 1777 if iNdEx >= l { 1778 return io.ErrUnexpectedEOF 1779 } 1780 b := dAtA[iNdEx] 1781 iNdEx++ 1782 wire |= uint64(b&0x7F) << shift 1783 if b < 0x80 { 1784 break 1785 } 1786 } 1787 fieldNum := int32(wire >> 3) 1788 wireType := int(wire & 0x7) 1789 if wireType == 4 { 1790 return fmt.Errorf("proto: TxRaw: wiretype end group for non-group") 1791 } 1792 if fieldNum <= 0 { 1793 return fmt.Errorf("proto: TxRaw: illegal tag %d (wire type %d)", fieldNum, wire) 1794 } 1795 switch fieldNum { 1796 case 1: 1797 if wireType != 2 { 1798 return fmt.Errorf("proto: wrong wireType = %d for field BodyBytes", wireType) 1799 } 1800 var byteLen int 1801 for shift := uint(0); ; shift += 7 { 1802 if shift >= 64 { 1803 return ErrIntOverflowTx 1804 } 1805 if iNdEx >= l { 1806 return io.ErrUnexpectedEOF 1807 } 1808 b := dAtA[iNdEx] 1809 iNdEx++ 1810 byteLen |= int(b&0x7F) << shift 1811 if b < 0x80 { 1812 break 1813 } 1814 } 1815 if byteLen < 0 { 1816 return ErrInvalidLengthTx 1817 } 1818 postIndex := iNdEx + byteLen 1819 if postIndex < 0 { 1820 return ErrInvalidLengthTx 1821 } 1822 if postIndex > l { 1823 return io.ErrUnexpectedEOF 1824 } 1825 m.BodyBytes = append(m.BodyBytes[:0], dAtA[iNdEx:postIndex]...) 1826 if m.BodyBytes == nil { 1827 m.BodyBytes = []byte{} 1828 } 1829 iNdEx = postIndex 1830 case 2: 1831 if wireType != 2 { 1832 return fmt.Errorf("proto: wrong wireType = %d for field AuthInfoBytes", wireType) 1833 } 1834 var byteLen int 1835 for shift := uint(0); ; shift += 7 { 1836 if shift >= 64 { 1837 return ErrIntOverflowTx 1838 } 1839 if iNdEx >= l { 1840 return io.ErrUnexpectedEOF 1841 } 1842 b := dAtA[iNdEx] 1843 iNdEx++ 1844 byteLen |= int(b&0x7F) << shift 1845 if b < 0x80 { 1846 break 1847 } 1848 } 1849 if byteLen < 0 { 1850 return ErrInvalidLengthTx 1851 } 1852 postIndex := iNdEx + byteLen 1853 if postIndex < 0 { 1854 return ErrInvalidLengthTx 1855 } 1856 if postIndex > l { 1857 return io.ErrUnexpectedEOF 1858 } 1859 m.AuthInfoBytes = append(m.AuthInfoBytes[:0], dAtA[iNdEx:postIndex]...) 1860 if m.AuthInfoBytes == nil { 1861 m.AuthInfoBytes = []byte{} 1862 } 1863 iNdEx = postIndex 1864 case 3: 1865 if wireType != 2 { 1866 return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) 1867 } 1868 var byteLen int 1869 for shift := uint(0); ; shift += 7 { 1870 if shift >= 64 { 1871 return ErrIntOverflowTx 1872 } 1873 if iNdEx >= l { 1874 return io.ErrUnexpectedEOF 1875 } 1876 b := dAtA[iNdEx] 1877 iNdEx++ 1878 byteLen |= int(b&0x7F) << shift 1879 if b < 0x80 { 1880 break 1881 } 1882 } 1883 if byteLen < 0 { 1884 return ErrInvalidLengthTx 1885 } 1886 postIndex := iNdEx + byteLen 1887 if postIndex < 0 { 1888 return ErrInvalidLengthTx 1889 } 1890 if postIndex > l { 1891 return io.ErrUnexpectedEOF 1892 } 1893 m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) 1894 copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) 1895 iNdEx = postIndex 1896 default: 1897 iNdEx = preIndex 1898 skippy, err := skipTx(dAtA[iNdEx:]) 1899 if err != nil { 1900 return err 1901 } 1902 if (skippy < 0) || (iNdEx+skippy) < 0 { 1903 return ErrInvalidLengthTx 1904 } 1905 if (iNdEx + skippy) > l { 1906 return io.ErrUnexpectedEOF 1907 } 1908 iNdEx += skippy 1909 } 1910 } 1911 1912 if iNdEx > l { 1913 return io.ErrUnexpectedEOF 1914 } 1915 return nil 1916 } 1917 func (m *SignDoc) Unmarshal(dAtA []byte) error { 1918 l := len(dAtA) 1919 iNdEx := 0 1920 for iNdEx < l { 1921 preIndex := iNdEx 1922 var wire uint64 1923 for shift := uint(0); ; shift += 7 { 1924 if shift >= 64 { 1925 return ErrIntOverflowTx 1926 } 1927 if iNdEx >= l { 1928 return io.ErrUnexpectedEOF 1929 } 1930 b := dAtA[iNdEx] 1931 iNdEx++ 1932 wire |= uint64(b&0x7F) << shift 1933 if b < 0x80 { 1934 break 1935 } 1936 } 1937 fieldNum := int32(wire >> 3) 1938 wireType := int(wire & 0x7) 1939 if wireType == 4 { 1940 return fmt.Errorf("proto: SignDoc: wiretype end group for non-group") 1941 } 1942 if fieldNum <= 0 { 1943 return fmt.Errorf("proto: SignDoc: illegal tag %d (wire type %d)", fieldNum, wire) 1944 } 1945 switch fieldNum { 1946 case 1: 1947 if wireType != 2 { 1948 return fmt.Errorf("proto: wrong wireType = %d for field BodyBytes", wireType) 1949 } 1950 var byteLen int 1951 for shift := uint(0); ; shift += 7 { 1952 if shift >= 64 { 1953 return ErrIntOverflowTx 1954 } 1955 if iNdEx >= l { 1956 return io.ErrUnexpectedEOF 1957 } 1958 b := dAtA[iNdEx] 1959 iNdEx++ 1960 byteLen |= int(b&0x7F) << shift 1961 if b < 0x80 { 1962 break 1963 } 1964 } 1965 if byteLen < 0 { 1966 return ErrInvalidLengthTx 1967 } 1968 postIndex := iNdEx + byteLen 1969 if postIndex < 0 { 1970 return ErrInvalidLengthTx 1971 } 1972 if postIndex > l { 1973 return io.ErrUnexpectedEOF 1974 } 1975 m.BodyBytes = append(m.BodyBytes[:0], dAtA[iNdEx:postIndex]...) 1976 if m.BodyBytes == nil { 1977 m.BodyBytes = []byte{} 1978 } 1979 iNdEx = postIndex 1980 case 2: 1981 if wireType != 2 { 1982 return fmt.Errorf("proto: wrong wireType = %d for field AuthInfoBytes", wireType) 1983 } 1984 var byteLen int 1985 for shift := uint(0); ; shift += 7 { 1986 if shift >= 64 { 1987 return ErrIntOverflowTx 1988 } 1989 if iNdEx >= l { 1990 return io.ErrUnexpectedEOF 1991 } 1992 b := dAtA[iNdEx] 1993 iNdEx++ 1994 byteLen |= int(b&0x7F) << shift 1995 if b < 0x80 { 1996 break 1997 } 1998 } 1999 if byteLen < 0 { 2000 return ErrInvalidLengthTx 2001 } 2002 postIndex := iNdEx + byteLen 2003 if postIndex < 0 { 2004 return ErrInvalidLengthTx 2005 } 2006 if postIndex > l { 2007 return io.ErrUnexpectedEOF 2008 } 2009 m.AuthInfoBytes = append(m.AuthInfoBytes[:0], dAtA[iNdEx:postIndex]...) 2010 if m.AuthInfoBytes == nil { 2011 m.AuthInfoBytes = []byte{} 2012 } 2013 iNdEx = postIndex 2014 case 3: 2015 if wireType != 2 { 2016 return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) 2017 } 2018 var stringLen uint64 2019 for shift := uint(0); ; shift += 7 { 2020 if shift >= 64 { 2021 return ErrIntOverflowTx 2022 } 2023 if iNdEx >= l { 2024 return io.ErrUnexpectedEOF 2025 } 2026 b := dAtA[iNdEx] 2027 iNdEx++ 2028 stringLen |= uint64(b&0x7F) << shift 2029 if b < 0x80 { 2030 break 2031 } 2032 } 2033 intStringLen := int(stringLen) 2034 if intStringLen < 0 { 2035 return ErrInvalidLengthTx 2036 } 2037 postIndex := iNdEx + intStringLen 2038 if postIndex < 0 { 2039 return ErrInvalidLengthTx 2040 } 2041 if postIndex > l { 2042 return io.ErrUnexpectedEOF 2043 } 2044 m.ChainId = string(dAtA[iNdEx:postIndex]) 2045 iNdEx = postIndex 2046 case 4: 2047 if wireType != 0 { 2048 return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) 2049 } 2050 m.AccountNumber = 0 2051 for shift := uint(0); ; shift += 7 { 2052 if shift >= 64 { 2053 return ErrIntOverflowTx 2054 } 2055 if iNdEx >= l { 2056 return io.ErrUnexpectedEOF 2057 } 2058 b := dAtA[iNdEx] 2059 iNdEx++ 2060 m.AccountNumber |= uint64(b&0x7F) << shift 2061 if b < 0x80 { 2062 break 2063 } 2064 } 2065 default: 2066 iNdEx = preIndex 2067 skippy, err := skipTx(dAtA[iNdEx:]) 2068 if err != nil { 2069 return err 2070 } 2071 if (skippy < 0) || (iNdEx+skippy) < 0 { 2072 return ErrInvalidLengthTx 2073 } 2074 if (iNdEx + skippy) > l { 2075 return io.ErrUnexpectedEOF 2076 } 2077 iNdEx += skippy 2078 } 2079 } 2080 2081 if iNdEx > l { 2082 return io.ErrUnexpectedEOF 2083 } 2084 return nil 2085 } 2086 func (m *TxBody) Unmarshal(dAtA []byte) error { 2087 l := len(dAtA) 2088 iNdEx := 0 2089 for iNdEx < l { 2090 preIndex := iNdEx 2091 var wire uint64 2092 for shift := uint(0); ; shift += 7 { 2093 if shift >= 64 { 2094 return ErrIntOverflowTx 2095 } 2096 if iNdEx >= l { 2097 return io.ErrUnexpectedEOF 2098 } 2099 b := dAtA[iNdEx] 2100 iNdEx++ 2101 wire |= uint64(b&0x7F) << shift 2102 if b < 0x80 { 2103 break 2104 } 2105 } 2106 fieldNum := int32(wire >> 3) 2107 wireType := int(wire & 0x7) 2108 if wireType == 4 { 2109 return fmt.Errorf("proto: TxBody: wiretype end group for non-group") 2110 } 2111 if fieldNum <= 0 { 2112 return fmt.Errorf("proto: TxBody: illegal tag %d (wire type %d)", fieldNum, wire) 2113 } 2114 switch fieldNum { 2115 case 1: 2116 if wireType != 2 { 2117 return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType) 2118 } 2119 var msglen int 2120 for shift := uint(0); ; shift += 7 { 2121 if shift >= 64 { 2122 return ErrIntOverflowTx 2123 } 2124 if iNdEx >= l { 2125 return io.ErrUnexpectedEOF 2126 } 2127 b := dAtA[iNdEx] 2128 iNdEx++ 2129 msglen |= int(b&0x7F) << shift 2130 if b < 0x80 { 2131 break 2132 } 2133 } 2134 if msglen < 0 { 2135 return ErrInvalidLengthTx 2136 } 2137 postIndex := iNdEx + msglen 2138 if postIndex < 0 { 2139 return ErrInvalidLengthTx 2140 } 2141 if postIndex > l { 2142 return io.ErrUnexpectedEOF 2143 } 2144 m.Messages = append(m.Messages, &types.Any{}) 2145 if err := m.Messages[len(m.Messages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2146 return err 2147 } 2148 iNdEx = postIndex 2149 case 2: 2150 if wireType != 2 { 2151 return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) 2152 } 2153 var stringLen uint64 2154 for shift := uint(0); ; shift += 7 { 2155 if shift >= 64 { 2156 return ErrIntOverflowTx 2157 } 2158 if iNdEx >= l { 2159 return io.ErrUnexpectedEOF 2160 } 2161 b := dAtA[iNdEx] 2162 iNdEx++ 2163 stringLen |= uint64(b&0x7F) << shift 2164 if b < 0x80 { 2165 break 2166 } 2167 } 2168 intStringLen := int(stringLen) 2169 if intStringLen < 0 { 2170 return ErrInvalidLengthTx 2171 } 2172 postIndex := iNdEx + intStringLen 2173 if postIndex < 0 { 2174 return ErrInvalidLengthTx 2175 } 2176 if postIndex > l { 2177 return io.ErrUnexpectedEOF 2178 } 2179 m.Memo = string(dAtA[iNdEx:postIndex]) 2180 iNdEx = postIndex 2181 case 3: 2182 if wireType != 0 { 2183 return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) 2184 } 2185 m.TimeoutHeight = 0 2186 for shift := uint(0); ; shift += 7 { 2187 if shift >= 64 { 2188 return ErrIntOverflowTx 2189 } 2190 if iNdEx >= l { 2191 return io.ErrUnexpectedEOF 2192 } 2193 b := dAtA[iNdEx] 2194 iNdEx++ 2195 m.TimeoutHeight |= uint64(b&0x7F) << shift 2196 if b < 0x80 { 2197 break 2198 } 2199 } 2200 case 1023: 2201 if wireType != 2 { 2202 return fmt.Errorf("proto: wrong wireType = %d for field ExtensionOptions", wireType) 2203 } 2204 var msglen int 2205 for shift := uint(0); ; shift += 7 { 2206 if shift >= 64 { 2207 return ErrIntOverflowTx 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 ErrInvalidLengthTx 2221 } 2222 postIndex := iNdEx + msglen 2223 if postIndex < 0 { 2224 return ErrInvalidLengthTx 2225 } 2226 if postIndex > l { 2227 return io.ErrUnexpectedEOF 2228 } 2229 m.ExtensionOptions = append(m.ExtensionOptions, &types.Any{}) 2230 if err := m.ExtensionOptions[len(m.ExtensionOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2231 return err 2232 } 2233 iNdEx = postIndex 2234 case 2047: 2235 if wireType != 2 { 2236 return fmt.Errorf("proto: wrong wireType = %d for field NonCriticalExtensionOptions", wireType) 2237 } 2238 var msglen int 2239 for shift := uint(0); ; shift += 7 { 2240 if shift >= 64 { 2241 return ErrIntOverflowTx 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 ErrInvalidLengthTx 2255 } 2256 postIndex := iNdEx + msglen 2257 if postIndex < 0 { 2258 return ErrInvalidLengthTx 2259 } 2260 if postIndex > l { 2261 return io.ErrUnexpectedEOF 2262 } 2263 m.NonCriticalExtensionOptions = append(m.NonCriticalExtensionOptions, &types.Any{}) 2264 if err := m.NonCriticalExtensionOptions[len(m.NonCriticalExtensionOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2265 return err 2266 } 2267 iNdEx = postIndex 2268 default: 2269 iNdEx = preIndex 2270 skippy, err := skipTx(dAtA[iNdEx:]) 2271 if err != nil { 2272 return err 2273 } 2274 if (skippy < 0) || (iNdEx+skippy) < 0 { 2275 return ErrInvalidLengthTx 2276 } 2277 if (iNdEx + skippy) > l { 2278 return io.ErrUnexpectedEOF 2279 } 2280 iNdEx += skippy 2281 } 2282 } 2283 2284 if iNdEx > l { 2285 return io.ErrUnexpectedEOF 2286 } 2287 return nil 2288 } 2289 func (m *AuthInfo) Unmarshal(dAtA []byte) error { 2290 l := len(dAtA) 2291 iNdEx := 0 2292 for iNdEx < l { 2293 preIndex := iNdEx 2294 var wire uint64 2295 for shift := uint(0); ; shift += 7 { 2296 if shift >= 64 { 2297 return ErrIntOverflowTx 2298 } 2299 if iNdEx >= l { 2300 return io.ErrUnexpectedEOF 2301 } 2302 b := dAtA[iNdEx] 2303 iNdEx++ 2304 wire |= uint64(b&0x7F) << shift 2305 if b < 0x80 { 2306 break 2307 } 2308 } 2309 fieldNum := int32(wire >> 3) 2310 wireType := int(wire & 0x7) 2311 if wireType == 4 { 2312 return fmt.Errorf("proto: AuthInfo: wiretype end group for non-group") 2313 } 2314 if fieldNum <= 0 { 2315 return fmt.Errorf("proto: AuthInfo: illegal tag %d (wire type %d)", fieldNum, wire) 2316 } 2317 switch fieldNum { 2318 case 1: 2319 if wireType != 2 { 2320 return fmt.Errorf("proto: wrong wireType = %d for field SignerInfos", wireType) 2321 } 2322 var msglen int 2323 for shift := uint(0); ; shift += 7 { 2324 if shift >= 64 { 2325 return ErrIntOverflowTx 2326 } 2327 if iNdEx >= l { 2328 return io.ErrUnexpectedEOF 2329 } 2330 b := dAtA[iNdEx] 2331 iNdEx++ 2332 msglen |= int(b&0x7F) << shift 2333 if b < 0x80 { 2334 break 2335 } 2336 } 2337 if msglen < 0 { 2338 return ErrInvalidLengthTx 2339 } 2340 postIndex := iNdEx + msglen 2341 if postIndex < 0 { 2342 return ErrInvalidLengthTx 2343 } 2344 if postIndex > l { 2345 return io.ErrUnexpectedEOF 2346 } 2347 m.SignerInfos = append(m.SignerInfos, &SignerInfo{}) 2348 if err := m.SignerInfos[len(m.SignerInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2349 return err 2350 } 2351 iNdEx = postIndex 2352 case 2: 2353 if wireType != 2 { 2354 return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) 2355 } 2356 var msglen int 2357 for shift := uint(0); ; shift += 7 { 2358 if shift >= 64 { 2359 return ErrIntOverflowTx 2360 } 2361 if iNdEx >= l { 2362 return io.ErrUnexpectedEOF 2363 } 2364 b := dAtA[iNdEx] 2365 iNdEx++ 2366 msglen |= int(b&0x7F) << shift 2367 if b < 0x80 { 2368 break 2369 } 2370 } 2371 if msglen < 0 { 2372 return ErrInvalidLengthTx 2373 } 2374 postIndex := iNdEx + msglen 2375 if postIndex < 0 { 2376 return ErrInvalidLengthTx 2377 } 2378 if postIndex > l { 2379 return io.ErrUnexpectedEOF 2380 } 2381 if m.Fee == nil { 2382 m.Fee = &Fee{} 2383 } 2384 if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2385 return err 2386 } 2387 iNdEx = postIndex 2388 default: 2389 iNdEx = preIndex 2390 skippy, err := skipTx(dAtA[iNdEx:]) 2391 if err != nil { 2392 return err 2393 } 2394 if (skippy < 0) || (iNdEx+skippy) < 0 { 2395 return ErrInvalidLengthTx 2396 } 2397 if (iNdEx + skippy) > l { 2398 return io.ErrUnexpectedEOF 2399 } 2400 iNdEx += skippy 2401 } 2402 } 2403 2404 if iNdEx > l { 2405 return io.ErrUnexpectedEOF 2406 } 2407 return nil 2408 } 2409 func (m *SignerInfo) Unmarshal(dAtA []byte) error { 2410 l := len(dAtA) 2411 iNdEx := 0 2412 for iNdEx < l { 2413 preIndex := iNdEx 2414 var wire uint64 2415 for shift := uint(0); ; shift += 7 { 2416 if shift >= 64 { 2417 return ErrIntOverflowTx 2418 } 2419 if iNdEx >= l { 2420 return io.ErrUnexpectedEOF 2421 } 2422 b := dAtA[iNdEx] 2423 iNdEx++ 2424 wire |= uint64(b&0x7F) << shift 2425 if b < 0x80 { 2426 break 2427 } 2428 } 2429 fieldNum := int32(wire >> 3) 2430 wireType := int(wire & 0x7) 2431 if wireType == 4 { 2432 return fmt.Errorf("proto: SignerInfo: wiretype end group for non-group") 2433 } 2434 if fieldNum <= 0 { 2435 return fmt.Errorf("proto: SignerInfo: illegal tag %d (wire type %d)", fieldNum, wire) 2436 } 2437 switch fieldNum { 2438 case 1: 2439 if wireType != 2 { 2440 return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) 2441 } 2442 var msglen int 2443 for shift := uint(0); ; shift += 7 { 2444 if shift >= 64 { 2445 return ErrIntOverflowTx 2446 } 2447 if iNdEx >= l { 2448 return io.ErrUnexpectedEOF 2449 } 2450 b := dAtA[iNdEx] 2451 iNdEx++ 2452 msglen |= int(b&0x7F) << shift 2453 if b < 0x80 { 2454 break 2455 } 2456 } 2457 if msglen < 0 { 2458 return ErrInvalidLengthTx 2459 } 2460 postIndex := iNdEx + msglen 2461 if postIndex < 0 { 2462 return ErrInvalidLengthTx 2463 } 2464 if postIndex > l { 2465 return io.ErrUnexpectedEOF 2466 } 2467 if m.PublicKey == nil { 2468 m.PublicKey = &types.Any{} 2469 } 2470 if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2471 return err 2472 } 2473 iNdEx = postIndex 2474 case 2: 2475 if wireType != 2 { 2476 return fmt.Errorf("proto: wrong wireType = %d for field ModeInfo", wireType) 2477 } 2478 var msglen int 2479 for shift := uint(0); ; shift += 7 { 2480 if shift >= 64 { 2481 return ErrIntOverflowTx 2482 } 2483 if iNdEx >= l { 2484 return io.ErrUnexpectedEOF 2485 } 2486 b := dAtA[iNdEx] 2487 iNdEx++ 2488 msglen |= int(b&0x7F) << shift 2489 if b < 0x80 { 2490 break 2491 } 2492 } 2493 if msglen < 0 { 2494 return ErrInvalidLengthTx 2495 } 2496 postIndex := iNdEx + msglen 2497 if postIndex < 0 { 2498 return ErrInvalidLengthTx 2499 } 2500 if postIndex > l { 2501 return io.ErrUnexpectedEOF 2502 } 2503 if m.ModeInfo == nil { 2504 m.ModeInfo = &ModeInfo{} 2505 } 2506 if err := m.ModeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2507 return err 2508 } 2509 iNdEx = postIndex 2510 case 3: 2511 if wireType != 0 { 2512 return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) 2513 } 2514 m.Sequence = 0 2515 for shift := uint(0); ; shift += 7 { 2516 if shift >= 64 { 2517 return ErrIntOverflowTx 2518 } 2519 if iNdEx >= l { 2520 return io.ErrUnexpectedEOF 2521 } 2522 b := dAtA[iNdEx] 2523 iNdEx++ 2524 m.Sequence |= uint64(b&0x7F) << shift 2525 if b < 0x80 { 2526 break 2527 } 2528 } 2529 default: 2530 iNdEx = preIndex 2531 skippy, err := skipTx(dAtA[iNdEx:]) 2532 if err != nil { 2533 return err 2534 } 2535 if (skippy < 0) || (iNdEx+skippy) < 0 { 2536 return ErrInvalidLengthTx 2537 } 2538 if (iNdEx + skippy) > l { 2539 return io.ErrUnexpectedEOF 2540 } 2541 iNdEx += skippy 2542 } 2543 } 2544 2545 if iNdEx > l { 2546 return io.ErrUnexpectedEOF 2547 } 2548 return nil 2549 } 2550 func (m *ModeInfo) Unmarshal(dAtA []byte) error { 2551 l := len(dAtA) 2552 iNdEx := 0 2553 for iNdEx < l { 2554 preIndex := iNdEx 2555 var wire uint64 2556 for shift := uint(0); ; shift += 7 { 2557 if shift >= 64 { 2558 return ErrIntOverflowTx 2559 } 2560 if iNdEx >= l { 2561 return io.ErrUnexpectedEOF 2562 } 2563 b := dAtA[iNdEx] 2564 iNdEx++ 2565 wire |= uint64(b&0x7F) << shift 2566 if b < 0x80 { 2567 break 2568 } 2569 } 2570 fieldNum := int32(wire >> 3) 2571 wireType := int(wire & 0x7) 2572 if wireType == 4 { 2573 return fmt.Errorf("proto: ModeInfo: wiretype end group for non-group") 2574 } 2575 if fieldNum <= 0 { 2576 return fmt.Errorf("proto: ModeInfo: illegal tag %d (wire type %d)", fieldNum, wire) 2577 } 2578 switch fieldNum { 2579 case 1: 2580 if wireType != 2 { 2581 return fmt.Errorf("proto: wrong wireType = %d for field Single", wireType) 2582 } 2583 var msglen int 2584 for shift := uint(0); ; shift += 7 { 2585 if shift >= 64 { 2586 return ErrIntOverflowTx 2587 } 2588 if iNdEx >= l { 2589 return io.ErrUnexpectedEOF 2590 } 2591 b := dAtA[iNdEx] 2592 iNdEx++ 2593 msglen |= int(b&0x7F) << shift 2594 if b < 0x80 { 2595 break 2596 } 2597 } 2598 if msglen < 0 { 2599 return ErrInvalidLengthTx 2600 } 2601 postIndex := iNdEx + msglen 2602 if postIndex < 0 { 2603 return ErrInvalidLengthTx 2604 } 2605 if postIndex > l { 2606 return io.ErrUnexpectedEOF 2607 } 2608 v := &ModeInfo_Single{} 2609 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2610 return err 2611 } 2612 m.Sum = &ModeInfo_Single_{v} 2613 iNdEx = postIndex 2614 case 2: 2615 if wireType != 2 { 2616 return fmt.Errorf("proto: wrong wireType = %d for field Multi", wireType) 2617 } 2618 var msglen int 2619 for shift := uint(0); ; shift += 7 { 2620 if shift >= 64 { 2621 return ErrIntOverflowTx 2622 } 2623 if iNdEx >= l { 2624 return io.ErrUnexpectedEOF 2625 } 2626 b := dAtA[iNdEx] 2627 iNdEx++ 2628 msglen |= int(b&0x7F) << shift 2629 if b < 0x80 { 2630 break 2631 } 2632 } 2633 if msglen < 0 { 2634 return ErrInvalidLengthTx 2635 } 2636 postIndex := iNdEx + msglen 2637 if postIndex < 0 { 2638 return ErrInvalidLengthTx 2639 } 2640 if postIndex > l { 2641 return io.ErrUnexpectedEOF 2642 } 2643 v := &ModeInfo_Multi{} 2644 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2645 return err 2646 } 2647 m.Sum = &ModeInfo_Multi_{v} 2648 iNdEx = postIndex 2649 default: 2650 iNdEx = preIndex 2651 skippy, err := skipTx(dAtA[iNdEx:]) 2652 if err != nil { 2653 return err 2654 } 2655 if (skippy < 0) || (iNdEx+skippy) < 0 { 2656 return ErrInvalidLengthTx 2657 } 2658 if (iNdEx + skippy) > l { 2659 return io.ErrUnexpectedEOF 2660 } 2661 iNdEx += skippy 2662 } 2663 } 2664 2665 if iNdEx > l { 2666 return io.ErrUnexpectedEOF 2667 } 2668 return nil 2669 } 2670 func (m *ModeInfo_Single) Unmarshal(dAtA []byte) error { 2671 l := len(dAtA) 2672 iNdEx := 0 2673 for iNdEx < l { 2674 preIndex := iNdEx 2675 var wire uint64 2676 for shift := uint(0); ; shift += 7 { 2677 if shift >= 64 { 2678 return ErrIntOverflowTx 2679 } 2680 if iNdEx >= l { 2681 return io.ErrUnexpectedEOF 2682 } 2683 b := dAtA[iNdEx] 2684 iNdEx++ 2685 wire |= uint64(b&0x7F) << shift 2686 if b < 0x80 { 2687 break 2688 } 2689 } 2690 fieldNum := int32(wire >> 3) 2691 wireType := int(wire & 0x7) 2692 if wireType == 4 { 2693 return fmt.Errorf("proto: Single: wiretype end group for non-group") 2694 } 2695 if fieldNum <= 0 { 2696 return fmt.Errorf("proto: Single: illegal tag %d (wire type %d)", fieldNum, wire) 2697 } 2698 switch fieldNum { 2699 case 1: 2700 if wireType != 0 { 2701 return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) 2702 } 2703 m.Mode = 0 2704 for shift := uint(0); ; shift += 7 { 2705 if shift >= 64 { 2706 return ErrIntOverflowTx 2707 } 2708 if iNdEx >= l { 2709 return io.ErrUnexpectedEOF 2710 } 2711 b := dAtA[iNdEx] 2712 iNdEx++ 2713 m.Mode |= signing.SignMode(b&0x7F) << shift 2714 if b < 0x80 { 2715 break 2716 } 2717 } 2718 default: 2719 iNdEx = preIndex 2720 skippy, err := skipTx(dAtA[iNdEx:]) 2721 if err != nil { 2722 return err 2723 } 2724 if (skippy < 0) || (iNdEx+skippy) < 0 { 2725 return ErrInvalidLengthTx 2726 } 2727 if (iNdEx + skippy) > l { 2728 return io.ErrUnexpectedEOF 2729 } 2730 iNdEx += skippy 2731 } 2732 } 2733 2734 if iNdEx > l { 2735 return io.ErrUnexpectedEOF 2736 } 2737 return nil 2738 } 2739 func (m *ModeInfo_Multi) Unmarshal(dAtA []byte) error { 2740 l := len(dAtA) 2741 iNdEx := 0 2742 for iNdEx < l { 2743 preIndex := iNdEx 2744 var wire uint64 2745 for shift := uint(0); ; shift += 7 { 2746 if shift >= 64 { 2747 return ErrIntOverflowTx 2748 } 2749 if iNdEx >= l { 2750 return io.ErrUnexpectedEOF 2751 } 2752 b := dAtA[iNdEx] 2753 iNdEx++ 2754 wire |= uint64(b&0x7F) << shift 2755 if b < 0x80 { 2756 break 2757 } 2758 } 2759 fieldNum := int32(wire >> 3) 2760 wireType := int(wire & 0x7) 2761 if wireType == 4 { 2762 return fmt.Errorf("proto: Multi: wiretype end group for non-group") 2763 } 2764 if fieldNum <= 0 { 2765 return fmt.Errorf("proto: Multi: illegal tag %d (wire type %d)", fieldNum, wire) 2766 } 2767 switch fieldNum { 2768 case 1: 2769 if wireType != 2 { 2770 return fmt.Errorf("proto: wrong wireType = %d for field Bitarray", wireType) 2771 } 2772 var msglen int 2773 for shift := uint(0); ; shift += 7 { 2774 if shift >= 64 { 2775 return ErrIntOverflowTx 2776 } 2777 if iNdEx >= l { 2778 return io.ErrUnexpectedEOF 2779 } 2780 b := dAtA[iNdEx] 2781 iNdEx++ 2782 msglen |= int(b&0x7F) << shift 2783 if b < 0x80 { 2784 break 2785 } 2786 } 2787 if msglen < 0 { 2788 return ErrInvalidLengthTx 2789 } 2790 postIndex := iNdEx + msglen 2791 if postIndex < 0 { 2792 return ErrInvalidLengthTx 2793 } 2794 if postIndex > l { 2795 return io.ErrUnexpectedEOF 2796 } 2797 if m.Bitarray == nil { 2798 m.Bitarray = &types1.CompactBitArray{} 2799 } 2800 if err := m.Bitarray.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2801 return err 2802 } 2803 iNdEx = postIndex 2804 case 2: 2805 if wireType != 2 { 2806 return fmt.Errorf("proto: wrong wireType = %d for field ModeInfos", wireType) 2807 } 2808 var msglen int 2809 for shift := uint(0); ; shift += 7 { 2810 if shift >= 64 { 2811 return ErrIntOverflowTx 2812 } 2813 if iNdEx >= l { 2814 return io.ErrUnexpectedEOF 2815 } 2816 b := dAtA[iNdEx] 2817 iNdEx++ 2818 msglen |= int(b&0x7F) << shift 2819 if b < 0x80 { 2820 break 2821 } 2822 } 2823 if msglen < 0 { 2824 return ErrInvalidLengthTx 2825 } 2826 postIndex := iNdEx + msglen 2827 if postIndex < 0 { 2828 return ErrInvalidLengthTx 2829 } 2830 if postIndex > l { 2831 return io.ErrUnexpectedEOF 2832 } 2833 m.ModeInfos = append(m.ModeInfos, &ModeInfo{}) 2834 if err := m.ModeInfos[len(m.ModeInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2835 return err 2836 } 2837 iNdEx = postIndex 2838 default: 2839 iNdEx = preIndex 2840 skippy, err := skipTx(dAtA[iNdEx:]) 2841 if err != nil { 2842 return err 2843 } 2844 if (skippy < 0) || (iNdEx+skippy) < 0 { 2845 return ErrInvalidLengthTx 2846 } 2847 if (iNdEx + skippy) > l { 2848 return io.ErrUnexpectedEOF 2849 } 2850 iNdEx += skippy 2851 } 2852 } 2853 2854 if iNdEx > l { 2855 return io.ErrUnexpectedEOF 2856 } 2857 return nil 2858 } 2859 func (m *Fee) Unmarshal(dAtA []byte) error { 2860 l := len(dAtA) 2861 iNdEx := 0 2862 for iNdEx < l { 2863 preIndex := iNdEx 2864 var wire uint64 2865 for shift := uint(0); ; shift += 7 { 2866 if shift >= 64 { 2867 return ErrIntOverflowTx 2868 } 2869 if iNdEx >= l { 2870 return io.ErrUnexpectedEOF 2871 } 2872 b := dAtA[iNdEx] 2873 iNdEx++ 2874 wire |= uint64(b&0x7F) << shift 2875 if b < 0x80 { 2876 break 2877 } 2878 } 2879 fieldNum := int32(wire >> 3) 2880 wireType := int(wire & 0x7) 2881 if wireType == 4 { 2882 return fmt.Errorf("proto: Fee: wiretype end group for non-group") 2883 } 2884 if fieldNum <= 0 { 2885 return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) 2886 } 2887 switch fieldNum { 2888 case 1: 2889 if wireType != 2 { 2890 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2891 } 2892 var msglen int 2893 for shift := uint(0); ; shift += 7 { 2894 if shift >= 64 { 2895 return ErrIntOverflowTx 2896 } 2897 if iNdEx >= l { 2898 return io.ErrUnexpectedEOF 2899 } 2900 b := dAtA[iNdEx] 2901 iNdEx++ 2902 msglen |= int(b&0x7F) << shift 2903 if b < 0x80 { 2904 break 2905 } 2906 } 2907 if msglen < 0 { 2908 return ErrInvalidLengthTx 2909 } 2910 postIndex := iNdEx + msglen 2911 if postIndex < 0 { 2912 return ErrInvalidLengthTx 2913 } 2914 if postIndex > l { 2915 return io.ErrUnexpectedEOF 2916 } 2917 m.Amount = append(m.Amount, types2.CoinAdapter{}) 2918 if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2919 return err 2920 } 2921 iNdEx = postIndex 2922 case 2: 2923 if wireType != 0 { 2924 return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) 2925 } 2926 m.GasLimit = 0 2927 for shift := uint(0); ; shift += 7 { 2928 if shift >= 64 { 2929 return ErrIntOverflowTx 2930 } 2931 if iNdEx >= l { 2932 return io.ErrUnexpectedEOF 2933 } 2934 b := dAtA[iNdEx] 2935 iNdEx++ 2936 m.GasLimit |= uint64(b&0x7F) << shift 2937 if b < 0x80 { 2938 break 2939 } 2940 } 2941 case 3: 2942 if wireType != 2 { 2943 return fmt.Errorf("proto: wrong wireType = %d for field Payer", wireType) 2944 } 2945 var stringLen uint64 2946 for shift := uint(0); ; shift += 7 { 2947 if shift >= 64 { 2948 return ErrIntOverflowTx 2949 } 2950 if iNdEx >= l { 2951 return io.ErrUnexpectedEOF 2952 } 2953 b := dAtA[iNdEx] 2954 iNdEx++ 2955 stringLen |= uint64(b&0x7F) << shift 2956 if b < 0x80 { 2957 break 2958 } 2959 } 2960 intStringLen := int(stringLen) 2961 if intStringLen < 0 { 2962 return ErrInvalidLengthTx 2963 } 2964 postIndex := iNdEx + intStringLen 2965 if postIndex < 0 { 2966 return ErrInvalidLengthTx 2967 } 2968 if postIndex > l { 2969 return io.ErrUnexpectedEOF 2970 } 2971 m.Payer = string(dAtA[iNdEx:postIndex]) 2972 iNdEx = postIndex 2973 case 4: 2974 if wireType != 2 { 2975 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 2976 } 2977 var stringLen uint64 2978 for shift := uint(0); ; shift += 7 { 2979 if shift >= 64 { 2980 return ErrIntOverflowTx 2981 } 2982 if iNdEx >= l { 2983 return io.ErrUnexpectedEOF 2984 } 2985 b := dAtA[iNdEx] 2986 iNdEx++ 2987 stringLen |= uint64(b&0x7F) << shift 2988 if b < 0x80 { 2989 break 2990 } 2991 } 2992 intStringLen := int(stringLen) 2993 if intStringLen < 0 { 2994 return ErrInvalidLengthTx 2995 } 2996 postIndex := iNdEx + intStringLen 2997 if postIndex < 0 { 2998 return ErrInvalidLengthTx 2999 } 3000 if postIndex > l { 3001 return io.ErrUnexpectedEOF 3002 } 3003 m.Granter = string(dAtA[iNdEx:postIndex]) 3004 iNdEx = postIndex 3005 default: 3006 iNdEx = preIndex 3007 skippy, err := skipTx(dAtA[iNdEx:]) 3008 if err != nil { 3009 return err 3010 } 3011 if (skippy < 0) || (iNdEx+skippy) < 0 { 3012 return ErrInvalidLengthTx 3013 } 3014 if (iNdEx + skippy) > l { 3015 return io.ErrUnexpectedEOF 3016 } 3017 iNdEx += skippy 3018 } 3019 } 3020 3021 if iNdEx > l { 3022 return io.ErrUnexpectedEOF 3023 } 3024 return nil 3025 } 3026 func skipTx(dAtA []byte) (n int, err error) { 3027 l := len(dAtA) 3028 iNdEx := 0 3029 depth := 0 3030 for iNdEx < l { 3031 var wire uint64 3032 for shift := uint(0); ; shift += 7 { 3033 if shift >= 64 { 3034 return 0, ErrIntOverflowTx 3035 } 3036 if iNdEx >= l { 3037 return 0, io.ErrUnexpectedEOF 3038 } 3039 b := dAtA[iNdEx] 3040 iNdEx++ 3041 wire |= (uint64(b) & 0x7F) << shift 3042 if b < 0x80 { 3043 break 3044 } 3045 } 3046 wireType := int(wire & 0x7) 3047 switch wireType { 3048 case 0: 3049 for shift := uint(0); ; shift += 7 { 3050 if shift >= 64 { 3051 return 0, ErrIntOverflowTx 3052 } 3053 if iNdEx >= l { 3054 return 0, io.ErrUnexpectedEOF 3055 } 3056 iNdEx++ 3057 if dAtA[iNdEx-1] < 0x80 { 3058 break 3059 } 3060 } 3061 case 1: 3062 iNdEx += 8 3063 case 2: 3064 var length int 3065 for shift := uint(0); ; shift += 7 { 3066 if shift >= 64 { 3067 return 0, ErrIntOverflowTx 3068 } 3069 if iNdEx >= l { 3070 return 0, io.ErrUnexpectedEOF 3071 } 3072 b := dAtA[iNdEx] 3073 iNdEx++ 3074 length |= (int(b) & 0x7F) << shift 3075 if b < 0x80 { 3076 break 3077 } 3078 } 3079 if length < 0 { 3080 return 0, ErrInvalidLengthTx 3081 } 3082 iNdEx += length 3083 case 3: 3084 depth++ 3085 case 4: 3086 if depth == 0 { 3087 return 0, ErrUnexpectedEndOfGroupTx 3088 } 3089 depth-- 3090 case 5: 3091 iNdEx += 4 3092 default: 3093 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3094 } 3095 if iNdEx < 0 { 3096 return 0, ErrInvalidLengthTx 3097 } 3098 if depth == 0 { 3099 return iNdEx, nil 3100 } 3101 } 3102 return 0, io.ErrUnexpectedEOF 3103 } 3104 3105 var ( 3106 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 3107 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 3108 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 3109 )