github.com/Finschia/finschia-sdk@v0.48.1/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/Finschia/finschia-sdk/codec/types"
     9  	types1 "github.com/Finschia/finschia-sdk/crypto/types"
    10  	github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types"
    11  	types2 "github.com/Finschia/finschia-sdk/types"
    12  	signing "github.com/Finschia/finschia-sdk/types/tx/signing"
    13  	_ "github.com/gogo/protobuf/gogoproto"
    14  	proto "github.com/gogo/protobuf/proto"
    15  	io "io"
    16  	math "math"
    17  	math_bits "math/bits"
    18  )
    19  
    20  // Reference imports to suppress errors if they are not otherwise used.
    21  var _ = proto.Marshal
    22  var _ = fmt.Errorf
    23  var _ = math.Inf
    24  
    25  // This is a compile-time assertion to ensure that this generated file
    26  // is compatible with the proto package it is being compiled against.
    27  // A compilation error at this line likely means your copy of the
    28  // proto package needs to be updated.
    29  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    30  
    31  // Tx is the standard type used for broadcasting transactions.
    32  type Tx struct {
    33  	// body is the processable content of the transaction
    34  	Body *TxBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
    35  	// auth_info is the authorization related content of the transaction,
    36  	// specifically signers, signer modes and fee
    37  	AuthInfo *AuthInfo `protobuf:"bytes,2,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"`
    38  	// signatures is a list of signatures that matches the length and order of
    39  	// AuthInfo's signer_infos to allow connecting signature meta information like
    40  	// public key and signing mode by position.
    41  	Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"`
    42  }
    43  
    44  func (m *Tx) Reset()         { *m = Tx{} }
    45  func (m *Tx) String() string { return proto.CompactTextString(m) }
    46  func (*Tx) ProtoMessage()    {}
    47  func (*Tx) Descriptor() ([]byte, []int) {
    48  	return fileDescriptor_96d1575ffde80842, []int{0}
    49  }
    50  func (m *Tx) XXX_Unmarshal(b []byte) error {
    51  	return m.Unmarshal(b)
    52  }
    53  func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    54  	if deterministic {
    55  		return xxx_messageInfo_Tx.Marshal(b, m, deterministic)
    56  	} else {
    57  		b = b[:cap(b)]
    58  		n, err := m.MarshalToSizedBuffer(b)
    59  		if err != nil {
    60  			return nil, err
    61  		}
    62  		return b[:n], nil
    63  	}
    64  }
    65  func (m *Tx) XXX_Merge(src proto.Message) {
    66  	xxx_messageInfo_Tx.Merge(m, src)
    67  }
    68  func (m *Tx) XXX_Size() int {
    69  	return m.Size()
    70  }
    71  func (m *Tx) XXX_DiscardUnknown() {
    72  	xxx_messageInfo_Tx.DiscardUnknown(m)
    73  }
    74  
    75  var xxx_messageInfo_Tx proto.InternalMessageInfo
    76  
    77  func (m *Tx) GetBody() *TxBody {
    78  	if m != nil {
    79  		return m.Body
    80  	}
    81  	return nil
    82  }
    83  
    84  func (m *Tx) GetAuthInfo() *AuthInfo {
    85  	if m != nil {
    86  		return m.AuthInfo
    87  	}
    88  	return nil
    89  }
    90  
    91  func (m *Tx) GetSignatures() [][]byte {
    92  	if m != nil {
    93  		return m.Signatures
    94  	}
    95  	return nil
    96  }
    97  
    98  // TxRaw is a variant of Tx that pins the signer's exact binary representation
    99  // of body and auth_info. This is used for signing, broadcasting and
   100  // verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and
   101  // the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used
   102  // as the transaction ID.
   103  type TxRaw struct {
   104  	// body_bytes is a protobuf serialization of a TxBody that matches the
   105  	// representation in SignDoc.
   106  	BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"`
   107  	// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
   108  	// representation in SignDoc.
   109  	AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"`
   110  	// signatures is a list of signatures that matches the length and order of
   111  	// AuthInfo's signer_infos to allow connecting signature meta information like
   112  	// public key and signing mode by position.
   113  	Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"`
   114  }
   115  
   116  func (m *TxRaw) Reset()         { *m = TxRaw{} }
   117  func (m *TxRaw) String() string { return proto.CompactTextString(m) }
   118  func (*TxRaw) ProtoMessage()    {}
   119  func (*TxRaw) Descriptor() ([]byte, []int) {
   120  	return fileDescriptor_96d1575ffde80842, []int{1}
   121  }
   122  func (m *TxRaw) XXX_Unmarshal(b []byte) error {
   123  	return m.Unmarshal(b)
   124  }
   125  func (m *TxRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   126  	if deterministic {
   127  		return xxx_messageInfo_TxRaw.Marshal(b, m, deterministic)
   128  	} else {
   129  		b = b[:cap(b)]
   130  		n, err := m.MarshalToSizedBuffer(b)
   131  		if err != nil {
   132  			return nil, err
   133  		}
   134  		return b[:n], nil
   135  	}
   136  }
   137  func (m *TxRaw) XXX_Merge(src proto.Message) {
   138  	xxx_messageInfo_TxRaw.Merge(m, src)
   139  }
   140  func (m *TxRaw) XXX_Size() int {
   141  	return m.Size()
   142  }
   143  func (m *TxRaw) XXX_DiscardUnknown() {
   144  	xxx_messageInfo_TxRaw.DiscardUnknown(m)
   145  }
   146  
   147  var xxx_messageInfo_TxRaw proto.InternalMessageInfo
   148  
   149  func (m *TxRaw) GetBodyBytes() []byte {
   150  	if m != nil {
   151  		return m.BodyBytes
   152  	}
   153  	return nil
   154  }
   155  
   156  func (m *TxRaw) GetAuthInfoBytes() []byte {
   157  	if m != nil {
   158  		return m.AuthInfoBytes
   159  	}
   160  	return nil
   161  }
   162  
   163  func (m *TxRaw) GetSignatures() [][]byte {
   164  	if m != nil {
   165  		return m.Signatures
   166  	}
   167  	return nil
   168  }
   169  
   170  // SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT.
   171  type SignDoc struct {
   172  	// body_bytes is protobuf serialization of a TxBody that matches the
   173  	// representation in TxRaw.
   174  	BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"`
   175  	// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
   176  	// representation in TxRaw.
   177  	AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"`
   178  	// chain_id is the unique identifier of the chain this transaction targets.
   179  	// It prevents signed transactions from being used on another chain by an
   180  	// attacker
   181  	ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
   182  	// account_number is the account number of the account in state
   183  	AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
   184  }
   185  
   186  func (m *SignDoc) Reset()         { *m = SignDoc{} }
   187  func (m *SignDoc) String() string { return proto.CompactTextString(m) }
   188  func (*SignDoc) ProtoMessage()    {}
   189  func (*SignDoc) Descriptor() ([]byte, []int) {
   190  	return fileDescriptor_96d1575ffde80842, []int{2}
   191  }
   192  func (m *SignDoc) XXX_Unmarshal(b []byte) error {
   193  	return m.Unmarshal(b)
   194  }
   195  func (m *SignDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   196  	if deterministic {
   197  		return xxx_messageInfo_SignDoc.Marshal(b, m, deterministic)
   198  	} else {
   199  		b = b[:cap(b)]
   200  		n, err := m.MarshalToSizedBuffer(b)
   201  		if err != nil {
   202  			return nil, err
   203  		}
   204  		return b[:n], nil
   205  	}
   206  }
   207  func (m *SignDoc) XXX_Merge(src proto.Message) {
   208  	xxx_messageInfo_SignDoc.Merge(m, src)
   209  }
   210  func (m *SignDoc) XXX_Size() int {
   211  	return m.Size()
   212  }
   213  func (m *SignDoc) XXX_DiscardUnknown() {
   214  	xxx_messageInfo_SignDoc.DiscardUnknown(m)
   215  }
   216  
   217  var xxx_messageInfo_SignDoc proto.InternalMessageInfo
   218  
   219  func (m *SignDoc) GetBodyBytes() []byte {
   220  	if m != nil {
   221  		return m.BodyBytes
   222  	}
   223  	return nil
   224  }
   225  
   226  func (m *SignDoc) GetAuthInfoBytes() []byte {
   227  	if m != nil {
   228  		return m.AuthInfoBytes
   229  	}
   230  	return nil
   231  }
   232  
   233  func (m *SignDoc) GetChainId() string {
   234  	if m != nil {
   235  		return m.ChainId
   236  	}
   237  	return ""
   238  }
   239  
   240  func (m *SignDoc) GetAccountNumber() uint64 {
   241  	if m != nil {
   242  		return m.AccountNumber
   243  	}
   244  	return 0
   245  }
   246  
   247  // TxBody is the body of a transaction that all signers sign over.
   248  type TxBody struct {
   249  	// messages is a list of messages to be executed. The required signers of
   250  	// those messages define the number and order of elements in AuthInfo's
   251  	// signer_infos and Tx's signatures. Each required signer address is added to
   252  	// the list only the first time it occurs.
   253  	// By convention, the first required signer (usually from the first message)
   254  	// is referred to as the primary signer and pays the fee for the whole
   255  	// transaction.
   256  	Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
   257  	// memo is any arbitrary note/comment to be added to the transaction.
   258  	// WARNING: in clients, any publicly exposed text should not be called memo,
   259  	// but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
   260  	Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"`
   261  	// timeout is the block height after which this transaction will not
   262  	// be processed by the chain
   263  	TimeoutHeight uint64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"`
   264  	// extension_options are arbitrary options that can be added by chains
   265  	// when the default options are not sufficient. If any of these are present
   266  	// and can't be handled, the transaction will be rejected
   267  	ExtensionOptions []*types.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"`
   268  	// extension_options are arbitrary options that can be added by chains
   269  	// when the default options are not sufficient. If any of these are present
   270  	// and can't be handled, they will be ignored
   271  	NonCriticalExtensionOptions []*types.Any `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"`
   272  }
   273  
   274  func (m *TxBody) Reset()         { *m = TxBody{} }
   275  func (m *TxBody) String() string { return proto.CompactTextString(m) }
   276  func (*TxBody) ProtoMessage()    {}
   277  func (*TxBody) Descriptor() ([]byte, []int) {
   278  	return fileDescriptor_96d1575ffde80842, []int{3}
   279  }
   280  func (m *TxBody) XXX_Unmarshal(b []byte) error {
   281  	return m.Unmarshal(b)
   282  }
   283  func (m *TxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   284  	if deterministic {
   285  		return xxx_messageInfo_TxBody.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 *TxBody) XXX_Merge(src proto.Message) {
   296  	xxx_messageInfo_TxBody.Merge(m, src)
   297  }
   298  func (m *TxBody) XXX_Size() int {
   299  	return m.Size()
   300  }
   301  func (m *TxBody) XXX_DiscardUnknown() {
   302  	xxx_messageInfo_TxBody.DiscardUnknown(m)
   303  }
   304  
   305  var xxx_messageInfo_TxBody proto.InternalMessageInfo
   306  
   307  func (m *TxBody) GetMessages() []*types.Any {
   308  	if m != nil {
   309  		return m.Messages
   310  	}
   311  	return nil
   312  }
   313  
   314  func (m *TxBody) GetMemo() string {
   315  	if m != nil {
   316  		return m.Memo
   317  	}
   318  	return ""
   319  }
   320  
   321  func (m *TxBody) GetTimeoutHeight() uint64 {
   322  	if m != nil {
   323  		return m.TimeoutHeight
   324  	}
   325  	return 0
   326  }
   327  
   328  func (m *TxBody) GetExtensionOptions() []*types.Any {
   329  	if m != nil {
   330  		return m.ExtensionOptions
   331  	}
   332  	return nil
   333  }
   334  
   335  func (m *TxBody) GetNonCriticalExtensionOptions() []*types.Any {
   336  	if m != nil {
   337  		return m.NonCriticalExtensionOptions
   338  	}
   339  	return nil
   340  }
   341  
   342  // AuthInfo describes the fee and signer modes that are used to sign a
   343  // transaction.
   344  type AuthInfo struct {
   345  	// signer_infos defines the signing modes for the required signers. The number
   346  	// and order of elements must match the required signers from TxBody's
   347  	// messages. The first element is the primary signer and the one which pays
   348  	// the fee.
   349  	SignerInfos []*SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"`
   350  	// Fee is the fee and gas limit for the transaction. The first signer is the
   351  	// primary signer and the one which pays the fee. The fee can be calculated
   352  	// based on the cost of evaluating the body and doing signature verification
   353  	// of the signers. This can be estimated via simulation.
   354  	Fee *Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"`
   355  }
   356  
   357  func (m *AuthInfo) Reset()         { *m = AuthInfo{} }
   358  func (m *AuthInfo) String() string { return proto.CompactTextString(m) }
   359  func (*AuthInfo) ProtoMessage()    {}
   360  func (*AuthInfo) Descriptor() ([]byte, []int) {
   361  	return fileDescriptor_96d1575ffde80842, []int{4}
   362  }
   363  func (m *AuthInfo) XXX_Unmarshal(b []byte) error {
   364  	return m.Unmarshal(b)
   365  }
   366  func (m *AuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   367  	if deterministic {
   368  		return xxx_messageInfo_AuthInfo.Marshal(b, m, deterministic)
   369  	} else {
   370  		b = b[:cap(b)]
   371  		n, err := m.MarshalToSizedBuffer(b)
   372  		if err != nil {
   373  			return nil, err
   374  		}
   375  		return b[:n], nil
   376  	}
   377  }
   378  func (m *AuthInfo) XXX_Merge(src proto.Message) {
   379  	xxx_messageInfo_AuthInfo.Merge(m, src)
   380  }
   381  func (m *AuthInfo) XXX_Size() int {
   382  	return m.Size()
   383  }
   384  func (m *AuthInfo) XXX_DiscardUnknown() {
   385  	xxx_messageInfo_AuthInfo.DiscardUnknown(m)
   386  }
   387  
   388  var xxx_messageInfo_AuthInfo proto.InternalMessageInfo
   389  
   390  func (m *AuthInfo) GetSignerInfos() []*SignerInfo {
   391  	if m != nil {
   392  		return m.SignerInfos
   393  	}
   394  	return nil
   395  }
   396  
   397  func (m *AuthInfo) GetFee() *Fee {
   398  	if m != nil {
   399  		return m.Fee
   400  	}
   401  	return nil
   402  }
   403  
   404  // SignerInfo describes the public key and signing mode of a single top-level
   405  // signer.
   406  type SignerInfo struct {
   407  	// public_key is the public key of the signer. It is optional for accounts
   408  	// that already exist in state. If unset, the verifier can use the required \
   409  	// signer address for this position and lookup the public key.
   410  	PublicKey *types.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
   411  	// mode_info describes the signing mode of the signer and is a nested
   412  	// structure to support nested multisig pubkey's
   413  	ModeInfo *ModeInfo `protobuf:"bytes,2,opt,name=mode_info,json=modeInfo,proto3" json:"mode_info,omitempty"`
   414  	// sequence is the sequence of the account, which describes the
   415  	// number of committed transactions signed by a given address. It is used to
   416  	// prevent replay attacks.
   417  	Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
   418  }
   419  
   420  func (m *SignerInfo) Reset()         { *m = SignerInfo{} }
   421  func (m *SignerInfo) String() string { return proto.CompactTextString(m) }
   422  func (*SignerInfo) ProtoMessage()    {}
   423  func (*SignerInfo) Descriptor() ([]byte, []int) {
   424  	return fileDescriptor_96d1575ffde80842, []int{5}
   425  }
   426  func (m *SignerInfo) XXX_Unmarshal(b []byte) error {
   427  	return m.Unmarshal(b)
   428  }
   429  func (m *SignerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   430  	if deterministic {
   431  		return xxx_messageInfo_SignerInfo.Marshal(b, m, deterministic)
   432  	} else {
   433  		b = b[:cap(b)]
   434  		n, err := m.MarshalToSizedBuffer(b)
   435  		if err != nil {
   436  			return nil, err
   437  		}
   438  		return b[:n], nil
   439  	}
   440  }
   441  func (m *SignerInfo) XXX_Merge(src proto.Message) {
   442  	xxx_messageInfo_SignerInfo.Merge(m, src)
   443  }
   444  func (m *SignerInfo) XXX_Size() int {
   445  	return m.Size()
   446  }
   447  func (m *SignerInfo) XXX_DiscardUnknown() {
   448  	xxx_messageInfo_SignerInfo.DiscardUnknown(m)
   449  }
   450  
   451  var xxx_messageInfo_SignerInfo proto.InternalMessageInfo
   452  
   453  func (m *SignerInfo) GetPublicKey() *types.Any {
   454  	if m != nil {
   455  		return m.PublicKey
   456  	}
   457  	return nil
   458  }
   459  
   460  func (m *SignerInfo) GetModeInfo() *ModeInfo {
   461  	if m != nil {
   462  		return m.ModeInfo
   463  	}
   464  	return nil
   465  }
   466  
   467  func (m *SignerInfo) GetSequence() uint64 {
   468  	if m != nil {
   469  		return m.Sequence
   470  	}
   471  	return 0
   472  }
   473  
   474  // ModeInfo describes the signing mode of a single or nested multisig signer.
   475  type ModeInfo struct {
   476  	// sum is the oneof that specifies whether this represents a single or nested
   477  	// multisig signer
   478  	//
   479  	// Types that are valid to be assigned to Sum:
   480  	//	*ModeInfo_Single_
   481  	//	*ModeInfo_Multi_
   482  	Sum isModeInfo_Sum `protobuf_oneof:"sum"`
   483  }
   484  
   485  func (m *ModeInfo) Reset()         { *m = ModeInfo{} }
   486  func (m *ModeInfo) String() string { return proto.CompactTextString(m) }
   487  func (*ModeInfo) ProtoMessage()    {}
   488  func (*ModeInfo) Descriptor() ([]byte, []int) {
   489  	return fileDescriptor_96d1575ffde80842, []int{6}
   490  }
   491  func (m *ModeInfo) XXX_Unmarshal(b []byte) error {
   492  	return m.Unmarshal(b)
   493  }
   494  func (m *ModeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   495  	if deterministic {
   496  		return xxx_messageInfo_ModeInfo.Marshal(b, m, deterministic)
   497  	} else {
   498  		b = b[:cap(b)]
   499  		n, err := m.MarshalToSizedBuffer(b)
   500  		if err != nil {
   501  			return nil, err
   502  		}
   503  		return b[:n], nil
   504  	}
   505  }
   506  func (m *ModeInfo) XXX_Merge(src proto.Message) {
   507  	xxx_messageInfo_ModeInfo.Merge(m, src)
   508  }
   509  func (m *ModeInfo) XXX_Size() int {
   510  	return m.Size()
   511  }
   512  func (m *ModeInfo) XXX_DiscardUnknown() {
   513  	xxx_messageInfo_ModeInfo.DiscardUnknown(m)
   514  }
   515  
   516  var xxx_messageInfo_ModeInfo proto.InternalMessageInfo
   517  
   518  type isModeInfo_Sum interface {
   519  	isModeInfo_Sum()
   520  	MarshalTo([]byte) (int, error)
   521  	Size() int
   522  }
   523  
   524  type ModeInfo_Single_ struct {
   525  	Single *ModeInfo_Single `protobuf:"bytes,1,opt,name=single,proto3,oneof" json:"single,omitempty"`
   526  }
   527  type ModeInfo_Multi_ struct {
   528  	Multi *ModeInfo_Multi `protobuf:"bytes,2,opt,name=multi,proto3,oneof" json:"multi,omitempty"`
   529  }
   530  
   531  func (*ModeInfo_Single_) isModeInfo_Sum() {}
   532  func (*ModeInfo_Multi_) isModeInfo_Sum()  {}
   533  
   534  func (m *ModeInfo) GetSum() isModeInfo_Sum {
   535  	if m != nil {
   536  		return m.Sum
   537  	}
   538  	return nil
   539  }
   540  
   541  func (m *ModeInfo) GetSingle() *ModeInfo_Single {
   542  	if x, ok := m.GetSum().(*ModeInfo_Single_); ok {
   543  		return x.Single
   544  	}
   545  	return nil
   546  }
   547  
   548  func (m *ModeInfo) GetMulti() *ModeInfo_Multi {
   549  	if x, ok := m.GetSum().(*ModeInfo_Multi_); ok {
   550  		return x.Multi
   551  	}
   552  	return nil
   553  }
   554  
   555  // XXX_OneofWrappers is for the internal use of the proto package.
   556  func (*ModeInfo) XXX_OneofWrappers() []interface{} {
   557  	return []interface{}{
   558  		(*ModeInfo_Single_)(nil),
   559  		(*ModeInfo_Multi_)(nil),
   560  	}
   561  }
   562  
   563  // Single is the mode info for a single signer. It is structured as a message
   564  // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
   565  // future
   566  type ModeInfo_Single struct {
   567  	// mode is the signing mode of the single signer
   568  	Mode signing.SignMode `protobuf:"varint,1,opt,name=mode,proto3,enum=cosmos.tx.signing.v1beta1.SignMode" json:"mode,omitempty"`
   569  }
   570  
   571  func (m *ModeInfo_Single) Reset()         { *m = ModeInfo_Single{} }
   572  func (m *ModeInfo_Single) String() string { return proto.CompactTextString(m) }
   573  func (*ModeInfo_Single) ProtoMessage()    {}
   574  func (*ModeInfo_Single) Descriptor() ([]byte, []int) {
   575  	return fileDescriptor_96d1575ffde80842, []int{6, 0}
   576  }
   577  func (m *ModeInfo_Single) XXX_Unmarshal(b []byte) error {
   578  	return m.Unmarshal(b)
   579  }
   580  func (m *ModeInfo_Single) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   581  	if deterministic {
   582  		return xxx_messageInfo_ModeInfo_Single.Marshal(b, m, deterministic)
   583  	} else {
   584  		b = b[:cap(b)]
   585  		n, err := m.MarshalToSizedBuffer(b)
   586  		if err != nil {
   587  			return nil, err
   588  		}
   589  		return b[:n], nil
   590  	}
   591  }
   592  func (m *ModeInfo_Single) XXX_Merge(src proto.Message) {
   593  	xxx_messageInfo_ModeInfo_Single.Merge(m, src)
   594  }
   595  func (m *ModeInfo_Single) XXX_Size() int {
   596  	return m.Size()
   597  }
   598  func (m *ModeInfo_Single) XXX_DiscardUnknown() {
   599  	xxx_messageInfo_ModeInfo_Single.DiscardUnknown(m)
   600  }
   601  
   602  var xxx_messageInfo_ModeInfo_Single proto.InternalMessageInfo
   603  
   604  func (m *ModeInfo_Single) GetMode() signing.SignMode {
   605  	if m != nil {
   606  		return m.Mode
   607  	}
   608  	return signing.SignMode_SIGN_MODE_UNSPECIFIED
   609  }
   610  
   611  // Multi is the mode info for a multisig public key
   612  type ModeInfo_Multi struct {
   613  	// bitarray specifies which keys within the multisig are signing
   614  	Bitarray *types1.CompactBitArray `protobuf:"bytes,1,opt,name=bitarray,proto3" json:"bitarray,omitempty"`
   615  	// mode_infos is the corresponding modes of the signers of the multisig
   616  	// which could include nested multisig public keys
   617  	ModeInfos []*ModeInfo `protobuf:"bytes,2,rep,name=mode_infos,json=modeInfos,proto3" json:"mode_infos,omitempty"`
   618  }
   619  
   620  func (m *ModeInfo_Multi) Reset()         { *m = ModeInfo_Multi{} }
   621  func (m *ModeInfo_Multi) String() string { return proto.CompactTextString(m) }
   622  func (*ModeInfo_Multi) ProtoMessage()    {}
   623  func (*ModeInfo_Multi) Descriptor() ([]byte, []int) {
   624  	return fileDescriptor_96d1575ffde80842, []int{6, 1}
   625  }
   626  func (m *ModeInfo_Multi) XXX_Unmarshal(b []byte) error {
   627  	return m.Unmarshal(b)
   628  }
   629  func (m *ModeInfo_Multi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   630  	if deterministic {
   631  		return xxx_messageInfo_ModeInfo_Multi.Marshal(b, m, deterministic)
   632  	} else {
   633  		b = b[:cap(b)]
   634  		n, err := m.MarshalToSizedBuffer(b)
   635  		if err != nil {
   636  			return nil, err
   637  		}
   638  		return b[:n], nil
   639  	}
   640  }
   641  func (m *ModeInfo_Multi) XXX_Merge(src proto.Message) {
   642  	xxx_messageInfo_ModeInfo_Multi.Merge(m, src)
   643  }
   644  func (m *ModeInfo_Multi) XXX_Size() int {
   645  	return m.Size()
   646  }
   647  func (m *ModeInfo_Multi) XXX_DiscardUnknown() {
   648  	xxx_messageInfo_ModeInfo_Multi.DiscardUnknown(m)
   649  }
   650  
   651  var xxx_messageInfo_ModeInfo_Multi proto.InternalMessageInfo
   652  
   653  func (m *ModeInfo_Multi) GetBitarray() *types1.CompactBitArray {
   654  	if m != nil {
   655  		return m.Bitarray
   656  	}
   657  	return nil
   658  }
   659  
   660  func (m *ModeInfo_Multi) GetModeInfos() []*ModeInfo {
   661  	if m != nil {
   662  		return m.ModeInfos
   663  	}
   664  	return nil
   665  }
   666  
   667  // Fee includes the amount of coins paid in fees and the maximum
   668  // gas to be used by the transaction. The ratio yields an effective "gasprice",
   669  // which must be above some miminum to be accepted into the mempool.
   670  type Fee struct {
   671  	// amount is the amount of coins to be paid as a fee
   672  	Amount github_com_Finschia_finschia_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coins" json:"amount"`
   673  	// gas_limit is the maximum gas that can be used in transaction processing
   674  	// before an out of gas error occurs
   675  	GasLimit uint64 `protobuf:"varint,2,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
   676  	// if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
   677  	// the payer must be a tx signer (and thus have signed this field in AuthInfo).
   678  	// setting this field does *not* change the ordering of required signers for the transaction.
   679  	Payer string `protobuf:"bytes,3,opt,name=payer,proto3" json:"payer,omitempty"`
   680  	// if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
   681  	// to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
   682  	// not support fee grants, this will fail
   683  	Granter string `protobuf:"bytes,4,opt,name=granter,proto3" json:"granter,omitempty"`
   684  }
   685  
   686  func (m *Fee) Reset()         { *m = Fee{} }
   687  func (m *Fee) String() string { return proto.CompactTextString(m) }
   688  func (*Fee) ProtoMessage()    {}
   689  func (*Fee) Descriptor() ([]byte, []int) {
   690  	return fileDescriptor_96d1575ffde80842, []int{7}
   691  }
   692  func (m *Fee) XXX_Unmarshal(b []byte) error {
   693  	return m.Unmarshal(b)
   694  }
   695  func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   696  	if deterministic {
   697  		return xxx_messageInfo_Fee.Marshal(b, m, deterministic)
   698  	} else {
   699  		b = b[:cap(b)]
   700  		n, err := m.MarshalToSizedBuffer(b)
   701  		if err != nil {
   702  			return nil, err
   703  		}
   704  		return b[:n], nil
   705  	}
   706  }
   707  func (m *Fee) XXX_Merge(src proto.Message) {
   708  	xxx_messageInfo_Fee.Merge(m, src)
   709  }
   710  func (m *Fee) XXX_Size() int {
   711  	return m.Size()
   712  }
   713  func (m *Fee) XXX_DiscardUnknown() {
   714  	xxx_messageInfo_Fee.DiscardUnknown(m)
   715  }
   716  
   717  var xxx_messageInfo_Fee proto.InternalMessageInfo
   718  
   719  func (m *Fee) GetAmount() github_com_Finschia_finschia_sdk_types.Coins {
   720  	if m != nil {
   721  		return m.Amount
   722  	}
   723  	return nil
   724  }
   725  
   726  func (m *Fee) GetGasLimit() uint64 {
   727  	if m != nil {
   728  		return m.GasLimit
   729  	}
   730  	return 0
   731  }
   732  
   733  func (m *Fee) GetPayer() string {
   734  	if m != nil {
   735  		return m.Payer
   736  	}
   737  	return ""
   738  }
   739  
   740  func (m *Fee) GetGranter() string {
   741  	if m != nil {
   742  		return m.Granter
   743  	}
   744  	return ""
   745  }
   746  
   747  func init() {
   748  	proto.RegisterType((*Tx)(nil), "cosmos.tx.v1beta1.Tx")
   749  	proto.RegisterType((*TxRaw)(nil), "cosmos.tx.v1beta1.TxRaw")
   750  	proto.RegisterType((*SignDoc)(nil), "cosmos.tx.v1beta1.SignDoc")
   751  	proto.RegisterType((*TxBody)(nil), "cosmos.tx.v1beta1.TxBody")
   752  	proto.RegisterType((*AuthInfo)(nil), "cosmos.tx.v1beta1.AuthInfo")
   753  	proto.RegisterType((*SignerInfo)(nil), "cosmos.tx.v1beta1.SignerInfo")
   754  	proto.RegisterType((*ModeInfo)(nil), "cosmos.tx.v1beta1.ModeInfo")
   755  	proto.RegisterType((*ModeInfo_Single)(nil), "cosmos.tx.v1beta1.ModeInfo.Single")
   756  	proto.RegisterType((*ModeInfo_Multi)(nil), "cosmos.tx.v1beta1.ModeInfo.Multi")
   757  	proto.RegisterType((*Fee)(nil), "cosmos.tx.v1beta1.Fee")
   758  }
   759  
   760  func init() { proto.RegisterFile("cosmos/tx/v1beta1/tx.proto", fileDescriptor_96d1575ffde80842) }
   761  
   762  var fileDescriptor_96d1575ffde80842 = []byte{
   763  	// 849 bytes of a gzipped FileDescriptorProto
   764  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xdd, 0x6e, 0x1b, 0x45,
   765  	0x14, 0xf6, 0xfa, 0x2f, 0xf6, 0x49, 0xd2, 0xd2, 0x51, 0x84, 0x1c, 0x47, 0xdd, 0x06, 0x23, 0xc0,
   766  	0x48, 0x64, 0x97, 0xa6, 0x48, 0xfc, 0x88, 0x0b, 0xe2, 0x40, 0x94, 0xaa, 0x14, 0xa4, 0x49, 0xae,
   767  	0x7a, 0xb3, 0x9a, 0x5d, 0x8f, 0xd7, 0xa3, 0x7a, 0x67, 0xcc, 0xce, 0x6c, 0xd9, 0x7d, 0x08, 0xa4,
   768  	0x0a, 0x09, 0xf1, 0x0e, 0xbc, 0x02, 0x2f, 0xd0, 0xcb, 0x5e, 0x72, 0x05, 0x51, 0xf2, 0x20, 0xa0,
   769  	0x99, 0x9d, 0xdd, 0x44, 0x60, 0x39, 0x5c, 0xf4, 0x6e, 0xce, 0x99, 0xef, 0x7c, 0xf3, 0xcd, 0xf9,
   770  	0x83, 0x61, 0x24, 0x64, 0x22, 0xa4, 0xaf, 0x72, 0xff, 0xc5, 0xc3, 0x90, 0x2a, 0xf2, 0xd0, 0x57,
   771  	0xb9, 0xb7, 0x4c, 0x85, 0x12, 0xe8, 0x5e, 0x79, 0xe7, 0xa9, 0xdc, 0xb3, 0x77, 0xc3, 0x9d, 0x58,
   772  	0xc4, 0xc2, 0xdc, 0xfa, 0xfa, 0x54, 0x02, 0x87, 0x07, 0x96, 0x24, 0x4a, 0x8b, 0xa5, 0x12, 0x7e,
   773  	0x92, 0x2d, 0x14, 0x93, 0x2c, 0xae, 0x19, 0x2b, 0x87, 0x85, 0xbb, 0x16, 0x1e, 0x12, 0x49, 0x6b,
   774  	0x4c, 0x24, 0x18, 0xb7, 0xf7, 0x1f, 0x5c, 0x6b, 0x92, 0x2c, 0xe6, 0x8c, 0x5f, 0x33, 0x59, 0xdb,
   775  	0x02, 0x77, 0x63, 0x21, 0xe2, 0x05, 0xf5, 0x8d, 0x15, 0x66, 0x33, 0x9f, 0xf0, 0xa2, 0xbc, 0x1a,
   776  	0xfd, 0xe4, 0x40, 0xf3, 0x3c, 0x47, 0x07, 0xd0, 0x0e, 0xc5, 0xb4, 0x18, 0x38, 0xfb, 0xce, 0x78,
   777  	0xf3, 0x70, 0xd7, 0xfb, 0xcf, 0x8f, 0xbc, 0xf3, 0x7c, 0x22, 0xa6, 0x05, 0x36, 0x30, 0xf4, 0x19,
   778  	0xf4, 0x49, 0xa6, 0xe6, 0x01, 0xe3, 0x33, 0x31, 0x68, 0x9a, 0x98, 0xbd, 0x15, 0x31, 0x47, 0x99,
   779  	0x9a, 0x3f, 0xe6, 0x33, 0x81, 0x7b, 0xc4, 0x9e, 0x90, 0x0b, 0xa0, 0xb5, 0x11, 0x95, 0xa5, 0x54,
   780  	0x0e, 0x5a, 0xfb, 0xad, 0xf1, 0x16, 0xbe, 0xe1, 0x19, 0x71, 0xe8, 0x9c, 0xe7, 0x98, 0xfc, 0x88,
   781  	0xee, 0x03, 0xe8, 0xa7, 0x82, 0xb0, 0x50, 0x54, 0x1a, 0x5d, 0x5b, 0xb8, 0xaf, 0x3d, 0x13, 0xed,
   782  	0x40, 0xef, 0xc3, 0xdd, 0x5a, 0x81, 0xc5, 0x34, 0x0d, 0x66, 0xbb, 0x7a, 0xaa, 0xc4, 0xdd, 0xf6,
   783  	0xde, 0xcf, 0x0e, 0x6c, 0x9c, 0xb1, 0x98, 0x7f, 0x2d, 0xa2, 0x37, 0xf5, 0xe4, 0x2e, 0xf4, 0xa2,
   784  	0x39, 0x61, 0x3c, 0x60, 0xd3, 0x41, 0x6b, 0xdf, 0x19, 0xf7, 0xf1, 0x86, 0xb1, 0x1f, 0x4f, 0xd1,
   785  	0x7b, 0x70, 0x87, 0x44, 0x91, 0xc8, 0xb8, 0x0a, 0x78, 0x96, 0x84, 0x34, 0x1d, 0xb4, 0xf7, 0x9d,
   786  	0x71, 0x1b, 0x6f, 0x5b, 0xef, 0x77, 0xc6, 0x39, 0xfa, 0xa5, 0x09, 0xdd, 0x32, 0xdf, 0xe8, 0x63,
   787  	0xe8, 0x25, 0x54, 0x4a, 0x12, 0x1b, 0x45, 0xad, 0xf1, 0xe6, 0xe1, 0x8e, 0x57, 0x56, 0xd3, 0xab,
   788  	0xaa, 0xe9, 0x1d, 0xf1, 0x02, 0xd7, 0x28, 0x84, 0xa0, 0x9d, 0xd0, 0xa4, 0x2c, 0x4b, 0x1f, 0x9b,
   789  	0xb3, 0x7e, 0x57, 0xb1, 0x84, 0x8a, 0x4c, 0x05, 0x73, 0xca, 0xe2, 0xb9, 0x32, 0xc2, 0xda, 0x78,
   790  	0xdb, 0x7a, 0x4f, 0x8d, 0x13, 0x4d, 0xe0, 0x1e, 0xcd, 0x15, 0xe5, 0x92, 0x09, 0x1e, 0x88, 0xa5,
   791  	0x62, 0x82, 0xcb, 0xc1, 0xdf, 0x1b, 0x6b, 0x9e, 0x7d, 0xab, 0xc6, 0x7f, 0x5f, 0xc2, 0xd1, 0x33,
   792  	0x70, 0xb9, 0xe0, 0x41, 0x94, 0x32, 0xc5, 0x22, 0xb2, 0x08, 0x56, 0x10, 0xde, 0x5d, 0x43, 0xb8,
   793  	0xc7, 0x05, 0x3f, 0xb6, 0xb1, 0xdf, 0xfc, 0x8b, 0x7b, 0xf4, 0x02, 0x7a, 0x55, 0x4b, 0xa1, 0xaf,
   794  	0x60, 0x4b, 0x97, 0x91, 0xa6, 0xa6, 0x1e, 0x55, 0x72, 0xee, 0xaf, 0xe8, 0xc2, 0x33, 0x03, 0x33,
   795  	0x7d, 0xb8, 0x29, 0xeb, 0xb3, 0x44, 0x63, 0x68, 0xcd, 0x28, 0xb5, 0xed, 0xfb, 0xf6, 0x8a, 0xc0,
   796  	0x13, 0x4a, 0xb1, 0x86, 0x8c, 0x7e, 0x75, 0x00, 0xae, 0x59, 0xd0, 0x23, 0x80, 0x65, 0x16, 0x2e,
   797  	0x58, 0x14, 0x3c, 0xa7, 0xd5, 0xc8, 0xac, 0xfe, 0x4d, 0xbf, 0xc4, 0x3d, 0xa1, 0x66, 0x64, 0x12,
   798  	0x31, 0xa5, 0xb7, 0x8d, 0xcc, 0x53, 0x31, 0xa5, 0xe5, 0xc8, 0x24, 0xf6, 0x84, 0x86, 0xd0, 0x93,
   799  	0xf4, 0x87, 0x8c, 0xf2, 0x88, 0xda, 0xb2, 0xd5, 0xf6, 0xe8, 0xa2, 0x09, 0xbd, 0x2a, 0x04, 0x7d,
   800  	0x09, 0x5d, 0xc9, 0x78, 0xbc, 0xa0, 0x56, 0xd3, 0x68, 0x0d, 0xbf, 0x77, 0x66, 0x90, 0xa7, 0x0d,
   801  	0x6c, 0x63, 0xd0, 0xe7, 0xd0, 0x31, 0xfb, 0xc7, 0x8a, 0x7b, 0x67, 0x5d, 0xf0, 0x53, 0x0d, 0x3c,
   802  	0x6d, 0xe0, 0x32, 0x62, 0x78, 0x04, 0xdd, 0x92, 0x0e, 0x7d, 0x0a, 0x6d, 0xad, 0xdb, 0x08, 0xb8,
   803  	0x73, 0xf8, 0xee, 0x0d, 0x8e, 0x6a, 0x23, 0xdd, 0xac, 0x8a, 0xe6, 0xc3, 0x26, 0x60, 0xf8, 0xd2,
   804  	0x81, 0x8e, 0x61, 0x45, 0x4f, 0xa0, 0x17, 0x32, 0x45, 0xd2, 0x94, 0x54, 0xb9, 0xf5, 0x2b, 0x9a,
   805  	0x72, 0x6f, 0x7a, 0xf5, 0x9a, 0xac, 0xb8, 0x8e, 0x45, 0xb2, 0x24, 0x91, 0x9a, 0x30, 0x75, 0xa4,
   806  	0xc3, 0x70, 0x4d, 0x80, 0xbe, 0x00, 0xa8, 0xb3, 0xae, 0xc7, 0xb5, 0x75, 0x5b, 0xda, 0xfb, 0x55,
   807  	0xda, 0xe5, 0xa4, 0x03, 0x2d, 0x99, 0x25, 0xa3, 0xdf, 0x1d, 0x68, 0x9d, 0x50, 0x8a, 0x62, 0xe8,
   808  	0x92, 0x44, 0x0f, 0xa9, 0x6d, 0xb5, 0x7a, 0x49, 0xea, 0xf5, 0x7c, 0x43, 0x0a, 0xe3, 0x93, 0x4f,
   809  	0x5e, 0xfd, 0xf9, 0xa0, 0xf1, 0xdb, 0x5f, 0x0f, 0x3e, 0x8a, 0x99, 0x9a, 0x67, 0xa1, 0x17, 0x89,
   810  	0xc4, 0x3f, 0x61, 0x5c, 0x46, 0x73, 0x46, 0xfc, 0x99, 0x3d, 0x1c, 0xc8, 0xe9, 0x73, 0x5f, 0x15,
   811  	0x4b, 0x2a, 0x4d, 0x90, 0xc4, 0x96, 0x1e, 0xed, 0x41, 0x3f, 0x26, 0x32, 0x58, 0xb0, 0x84, 0x29,
   812  	0x53, 0x8c, 0x36, 0xee, 0xc5, 0x44, 0x7e, 0xab, 0x6d, 0xb4, 0x03, 0x9d, 0x25, 0x29, 0x68, 0x6a,
   813  	0x37, 0x4b, 0x69, 0xa0, 0x01, 0x6c, 0xc4, 0x29, 0xe1, 0xca, 0x2e, 0x94, 0x3e, 0xae, 0xcc, 0xc9,
   814  	0xf1, 0xab, 0x4b, 0xd7, 0x79, 0x7d, 0xe9, 0x3a, 0x17, 0x97, 0xae, 0xf3, 0xf2, 0xca, 0x6d, 0xbc,
   815  	0xbe, 0x72, 0x1b, 0x7f, 0x5c, 0xb9, 0x8d, 0x67, 0x1f, 0xfe, 0x3f, 0x71, 0xbe, 0xca, 0xc3, 0xae,
   816  	0x69, 0xea, 0x47, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x68, 0x76, 0x32, 0x05, 0x07, 0x00,
   817  	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.Coin{})
  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  )