Co-authored-by: unknown unknown <unknown@unknown> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
741 lines
18 KiB
Go
741 lines
18 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: cosmos/accounts/testing/rotation/v1/partial.proto
|
|
|
|
package v1
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "github.com/cosmos/gogoproto/proto"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// MsgInit is the init message used to create a new account
|
|
// abstraction implementation that we use for testing, this account
|
|
// also allows for rotating the public key.
|
|
type MsgInit struct {
|
|
PubKeyBytes []byte `protobuf:"bytes,1,opt,name=pub_key_bytes,json=pubKeyBytes,proto3" json:"pub_key_bytes,omitempty"`
|
|
}
|
|
|
|
func (m *MsgInit) Reset() { *m = MsgInit{} }
|
|
func (m *MsgInit) String() string { return proto.CompactTextString(m) }
|
|
func (*MsgInit) ProtoMessage() {}
|
|
func (*MsgInit) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825607d6750dcaf0, []int{0}
|
|
}
|
|
func (m *MsgInit) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MsgInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MsgInit.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MsgInit) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MsgInit.Merge(m, src)
|
|
}
|
|
func (m *MsgInit) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MsgInit) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MsgInit.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MsgInit proto.InternalMessageInfo
|
|
|
|
func (m *MsgInit) GetPubKeyBytes() []byte {
|
|
if m != nil {
|
|
return m.PubKeyBytes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// MsgInitResponse is the init message response.
|
|
type MsgInitResponse struct {
|
|
}
|
|
|
|
func (m *MsgInitResponse) Reset() { *m = MsgInitResponse{} }
|
|
func (m *MsgInitResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*MsgInitResponse) ProtoMessage() {}
|
|
func (*MsgInitResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825607d6750dcaf0, []int{1}
|
|
}
|
|
func (m *MsgInitResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MsgInitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MsgInitResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MsgInitResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MsgInitResponse.Merge(m, src)
|
|
}
|
|
func (m *MsgInitResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MsgInitResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MsgInitResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MsgInitResponse proto.InternalMessageInfo
|
|
|
|
// MsgRotatePubKey is the message used to swap the public key
|
|
// of the account.
|
|
type MsgRotatePubKey struct {
|
|
NewPubKeyBytes []byte `protobuf:"bytes,1,opt,name=new_pub_key_bytes,json=newPubKeyBytes,proto3" json:"new_pub_key_bytes,omitempty"`
|
|
}
|
|
|
|
func (m *MsgRotatePubKey) Reset() { *m = MsgRotatePubKey{} }
|
|
func (m *MsgRotatePubKey) String() string { return proto.CompactTextString(m) }
|
|
func (*MsgRotatePubKey) ProtoMessage() {}
|
|
func (*MsgRotatePubKey) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825607d6750dcaf0, []int{2}
|
|
}
|
|
func (m *MsgRotatePubKey) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MsgRotatePubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MsgRotatePubKey.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MsgRotatePubKey) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MsgRotatePubKey.Merge(m, src)
|
|
}
|
|
func (m *MsgRotatePubKey) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MsgRotatePubKey) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MsgRotatePubKey.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MsgRotatePubKey proto.InternalMessageInfo
|
|
|
|
func (m *MsgRotatePubKey) GetNewPubKeyBytes() []byte {
|
|
if m != nil {
|
|
return m.NewPubKeyBytes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// MsgRotatePubKeyResponse is the MsgRotatePubKey response.
|
|
type MsgRotatePubKeyResponse struct {
|
|
}
|
|
|
|
func (m *MsgRotatePubKeyResponse) Reset() { *m = MsgRotatePubKeyResponse{} }
|
|
func (m *MsgRotatePubKeyResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*MsgRotatePubKeyResponse) ProtoMessage() {}
|
|
func (*MsgRotatePubKeyResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_825607d6750dcaf0, []int{3}
|
|
}
|
|
func (m *MsgRotatePubKeyResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *MsgRotatePubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_MsgRotatePubKeyResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *MsgRotatePubKeyResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_MsgRotatePubKeyResponse.Merge(m, src)
|
|
}
|
|
func (m *MsgRotatePubKeyResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *MsgRotatePubKeyResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_MsgRotatePubKeyResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_MsgRotatePubKeyResponse proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*MsgInit)(nil), "cosmos.accounts.testing.rotation.v1.MsgInit")
|
|
proto.RegisterType((*MsgInitResponse)(nil), "cosmos.accounts.testing.rotation.v1.MsgInitResponse")
|
|
proto.RegisterType((*MsgRotatePubKey)(nil), "cosmos.accounts.testing.rotation.v1.MsgRotatePubKey")
|
|
proto.RegisterType((*MsgRotatePubKeyResponse)(nil), "cosmos.accounts.testing.rotation.v1.MsgRotatePubKeyResponse")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("cosmos/accounts/testing/rotation/v1/partial.proto", fileDescriptor_825607d6750dcaf0)
|
|
}
|
|
|
|
var fileDescriptor_825607d6750dcaf0 = []byte{
|
|
// 234 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4c, 0xce, 0x2f, 0xce,
|
|
0xcd, 0x2f, 0xd6, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e,
|
|
0xc9, 0xcc, 0x4b, 0xd7, 0x2f, 0xca, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0xd4,
|
|
0x2f, 0x48, 0x2c, 0x2a, 0xc9, 0x4c, 0xcc, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x86,
|
|
0x68, 0xd1, 0x83, 0x69, 0xd1, 0x83, 0x6a, 0xd1, 0x83, 0x69, 0xd1, 0x2b, 0x33, 0x54, 0xd2, 0xe5,
|
|
0x62, 0xf7, 0x2d, 0x4e, 0xf7, 0xcc, 0xcb, 0x2c, 0x11, 0x52, 0xe2, 0xe2, 0x2d, 0x28, 0x4d, 0x8a,
|
|
0xcf, 0x4e, 0xad, 0x8c, 0x4f, 0xaa, 0x2c, 0x49, 0x2d, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09,
|
|
0xe2, 0x2e, 0x28, 0x4d, 0xf2, 0x4e, 0xad, 0x74, 0x02, 0x09, 0x29, 0x09, 0x72, 0xf1, 0x43, 0x95,
|
|
0x07, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x2a, 0xd9, 0x80, 0x85, 0x82, 0x40, 0x66, 0xa6,
|
|
0x06, 0x80, 0x95, 0x0a, 0x69, 0x72, 0x09, 0xe6, 0xa5, 0x96, 0xc7, 0x63, 0x33, 0x8d, 0x2f, 0x2f,
|
|
0xb5, 0x3c, 0x00, 0xc9, 0x40, 0x49, 0x2e, 0x71, 0x34, 0xdd, 0x30, 0x83, 0x9d, 0x5c, 0x4f, 0x3c,
|
|
0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e,
|
|
0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x1b, 0xe2, 0xb3, 0xe2, 0x94, 0x6c, 0xbd,
|
|
0xcc, 0x7c, 0xfd, 0x0a, 0xbc, 0x81, 0x92, 0xc4, 0x06, 0x0e, 0x0d, 0x63, 0x40, 0x00, 0x00, 0x00,
|
|
0xff, 0xff, 0x81, 0xbb, 0x18, 0xec, 0x42, 0x01, 0x00, 0x00,
|
|
}
|
|
|
|
func (m *MsgInit) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MsgInit) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MsgInit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.PubKeyBytes) > 0 {
|
|
i -= len(m.PubKeyBytes)
|
|
copy(dAtA[i:], m.PubKeyBytes)
|
|
i = encodeVarintPartial(dAtA, i, uint64(len(m.PubKeyBytes)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *MsgInitResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MsgInitResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MsgInitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *MsgRotatePubKey) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MsgRotatePubKey) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MsgRotatePubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.NewPubKeyBytes) > 0 {
|
|
i -= len(m.NewPubKeyBytes)
|
|
copy(dAtA[i:], m.NewPubKeyBytes)
|
|
i = encodeVarintPartial(dAtA, i, uint64(len(m.NewPubKeyBytes)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *MsgRotatePubKeyResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *MsgRotatePubKeyResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *MsgRotatePubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintPartial(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovPartial(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *MsgInit) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.PubKeyBytes)
|
|
if l > 0 {
|
|
n += 1 + l + sovPartial(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *MsgInitResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
return n
|
|
}
|
|
|
|
func (m *MsgRotatePubKey) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.NewPubKeyBytes)
|
|
if l > 0 {
|
|
n += 1 + l + sovPartial(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *MsgRotatePubKeyResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
return n
|
|
}
|
|
|
|
func sovPartial(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozPartial(x uint64) (n int) {
|
|
return sovPartial(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *MsgInit) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MsgInit: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MsgInit: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PubKeyBytes", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.PubKeyBytes = append(m.PubKeyBytes[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.PubKeyBytes == nil {
|
|
m.PubKeyBytes = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPartial(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MsgInitResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MsgInitResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MsgInitResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPartial(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MsgRotatePubKey) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MsgRotatePubKey: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MsgRotatePubKey: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NewPubKeyBytes", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NewPubKeyBytes = append(m.NewPubKeyBytes[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.NewPubKeyBytes == nil {
|
|
m.NewPubKeyBytes = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPartial(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *MsgRotatePubKeyResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: MsgRotatePubKeyResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: MsgRotatePubKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipPartial(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthPartial
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipPartial(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowPartial
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthPartial
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupPartial
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthPartial
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthPartial = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowPartial = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupPartial = fmt.Errorf("proto: unexpected end of group")
|
|
)
|