github.com/Finschia/finschia-sdk@v0.48.1/crypto/keys/multisig/keys.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/crypto/multisig/keys.proto 3 4 package multisig 5 6 import ( 7 fmt "fmt" 8 types "github.com/Finschia/finschia-sdk/codec/types" 9 _ "github.com/gogo/protobuf/gogoproto" 10 proto "github.com/gogo/protobuf/proto" 11 io "io" 12 math "math" 13 math_bits "math/bits" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 // LegacyAminoPubKey specifies a public key type 28 // which nests multiple public keys and a threshold, 29 // it uses legacy amino address rules. 30 type LegacyAminoPubKey struct { 31 Threshold uint32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty" yaml:"threshold"` 32 PubKeys []*types.Any `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty" yaml:"pubkeys"` 33 } 34 35 func (m *LegacyAminoPubKey) Reset() { *m = LegacyAminoPubKey{} } 36 func (m *LegacyAminoPubKey) String() string { return proto.CompactTextString(m) } 37 func (*LegacyAminoPubKey) ProtoMessage() {} 38 func (*LegacyAminoPubKey) Descriptor() ([]byte, []int) { 39 return fileDescriptor_46b57537e097d47d, []int{0} 40 } 41 func (m *LegacyAminoPubKey) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *LegacyAminoPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_LegacyAminoPubKey.Marshal(b, m, deterministic) 47 } else { 48 b = b[:cap(b)] 49 n, err := m.MarshalToSizedBuffer(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55 } 56 func (m *LegacyAminoPubKey) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_LegacyAminoPubKey.Merge(m, src) 58 } 59 func (m *LegacyAminoPubKey) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *LegacyAminoPubKey) XXX_DiscardUnknown() { 63 xxx_messageInfo_LegacyAminoPubKey.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_LegacyAminoPubKey proto.InternalMessageInfo 67 68 func init() { 69 proto.RegisterType((*LegacyAminoPubKey)(nil), "cosmos.crypto.multisig.LegacyAminoPubKey") 70 } 71 72 func init() { proto.RegisterFile("cosmos/crypto/multisig/keys.proto", fileDescriptor_46b57537e097d47d) } 73 74 var fileDescriptor_46b57537e097d47d = []byte{ 75 // 294 bytes of a gzipped FileDescriptorProto 76 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, 77 0xcd, 0x2f, 0xd6, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0xcf, 0x2d, 0xcd, 0x29, 0xc9, 0x2c, 78 0xce, 0x4c, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 79 0x28, 0xd1, 0x83, 0x28, 0xd1, 0x83, 0x29, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd1, 80 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0x24, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xbc, 0xa4, 81 0xd2, 0x34, 0xfd, 0xc4, 0xbc, 0x4a, 0x88, 0x94, 0xd2, 0x62, 0x46, 0x2e, 0x41, 0x9f, 0xd4, 0xf4, 82 0xc4, 0xe4, 0x4a, 0xc7, 0xdc, 0xcc, 0xbc, 0xfc, 0x80, 0xd2, 0x24, 0xef, 0xd4, 0x4a, 0x21, 0x23, 83 0x2e, 0xce, 0x92, 0x8c, 0xa2, 0xd4, 0xe2, 0x8c, 0xfc, 0x9c, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 84 0x5e, 0x27, 0x91, 0x4f, 0xf7, 0xe4, 0x05, 0x2a, 0x13, 0x73, 0x73, 0xac, 0x94, 0xe0, 0x52, 0x4a, 85 0x41, 0x08, 0x65, 0x42, 0x21, 0x5c, 0xdc, 0x05, 0xa5, 0x49, 0x39, 0x99, 0xc9, 0xf1, 0x20, 0x77, 86 0x4a, 0x30, 0x29, 0x30, 0x6b, 0x70, 0x1b, 0x89, 0xe8, 0x41, 0xac, 0xd6, 0x83, 0x59, 0xad, 0xe7, 87 0x98, 0x57, 0xe9, 0x24, 0xfb, 0xe8, 0x9e, 0x3c, 0x3b, 0xc4, 0xaa, 0xe2, 0x4f, 0xf7, 0xe4, 0xf9, 88 0x20, 0xc6, 0x16, 0x94, 0x26, 0x81, 0x74, 0x2a, 0x05, 0x71, 0x41, 0xcc, 0x01, 0xc9, 0x5a, 0xb1, 89 0x74, 0x2c, 0x90, 0x67, 0x70, 0xf2, 0x3f, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 90 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 91 0x28, 0xd3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb7, 0xcc, 0xbc, 92 0xe2, 0xe4, 0x8c, 0xcc, 0x44, 0xfd, 0x34, 0x28, 0x43, 0xb7, 0x38, 0x25, 0x1b, 0x16, 0x8a, 0x20, 93 0xa3, 0xe1, 0x41, 0x99, 0xc4, 0x06, 0x76, 0x8f, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x94, 0x66, 94 0xd2, 0x87, 0x6b, 0x01, 0x00, 0x00, 95 } 96 97 func (m *LegacyAminoPubKey) Marshal() (dAtA []byte, err error) { 98 size := m.Size() 99 dAtA = make([]byte, size) 100 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 101 if err != nil { 102 return nil, err 103 } 104 return dAtA[:n], nil 105 } 106 107 func (m *LegacyAminoPubKey) MarshalTo(dAtA []byte) (int, error) { 108 size := m.Size() 109 return m.MarshalToSizedBuffer(dAtA[:size]) 110 } 111 112 func (m *LegacyAminoPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { 113 i := len(dAtA) 114 _ = i 115 var l int 116 _ = l 117 if len(m.PubKeys) > 0 { 118 for iNdEx := len(m.PubKeys) - 1; iNdEx >= 0; iNdEx-- { 119 { 120 size, err := m.PubKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 121 if err != nil { 122 return 0, err 123 } 124 i -= size 125 i = encodeVarintKeys(dAtA, i, uint64(size)) 126 } 127 i-- 128 dAtA[i] = 0x12 129 } 130 } 131 if m.Threshold != 0 { 132 i = encodeVarintKeys(dAtA, i, uint64(m.Threshold)) 133 i-- 134 dAtA[i] = 0x8 135 } 136 return len(dAtA) - i, nil 137 } 138 139 func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { 140 offset -= sovKeys(v) 141 base := offset 142 for v >= 1<<7 { 143 dAtA[offset] = uint8(v&0x7f | 0x80) 144 v >>= 7 145 offset++ 146 } 147 dAtA[offset] = uint8(v) 148 return base 149 } 150 func (m *LegacyAminoPubKey) Size() (n int) { 151 if m == nil { 152 return 0 153 } 154 var l int 155 _ = l 156 if m.Threshold != 0 { 157 n += 1 + sovKeys(uint64(m.Threshold)) 158 } 159 if len(m.PubKeys) > 0 { 160 for _, e := range m.PubKeys { 161 l = e.Size() 162 n += 1 + l + sovKeys(uint64(l)) 163 } 164 } 165 return n 166 } 167 168 func sovKeys(x uint64) (n int) { 169 return (math_bits.Len64(x|1) + 6) / 7 170 } 171 func sozKeys(x uint64) (n int) { 172 return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 173 } 174 func (m *LegacyAminoPubKey) Unmarshal(dAtA []byte) error { 175 l := len(dAtA) 176 iNdEx := 0 177 for iNdEx < l { 178 preIndex := iNdEx 179 var wire uint64 180 for shift := uint(0); ; shift += 7 { 181 if shift >= 64 { 182 return ErrIntOverflowKeys 183 } 184 if iNdEx >= l { 185 return io.ErrUnexpectedEOF 186 } 187 b := dAtA[iNdEx] 188 iNdEx++ 189 wire |= uint64(b&0x7F) << shift 190 if b < 0x80 { 191 break 192 } 193 } 194 fieldNum := int32(wire >> 3) 195 wireType := int(wire & 0x7) 196 if wireType == 4 { 197 return fmt.Errorf("proto: LegacyAminoPubKey: wiretype end group for non-group") 198 } 199 if fieldNum <= 0 { 200 return fmt.Errorf("proto: LegacyAminoPubKey: illegal tag %d (wire type %d)", fieldNum, wire) 201 } 202 switch fieldNum { 203 case 1: 204 if wireType != 0 { 205 return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) 206 } 207 m.Threshold = 0 208 for shift := uint(0); ; shift += 7 { 209 if shift >= 64 { 210 return ErrIntOverflowKeys 211 } 212 if iNdEx >= l { 213 return io.ErrUnexpectedEOF 214 } 215 b := dAtA[iNdEx] 216 iNdEx++ 217 m.Threshold |= uint32(b&0x7F) << shift 218 if b < 0x80 { 219 break 220 } 221 } 222 case 2: 223 if wireType != 2 { 224 return fmt.Errorf("proto: wrong wireType = %d for field PubKeys", wireType) 225 } 226 var msglen int 227 for shift := uint(0); ; shift += 7 { 228 if shift >= 64 { 229 return ErrIntOverflowKeys 230 } 231 if iNdEx >= l { 232 return io.ErrUnexpectedEOF 233 } 234 b := dAtA[iNdEx] 235 iNdEx++ 236 msglen |= int(b&0x7F) << shift 237 if b < 0x80 { 238 break 239 } 240 } 241 if msglen < 0 { 242 return ErrInvalidLengthKeys 243 } 244 postIndex := iNdEx + msglen 245 if postIndex < 0 { 246 return ErrInvalidLengthKeys 247 } 248 if postIndex > l { 249 return io.ErrUnexpectedEOF 250 } 251 m.PubKeys = append(m.PubKeys, &types.Any{}) 252 if err := m.PubKeys[len(m.PubKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 253 return err 254 } 255 iNdEx = postIndex 256 default: 257 iNdEx = preIndex 258 skippy, err := skipKeys(dAtA[iNdEx:]) 259 if err != nil { 260 return err 261 } 262 if (skippy < 0) || (iNdEx+skippy) < 0 { 263 return ErrInvalidLengthKeys 264 } 265 if (iNdEx + skippy) > l { 266 return io.ErrUnexpectedEOF 267 } 268 iNdEx += skippy 269 } 270 } 271 272 if iNdEx > l { 273 return io.ErrUnexpectedEOF 274 } 275 return nil 276 } 277 func skipKeys(dAtA []byte) (n int, err error) { 278 l := len(dAtA) 279 iNdEx := 0 280 depth := 0 281 for iNdEx < l { 282 var wire uint64 283 for shift := uint(0); ; shift += 7 { 284 if shift >= 64 { 285 return 0, ErrIntOverflowKeys 286 } 287 if iNdEx >= l { 288 return 0, io.ErrUnexpectedEOF 289 } 290 b := dAtA[iNdEx] 291 iNdEx++ 292 wire |= (uint64(b) & 0x7F) << shift 293 if b < 0x80 { 294 break 295 } 296 } 297 wireType := int(wire & 0x7) 298 switch wireType { 299 case 0: 300 for shift := uint(0); ; shift += 7 { 301 if shift >= 64 { 302 return 0, ErrIntOverflowKeys 303 } 304 if iNdEx >= l { 305 return 0, io.ErrUnexpectedEOF 306 } 307 iNdEx++ 308 if dAtA[iNdEx-1] < 0x80 { 309 break 310 } 311 } 312 case 1: 313 iNdEx += 8 314 case 2: 315 var length int 316 for shift := uint(0); ; shift += 7 { 317 if shift >= 64 { 318 return 0, ErrIntOverflowKeys 319 } 320 if iNdEx >= l { 321 return 0, io.ErrUnexpectedEOF 322 } 323 b := dAtA[iNdEx] 324 iNdEx++ 325 length |= (int(b) & 0x7F) << shift 326 if b < 0x80 { 327 break 328 } 329 } 330 if length < 0 { 331 return 0, ErrInvalidLengthKeys 332 } 333 iNdEx += length 334 case 3: 335 depth++ 336 case 4: 337 if depth == 0 { 338 return 0, ErrUnexpectedEndOfGroupKeys 339 } 340 depth-- 341 case 5: 342 iNdEx += 4 343 default: 344 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 345 } 346 if iNdEx < 0 { 347 return 0, ErrInvalidLengthKeys 348 } 349 if depth == 0 { 350 return iNdEx, nil 351 } 352 } 353 return 0, io.ErrUnexpectedEOF 354 } 355 356 var ( 357 ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") 358 ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") 359 ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") 360 )