github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/auth/ibc-tx/internal/ethsecp256k1/keys.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: ethermint/crypto/v1/ethsecp256k1/keys.proto
     3  
     4  package ethsecp256k1
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // PubKey defines a type alias for an ecdsa.PublicKey that implements
    27  // Tendermint's PubKey interface. It represents the 33-byte compressed public
    28  // key format.
    29  type PubKey struct {
    30  	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    31  }
    32  
    33  func (m *PubKey) Reset()      { *m = PubKey{} }
    34  func (*PubKey) ProtoMessage() {}
    35  func (*PubKey) Descriptor() ([]byte, []int) {
    36  	return fileDescriptor_0c10cadcf35beb64, []int{0}
    37  }
    38  func (m *PubKey) XXX_Unmarshal(b []byte) error {
    39  	return m.Unmarshal(b)
    40  }
    41  func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    42  	if deterministic {
    43  		return xxx_messageInfo_PubKey.Marshal(b, m, deterministic)
    44  	} else {
    45  		b = b[:cap(b)]
    46  		n, err := m.MarshalToSizedBuffer(b)
    47  		if err != nil {
    48  			return nil, err
    49  		}
    50  		return b[:n], nil
    51  	}
    52  }
    53  func (m *PubKey) XXX_Merge(src proto.Message) {
    54  	xxx_messageInfo_PubKey.Merge(m, src)
    55  }
    56  func (m *PubKey) XXX_Size() int {
    57  	return m.Size()
    58  }
    59  func (m *PubKey) XXX_DiscardUnknown() {
    60  	xxx_messageInfo_PubKey.DiscardUnknown(m)
    61  }
    62  
    63  var xxx_messageInfo_PubKey proto.InternalMessageInfo
    64  
    65  func (m *PubKey) GetKey() []byte {
    66  	if m != nil {
    67  		return m.Key
    68  	}
    69  	return nil
    70  }
    71  
    72  // PrivKey defines a type alias for an ecdsa.PrivateKey that implements
    73  // Tendermint's PrivateKey interface.
    74  type PrivKey struct {
    75  	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    76  }
    77  
    78  func (m *PrivKey) Reset()         { *m = PrivKey{} }
    79  func (m *PrivKey) String() string { return proto.CompactTextString(m) }
    80  func (*PrivKey) ProtoMessage()    {}
    81  func (*PrivKey) Descriptor() ([]byte, []int) {
    82  	return fileDescriptor_0c10cadcf35beb64, []int{1}
    83  }
    84  func (m *PrivKey) XXX_Unmarshal(b []byte) error {
    85  	return m.Unmarshal(b)
    86  }
    87  func (m *PrivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    88  	if deterministic {
    89  		return xxx_messageInfo_PrivKey.Marshal(b, m, deterministic)
    90  	} else {
    91  		b = b[:cap(b)]
    92  		n, err := m.MarshalToSizedBuffer(b)
    93  		if err != nil {
    94  			return nil, err
    95  		}
    96  		return b[:n], nil
    97  	}
    98  }
    99  func (m *PrivKey) XXX_Merge(src proto.Message) {
   100  	xxx_messageInfo_PrivKey.Merge(m, src)
   101  }
   102  func (m *PrivKey) XXX_Size() int {
   103  	return m.Size()
   104  }
   105  func (m *PrivKey) XXX_DiscardUnknown() {
   106  	xxx_messageInfo_PrivKey.DiscardUnknown(m)
   107  }
   108  
   109  var xxx_messageInfo_PrivKey proto.InternalMessageInfo
   110  
   111  func (m *PrivKey) GetKey() []byte {
   112  	if m != nil {
   113  		return m.Key
   114  	}
   115  	return nil
   116  }
   117  
   118  func init() {
   119  	proto.RegisterType((*PubKey)(nil), "ethermint.crypto.v1.ethsecp256k1.PubKey")
   120  	proto.RegisterType((*PrivKey)(nil), "ethermint.crypto.v1.ethsecp256k1.PrivKey")
   121  }
   122  
   123  func init() {
   124  	proto.RegisterFile("ethermint/crypto/v1/ethsecp256k1/keys.proto", fileDescriptor_0c10cadcf35beb64)
   125  }
   126  
   127  var fileDescriptor_0c10cadcf35beb64 = []byte{
   128  	// 196 bytes of a gzipped FileDescriptorProto
   129  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0x2d, 0xc9, 0x48,
   130  	0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x2f, 0x33, 0xd4,
   131  	0x4f, 0x2d, 0xc9, 0x28, 0x4e, 0x4d, 0x2e, 0x30, 0x32, 0x35, 0xcb, 0x36, 0xd4, 0xcf, 0x4e, 0xad,
   132  	0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x80, 0x2b, 0xd6, 0x83, 0x28, 0xd6, 0x2b,
   133  	0x33, 0xd4, 0x43, 0x56, 0x2c, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xac, 0x0f, 0x62, 0x41,
   134  	0xf4, 0x29, 0x29, 0x70, 0xb1, 0x05, 0x94, 0x26, 0x79, 0xa7, 0x56, 0x0a, 0x09, 0x70, 0x31, 0x67,
   135  	0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x81, 0x98, 0x56, 0x2c, 0x33, 0x16, 0xc8,
   136  	0x33, 0x28, 0x49, 0x73, 0xb1, 0x07, 0x14, 0x65, 0x96, 0x61, 0x55, 0xe2, 0xe4, 0x75, 0xe2, 0x91,
   137  	0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1,
   138  	0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x06, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a,
   139  	0xc9, 0xf9, 0xb9, 0xfa, 0x25, 0x19, 0x89, 0x45, 0xc5, 0x99, 0xc5, 0xfa, 0x18, 0x1e, 0x42, 0x76,
   140  	0x60, 0x12, 0x1b, 0xd8, 0x45, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x43, 0x53, 0xb8,
   141  	0xf8, 0x00, 0x00, 0x00,
   142  }
   143  
   144  func (m *PubKey) Marshal() (dAtA []byte, err error) {
   145  	size := m.Size()
   146  	dAtA = make([]byte, size)
   147  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   148  	if err != nil {
   149  		return nil, err
   150  	}
   151  	return dAtA[:n], nil
   152  }
   153  
   154  func (m *PubKey) MarshalTo(dAtA []byte) (int, error) {
   155  	size := m.Size()
   156  	return m.MarshalToSizedBuffer(dAtA[:size])
   157  }
   158  
   159  func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   160  	i := len(dAtA)
   161  	_ = i
   162  	var l int
   163  	_ = l
   164  	if len(m.Key) > 0 {
   165  		i -= len(m.Key)
   166  		copy(dAtA[i:], m.Key)
   167  		i = encodeVarintKeys(dAtA, i, uint64(len(m.Key)))
   168  		i--
   169  		dAtA[i] = 0xa
   170  	}
   171  	return len(dAtA) - i, nil
   172  }
   173  
   174  func (m *PrivKey) Marshal() (dAtA []byte, err error) {
   175  	size := m.Size()
   176  	dAtA = make([]byte, size)
   177  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   178  	if err != nil {
   179  		return nil, err
   180  	}
   181  	return dAtA[:n], nil
   182  }
   183  
   184  func (m *PrivKey) MarshalTo(dAtA []byte) (int, error) {
   185  	size := m.Size()
   186  	return m.MarshalToSizedBuffer(dAtA[:size])
   187  }
   188  
   189  func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   190  	i := len(dAtA)
   191  	_ = i
   192  	var l int
   193  	_ = l
   194  	if len(m.Key) > 0 {
   195  		i -= len(m.Key)
   196  		copy(dAtA[i:], m.Key)
   197  		i = encodeVarintKeys(dAtA, i, uint64(len(m.Key)))
   198  		i--
   199  		dAtA[i] = 0xa
   200  	}
   201  	return len(dAtA) - i, nil
   202  }
   203  
   204  func encodeVarintKeys(dAtA []byte, offset int, v uint64) int {
   205  	offset -= sovKeys(v)
   206  	base := offset
   207  	for v >= 1<<7 {
   208  		dAtA[offset] = uint8(v&0x7f | 0x80)
   209  		v >>= 7
   210  		offset++
   211  	}
   212  	dAtA[offset] = uint8(v)
   213  	return base
   214  }
   215  func (m *PubKey) Size() (n int) {
   216  	if m == nil {
   217  		return 0
   218  	}
   219  	var l int
   220  	_ = l
   221  	l = len(m.Key)
   222  	if l > 0 {
   223  		n += 1 + l + sovKeys(uint64(l))
   224  	}
   225  	return n
   226  }
   227  
   228  func (m *PrivKey) Size() (n int) {
   229  	if m == nil {
   230  		return 0
   231  	}
   232  	var l int
   233  	_ = l
   234  	l = len(m.Key)
   235  	if l > 0 {
   236  		n += 1 + l + sovKeys(uint64(l))
   237  	}
   238  	return n
   239  }
   240  
   241  func sovKeys(x uint64) (n int) {
   242  	return (math_bits.Len64(x|1) + 6) / 7
   243  }
   244  func sozKeys(x uint64) (n int) {
   245  	return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   246  }
   247  func (m *PubKey) Unmarshal(dAtA []byte) error {
   248  	l := len(dAtA)
   249  	iNdEx := 0
   250  	for iNdEx < l {
   251  		preIndex := iNdEx
   252  		var wire uint64
   253  		for shift := uint(0); ; shift += 7 {
   254  			if shift >= 64 {
   255  				return ErrIntOverflowKeys
   256  			}
   257  			if iNdEx >= l {
   258  				return io.ErrUnexpectedEOF
   259  			}
   260  			b := dAtA[iNdEx]
   261  			iNdEx++
   262  			wire |= uint64(b&0x7F) << shift
   263  			if b < 0x80 {
   264  				break
   265  			}
   266  		}
   267  		fieldNum := int32(wire >> 3)
   268  		wireType := int(wire & 0x7)
   269  		if wireType == 4 {
   270  			return fmt.Errorf("proto: PubKey: wiretype end group for non-group")
   271  		}
   272  		if fieldNum <= 0 {
   273  			return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire)
   274  		}
   275  		switch fieldNum {
   276  		case 1:
   277  			if wireType != 2 {
   278  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
   279  			}
   280  			var byteLen int
   281  			for shift := uint(0); ; shift += 7 {
   282  				if shift >= 64 {
   283  					return ErrIntOverflowKeys
   284  				}
   285  				if iNdEx >= l {
   286  					return io.ErrUnexpectedEOF
   287  				}
   288  				b := dAtA[iNdEx]
   289  				iNdEx++
   290  				byteLen |= int(b&0x7F) << shift
   291  				if b < 0x80 {
   292  					break
   293  				}
   294  			}
   295  			if byteLen < 0 {
   296  				return ErrInvalidLengthKeys
   297  			}
   298  			postIndex := iNdEx + byteLen
   299  			if postIndex < 0 {
   300  				return ErrInvalidLengthKeys
   301  			}
   302  			if postIndex > l {
   303  				return io.ErrUnexpectedEOF
   304  			}
   305  			m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
   306  			if m.Key == nil {
   307  				m.Key = []byte{}
   308  			}
   309  			iNdEx = postIndex
   310  		default:
   311  			iNdEx = preIndex
   312  			skippy, err := skipKeys(dAtA[iNdEx:])
   313  			if err != nil {
   314  				return err
   315  			}
   316  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   317  				return ErrInvalidLengthKeys
   318  			}
   319  			if (iNdEx + skippy) > l {
   320  				return io.ErrUnexpectedEOF
   321  			}
   322  			iNdEx += skippy
   323  		}
   324  	}
   325  
   326  	if iNdEx > l {
   327  		return io.ErrUnexpectedEOF
   328  	}
   329  	return nil
   330  }
   331  func (m *PrivKey) Unmarshal(dAtA []byte) error {
   332  	l := len(dAtA)
   333  	iNdEx := 0
   334  	for iNdEx < l {
   335  		preIndex := iNdEx
   336  		var wire uint64
   337  		for shift := uint(0); ; shift += 7 {
   338  			if shift >= 64 {
   339  				return ErrIntOverflowKeys
   340  			}
   341  			if iNdEx >= l {
   342  				return io.ErrUnexpectedEOF
   343  			}
   344  			b := dAtA[iNdEx]
   345  			iNdEx++
   346  			wire |= uint64(b&0x7F) << shift
   347  			if b < 0x80 {
   348  				break
   349  			}
   350  		}
   351  		fieldNum := int32(wire >> 3)
   352  		wireType := int(wire & 0x7)
   353  		if wireType == 4 {
   354  			return fmt.Errorf("proto: PrivKey: wiretype end group for non-group")
   355  		}
   356  		if fieldNum <= 0 {
   357  			return fmt.Errorf("proto: PrivKey: illegal tag %d (wire type %d)", fieldNum, wire)
   358  		}
   359  		switch fieldNum {
   360  		case 1:
   361  			if wireType != 2 {
   362  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
   363  			}
   364  			var byteLen int
   365  			for shift := uint(0); ; shift += 7 {
   366  				if shift >= 64 {
   367  					return ErrIntOverflowKeys
   368  				}
   369  				if iNdEx >= l {
   370  					return io.ErrUnexpectedEOF
   371  				}
   372  				b := dAtA[iNdEx]
   373  				iNdEx++
   374  				byteLen |= int(b&0x7F) << shift
   375  				if b < 0x80 {
   376  					break
   377  				}
   378  			}
   379  			if byteLen < 0 {
   380  				return ErrInvalidLengthKeys
   381  			}
   382  			postIndex := iNdEx + byteLen
   383  			if postIndex < 0 {
   384  				return ErrInvalidLengthKeys
   385  			}
   386  			if postIndex > l {
   387  				return io.ErrUnexpectedEOF
   388  			}
   389  			m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
   390  			if m.Key == nil {
   391  				m.Key = []byte{}
   392  			}
   393  			iNdEx = postIndex
   394  		default:
   395  			iNdEx = preIndex
   396  			skippy, err := skipKeys(dAtA[iNdEx:])
   397  			if err != nil {
   398  				return err
   399  			}
   400  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   401  				return ErrInvalidLengthKeys
   402  			}
   403  			if (iNdEx + skippy) > l {
   404  				return io.ErrUnexpectedEOF
   405  			}
   406  			iNdEx += skippy
   407  		}
   408  	}
   409  
   410  	if iNdEx > l {
   411  		return io.ErrUnexpectedEOF
   412  	}
   413  	return nil
   414  }
   415  func skipKeys(dAtA []byte) (n int, err error) {
   416  	l := len(dAtA)
   417  	iNdEx := 0
   418  	depth := 0
   419  	for iNdEx < l {
   420  		var wire uint64
   421  		for shift := uint(0); ; shift += 7 {
   422  			if shift >= 64 {
   423  				return 0, ErrIntOverflowKeys
   424  			}
   425  			if iNdEx >= l {
   426  				return 0, io.ErrUnexpectedEOF
   427  			}
   428  			b := dAtA[iNdEx]
   429  			iNdEx++
   430  			wire |= (uint64(b) & 0x7F) << shift
   431  			if b < 0x80 {
   432  				break
   433  			}
   434  		}
   435  		wireType := int(wire & 0x7)
   436  		switch wireType {
   437  		case 0:
   438  			for shift := uint(0); ; shift += 7 {
   439  				if shift >= 64 {
   440  					return 0, ErrIntOverflowKeys
   441  				}
   442  				if iNdEx >= l {
   443  					return 0, io.ErrUnexpectedEOF
   444  				}
   445  				iNdEx++
   446  				if dAtA[iNdEx-1] < 0x80 {
   447  					break
   448  				}
   449  			}
   450  		case 1:
   451  			iNdEx += 8
   452  		case 2:
   453  			var length int
   454  			for shift := uint(0); ; shift += 7 {
   455  				if shift >= 64 {
   456  					return 0, ErrIntOverflowKeys
   457  				}
   458  				if iNdEx >= l {
   459  					return 0, io.ErrUnexpectedEOF
   460  				}
   461  				b := dAtA[iNdEx]
   462  				iNdEx++
   463  				length |= (int(b) & 0x7F) << shift
   464  				if b < 0x80 {
   465  					break
   466  				}
   467  			}
   468  			if length < 0 {
   469  				return 0, ErrInvalidLengthKeys
   470  			}
   471  			iNdEx += length
   472  		case 3:
   473  			depth++
   474  		case 4:
   475  			if depth == 0 {
   476  				return 0, ErrUnexpectedEndOfGroupKeys
   477  			}
   478  			depth--
   479  		case 5:
   480  			iNdEx += 4
   481  		default:
   482  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   483  		}
   484  		if iNdEx < 0 {
   485  			return 0, ErrInvalidLengthKeys
   486  		}
   487  		if depth == 0 {
   488  			return iNdEx, nil
   489  		}
   490  	}
   491  	return 0, io.ErrUnexpectedEOF
   492  }
   493  
   494  var (
   495  	ErrInvalidLengthKeys        = fmt.Errorf("proto: negative length found during unmarshaling")
   496  	ErrIntOverflowKeys          = fmt.Errorf("proto: integer overflow")
   497  	ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group")
   498  )