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