github.com/InjectiveLabs/sdk-go@v1.53.0/chain/crypto/ethsecp256k1/keys.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: injective/crypto/v1beta1/ethsecp256k1/keys.proto
     3  
     4  package ethsecp256k1
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
     9  	_ "github.com/cosmos/gogoproto/gogoproto"
    10  	proto "github.com/cosmos/gogoproto/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  // PubKey defines a type alias for an ecdsa.PublicKey that implements
    28  // Tendermint's PubKey interface. It represents the 33-byte compressed public
    29  // key format.
    30  type PubKey struct {
    31  	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    32  }
    33  
    34  func (m *PubKey) Reset()      { *m = PubKey{} }
    35  func (*PubKey) ProtoMessage() {}
    36  func (*PubKey) Descriptor() ([]byte, []int) {
    37  	return fileDescriptor_9e3ee0885e4a981b, []int{0}
    38  }
    39  func (m *PubKey) XXX_Unmarshal(b []byte) error {
    40  	return m.Unmarshal(b)
    41  }
    42  func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    43  	if deterministic {
    44  		return xxx_messageInfo_PubKey.Marshal(b, m, deterministic)
    45  	} else {
    46  		b = b[:cap(b)]
    47  		n, err := m.MarshalToSizedBuffer(b)
    48  		if err != nil {
    49  			return nil, err
    50  		}
    51  		return b[:n], nil
    52  	}
    53  }
    54  func (m *PubKey) XXX_Merge(src proto.Message) {
    55  	xxx_messageInfo_PubKey.Merge(m, src)
    56  }
    57  func (m *PubKey) XXX_Size() int {
    58  	return m.Size()
    59  }
    60  func (m *PubKey) XXX_DiscardUnknown() {
    61  	xxx_messageInfo_PubKey.DiscardUnknown(m)
    62  }
    63  
    64  var xxx_messageInfo_PubKey proto.InternalMessageInfo
    65  
    66  func (m *PubKey) GetKey() []byte {
    67  	if m != nil {
    68  		return m.Key
    69  	}
    70  	return nil
    71  }
    72  
    73  // PrivKey defines a type alias for an ecdsa.PrivateKey that implements
    74  // Tendermint's PrivateKey interface.
    75  type PrivKey struct {
    76  	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    77  }
    78  
    79  func (m *PrivKey) Reset()         { *m = PrivKey{} }
    80  func (m *PrivKey) String() string { return proto.CompactTextString(m) }
    81  func (*PrivKey) ProtoMessage()    {}
    82  func (*PrivKey) Descriptor() ([]byte, []int) {
    83  	return fileDescriptor_9e3ee0885e4a981b, []int{1}
    84  }
    85  func (m *PrivKey) XXX_Unmarshal(b []byte) error {
    86  	return m.Unmarshal(b)
    87  }
    88  func (m *PrivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    89  	if deterministic {
    90  		return xxx_messageInfo_PrivKey.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 *PrivKey) XXX_Merge(src proto.Message) {
   101  	xxx_messageInfo_PrivKey.Merge(m, src)
   102  }
   103  func (m *PrivKey) XXX_Size() int {
   104  	return m.Size()
   105  }
   106  func (m *PrivKey) XXX_DiscardUnknown() {
   107  	xxx_messageInfo_PrivKey.DiscardUnknown(m)
   108  }
   109  
   110  var xxx_messageInfo_PrivKey proto.InternalMessageInfo
   111  
   112  func (m *PrivKey) GetKey() []byte {
   113  	if m != nil {
   114  		return m.Key
   115  	}
   116  	return nil
   117  }
   118  
   119  func init() {
   120  	proto.RegisterType((*PubKey)(nil), "injective.crypto.v1beta1.ethsecp256k1.PubKey")
   121  	proto.RegisterType((*PrivKey)(nil), "injective.crypto.v1beta1.ethsecp256k1.PrivKey")
   122  }
   123  
   124  func init() {
   125  	proto.RegisterFile("injective/crypto/v1beta1/ethsecp256k1/keys.proto", fileDescriptor_9e3ee0885e4a981b)
   126  }
   127  
   128  var fileDescriptor_9e3ee0885e4a981b = []byte{
   129  	// 266 bytes of a gzipped FileDescriptorProto
   130  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc8, 0xcc, 0xcb, 0x4a,
   131  	0x4d, 0x2e, 0xc9, 0x2c, 0x4b, 0xd5, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x2f, 0x33, 0x4c,
   132  	0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0xc9, 0x28, 0x4e, 0x4d, 0x2e, 0x30, 0x32, 0x35, 0xcb,
   133  	0x36, 0xd4, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x85, 0xeb,
   134  	0xd0, 0x83, 0xe8, 0xd0, 0x83, 0xea, 0xd0, 0x43, 0xd6, 0x21, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f,
   135  	0xd6, 0xa1, 0x0f, 0x62, 0x41, 0x34, 0x4b, 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49,
   136  	0x88, 0x90, 0x92, 0x3f, 0x17, 0x5b, 0x40, 0x69, 0x92, 0x77, 0x6a, 0xa5, 0x90, 0x00, 0x17, 0x73,
   137  	0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x88, 0x69, 0x65, 0x3c, 0x63, 0x81,
   138  	0x3c, 0x43, 0xd7, 0xf3, 0x0d, 0x5a, 0x32, 0x08, 0x67, 0x42, 0x14, 0xbb, 0x96, 0x64, 0x04, 0xc3,
   139  	0xec, 0x9a, 0xf4, 0x7c, 0x83, 0x16, 0x67, 0x76, 0x6a, 0x65, 0x7c, 0x5a, 0x66, 0x6a, 0x4e, 0x8a,
   140  	0x92, 0x2f, 0x17, 0x7b, 0x40, 0x51, 0x66, 0x19, 0x76, 0x13, 0x0d, 0x40, 0xa6, 0xc9, 0x22, 0x99,
   141  	0x06, 0x51, 0x89, 0xdb, 0x38, 0xa7, 0xd4, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c,
   142  	0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63,
   143  	0x88, 0xf2, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xf7, 0x84, 0x99,
   144  	0xe8, 0x93, 0x98, 0x54, 0xac, 0x0f, 0x37, 0x5f, 0x37, 0x39, 0xbf, 0x28, 0x15, 0x99, 0x9b, 0x91,
   145  	0x98, 0x99, 0x07, 0x0b, 0x69, 0xe4, 0xf0, 0x4a, 0x62, 0x03, 0x87, 0x86, 0x31, 0x20, 0x00, 0x00,
   146  	0xff, 0xff, 0x33, 0x0e, 0xfe, 0x6b, 0x91, 0x01, 0x00, 0x00,
   147  }
   148  
   149  func (m *PubKey) Marshal() (dAtA []byte, err error) {
   150  	size := m.Size()
   151  	dAtA = make([]byte, size)
   152  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   153  	if err != nil {
   154  		return nil, err
   155  	}
   156  	return dAtA[:n], nil
   157  }
   158  
   159  func (m *PubKey) MarshalTo(dAtA []byte) (int, error) {
   160  	size := m.Size()
   161  	return m.MarshalToSizedBuffer(dAtA[:size])
   162  }
   163  
   164  func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   165  	i := len(dAtA)
   166  	_ = i
   167  	var l int
   168  	_ = l
   169  	if len(m.Key) > 0 {
   170  		i -= len(m.Key)
   171  		copy(dAtA[i:], m.Key)
   172  		i = encodeVarintKeys(dAtA, i, uint64(len(m.Key)))
   173  		i--
   174  		dAtA[i] = 0xa
   175  	}
   176  	return len(dAtA) - i, nil
   177  }
   178  
   179  func (m *PrivKey) Marshal() (dAtA []byte, err error) {
   180  	size := m.Size()
   181  	dAtA = make([]byte, size)
   182  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   183  	if err != nil {
   184  		return nil, err
   185  	}
   186  	return dAtA[:n], nil
   187  }
   188  
   189  func (m *PrivKey) MarshalTo(dAtA []byte) (int, error) {
   190  	size := m.Size()
   191  	return m.MarshalToSizedBuffer(dAtA[:size])
   192  }
   193  
   194  func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   195  	i := len(dAtA)
   196  	_ = i
   197  	var l int
   198  	_ = l
   199  	if len(m.Key) > 0 {
   200  		i -= len(m.Key)
   201  		copy(dAtA[i:], m.Key)
   202  		i = encodeVarintKeys(dAtA, i, uint64(len(m.Key)))
   203  		i--
   204  		dAtA[i] = 0xa
   205  	}
   206  	return len(dAtA) - i, nil
   207  }
   208  
   209  func encodeVarintKeys(dAtA []byte, offset int, v uint64) int {
   210  	offset -= sovKeys(v)
   211  	base := offset
   212  	for v >= 1<<7 {
   213  		dAtA[offset] = uint8(v&0x7f | 0x80)
   214  		v >>= 7
   215  		offset++
   216  	}
   217  	dAtA[offset] = uint8(v)
   218  	return base
   219  }
   220  func (m *PubKey) Size() (n int) {
   221  	if m == nil {
   222  		return 0
   223  	}
   224  	var l int
   225  	_ = l
   226  	l = len(m.Key)
   227  	if l > 0 {
   228  		n += 1 + l + sovKeys(uint64(l))
   229  	}
   230  	return n
   231  }
   232  
   233  func (m *PrivKey) Size() (n int) {
   234  	if m == nil {
   235  		return 0
   236  	}
   237  	var l int
   238  	_ = l
   239  	l = len(m.Key)
   240  	if l > 0 {
   241  		n += 1 + l + sovKeys(uint64(l))
   242  	}
   243  	return n
   244  }
   245  
   246  func sovKeys(x uint64) (n int) {
   247  	return (math_bits.Len64(x|1) + 6) / 7
   248  }
   249  func sozKeys(x uint64) (n int) {
   250  	return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   251  }
   252  func (m *PubKey) Unmarshal(dAtA []byte) error {
   253  	l := len(dAtA)
   254  	iNdEx := 0
   255  	for iNdEx < l {
   256  		preIndex := iNdEx
   257  		var wire uint64
   258  		for shift := uint(0); ; shift += 7 {
   259  			if shift >= 64 {
   260  				return ErrIntOverflowKeys
   261  			}
   262  			if iNdEx >= l {
   263  				return io.ErrUnexpectedEOF
   264  			}
   265  			b := dAtA[iNdEx]
   266  			iNdEx++
   267  			wire |= uint64(b&0x7F) << shift
   268  			if b < 0x80 {
   269  				break
   270  			}
   271  		}
   272  		fieldNum := int32(wire >> 3)
   273  		wireType := int(wire & 0x7)
   274  		if wireType == 4 {
   275  			return fmt.Errorf("proto: PubKey: wiretype end group for non-group")
   276  		}
   277  		if fieldNum <= 0 {
   278  			return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire)
   279  		}
   280  		switch fieldNum {
   281  		case 1:
   282  			if wireType != 2 {
   283  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
   284  			}
   285  			var byteLen int
   286  			for shift := uint(0); ; shift += 7 {
   287  				if shift >= 64 {
   288  					return ErrIntOverflowKeys
   289  				}
   290  				if iNdEx >= l {
   291  					return io.ErrUnexpectedEOF
   292  				}
   293  				b := dAtA[iNdEx]
   294  				iNdEx++
   295  				byteLen |= int(b&0x7F) << shift
   296  				if b < 0x80 {
   297  					break
   298  				}
   299  			}
   300  			if byteLen < 0 {
   301  				return ErrInvalidLengthKeys
   302  			}
   303  			postIndex := iNdEx + byteLen
   304  			if postIndex < 0 {
   305  				return ErrInvalidLengthKeys
   306  			}
   307  			if postIndex > l {
   308  				return io.ErrUnexpectedEOF
   309  			}
   310  			m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
   311  			if m.Key == nil {
   312  				m.Key = []byte{}
   313  			}
   314  			iNdEx = postIndex
   315  		default:
   316  			iNdEx = preIndex
   317  			skippy, err := skipKeys(dAtA[iNdEx:])
   318  			if err != nil {
   319  				return err
   320  			}
   321  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   322  				return ErrInvalidLengthKeys
   323  			}
   324  			if (iNdEx + skippy) > l {
   325  				return io.ErrUnexpectedEOF
   326  			}
   327  			iNdEx += skippy
   328  		}
   329  	}
   330  
   331  	if iNdEx > l {
   332  		return io.ErrUnexpectedEOF
   333  	}
   334  	return nil
   335  }
   336  func (m *PrivKey) Unmarshal(dAtA []byte) error {
   337  	l := len(dAtA)
   338  	iNdEx := 0
   339  	for iNdEx < l {
   340  		preIndex := iNdEx
   341  		var wire uint64
   342  		for shift := uint(0); ; shift += 7 {
   343  			if shift >= 64 {
   344  				return ErrIntOverflowKeys
   345  			}
   346  			if iNdEx >= l {
   347  				return io.ErrUnexpectedEOF
   348  			}
   349  			b := dAtA[iNdEx]
   350  			iNdEx++
   351  			wire |= uint64(b&0x7F) << shift
   352  			if b < 0x80 {
   353  				break
   354  			}
   355  		}
   356  		fieldNum := int32(wire >> 3)
   357  		wireType := int(wire & 0x7)
   358  		if wireType == 4 {
   359  			return fmt.Errorf("proto: PrivKey: wiretype end group for non-group")
   360  		}
   361  		if fieldNum <= 0 {
   362  			return fmt.Errorf("proto: PrivKey: illegal tag %d (wire type %d)", fieldNum, wire)
   363  		}
   364  		switch fieldNum {
   365  		case 1:
   366  			if wireType != 2 {
   367  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
   368  			}
   369  			var byteLen int
   370  			for shift := uint(0); ; shift += 7 {
   371  				if shift >= 64 {
   372  					return ErrIntOverflowKeys
   373  				}
   374  				if iNdEx >= l {
   375  					return io.ErrUnexpectedEOF
   376  				}
   377  				b := dAtA[iNdEx]
   378  				iNdEx++
   379  				byteLen |= int(b&0x7F) << shift
   380  				if b < 0x80 {
   381  					break
   382  				}
   383  			}
   384  			if byteLen < 0 {
   385  				return ErrInvalidLengthKeys
   386  			}
   387  			postIndex := iNdEx + byteLen
   388  			if postIndex < 0 {
   389  				return ErrInvalidLengthKeys
   390  			}
   391  			if postIndex > l {
   392  				return io.ErrUnexpectedEOF
   393  			}
   394  			m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
   395  			if m.Key == nil {
   396  				m.Key = []byte{}
   397  			}
   398  			iNdEx = postIndex
   399  		default:
   400  			iNdEx = preIndex
   401  			skippy, err := skipKeys(dAtA[iNdEx:])
   402  			if err != nil {
   403  				return err
   404  			}
   405  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   406  				return ErrInvalidLengthKeys
   407  			}
   408  			if (iNdEx + skippy) > l {
   409  				return io.ErrUnexpectedEOF
   410  			}
   411  			iNdEx += skippy
   412  		}
   413  	}
   414  
   415  	if iNdEx > l {
   416  		return io.ErrUnexpectedEOF
   417  	}
   418  	return nil
   419  }
   420  func skipKeys(dAtA []byte) (n int, err error) {
   421  	l := len(dAtA)
   422  	iNdEx := 0
   423  	depth := 0
   424  	for iNdEx < l {
   425  		var wire uint64
   426  		for shift := uint(0); ; shift += 7 {
   427  			if shift >= 64 {
   428  				return 0, ErrIntOverflowKeys
   429  			}
   430  			if iNdEx >= l {
   431  				return 0, io.ErrUnexpectedEOF
   432  			}
   433  			b := dAtA[iNdEx]
   434  			iNdEx++
   435  			wire |= (uint64(b) & 0x7F) << shift
   436  			if b < 0x80 {
   437  				break
   438  			}
   439  		}
   440  		wireType := int(wire & 0x7)
   441  		switch wireType {
   442  		case 0:
   443  			for shift := uint(0); ; shift += 7 {
   444  				if shift >= 64 {
   445  					return 0, ErrIntOverflowKeys
   446  				}
   447  				if iNdEx >= l {
   448  					return 0, io.ErrUnexpectedEOF
   449  				}
   450  				iNdEx++
   451  				if dAtA[iNdEx-1] < 0x80 {
   452  					break
   453  				}
   454  			}
   455  		case 1:
   456  			iNdEx += 8
   457  		case 2:
   458  			var length int
   459  			for shift := uint(0); ; shift += 7 {
   460  				if shift >= 64 {
   461  					return 0, ErrIntOverflowKeys
   462  				}
   463  				if iNdEx >= l {
   464  					return 0, io.ErrUnexpectedEOF
   465  				}
   466  				b := dAtA[iNdEx]
   467  				iNdEx++
   468  				length |= (int(b) & 0x7F) << shift
   469  				if b < 0x80 {
   470  					break
   471  				}
   472  			}
   473  			if length < 0 {
   474  				return 0, ErrInvalidLengthKeys
   475  			}
   476  			iNdEx += length
   477  		case 3:
   478  			depth++
   479  		case 4:
   480  			if depth == 0 {
   481  				return 0, ErrUnexpectedEndOfGroupKeys
   482  			}
   483  			depth--
   484  		case 5:
   485  			iNdEx += 4
   486  		default:
   487  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   488  		}
   489  		if iNdEx < 0 {
   490  			return 0, ErrInvalidLengthKeys
   491  		}
   492  		if depth == 0 {
   493  			return iNdEx, nil
   494  		}
   495  	}
   496  	return 0, io.ErrUnexpectedEOF
   497  }
   498  
   499  var (
   500  	ErrInvalidLengthKeys        = fmt.Errorf("proto: negative length found during unmarshaling")
   501  	ErrIntOverflowKeys          = fmt.Errorf("proto: integer overflow")
   502  	ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group")
   503  )