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