// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/validator/accounts/v2/keymanager.proto package ethereum_validator_accounts_v2 import ( context "context" fmt "fmt" proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" 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 type SignResponse_Status int32 const ( SignResponse_UNKNOWN SignResponse_Status = 0 SignResponse_SUCCEEDED SignResponse_Status = 1 SignResponse_DENIED SignResponse_Status = 2 SignResponse_FAILED SignResponse_Status = 3 ) var SignResponse_Status_name = map[int32]string{ 0: "UNKNOWN", 1: "SUCCEEDED", 2: "DENIED", 3: "FAILED", } var SignResponse_Status_value = map[string]int32{ "UNKNOWN": 0, "SUCCEEDED": 1, "DENIED": 2, "FAILED": 3, } func (x SignResponse_Status) String() string { return proto.EnumName(SignResponse_Status_name, int32(x)) } func (SignResponse_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor_795e98bd0a473d79, []int{2, 0} } type ListPublicKeysResponse struct { ValidatingPublicKeys [][]byte `protobuf:"bytes,2,rep,name=validating_public_keys,json=validatingPublicKeys,proto3" json:"validating_public_keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *ListPublicKeysResponse) Reset() { *m = ListPublicKeysResponse{} } func (m *ListPublicKeysResponse) String() string { return proto.CompactTextString(m) } func (*ListPublicKeysResponse) ProtoMessage() {} func (*ListPublicKeysResponse) Descriptor() ([]byte, []int) { return fileDescriptor_795e98bd0a473d79, []int{0} } func (m *ListPublicKeysResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ListPublicKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ListPublicKeysResponse.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 *ListPublicKeysResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_ListPublicKeysResponse.Merge(m, src) } func (m *ListPublicKeysResponse) XXX_Size() int { return m.Size() } func (m *ListPublicKeysResponse) XXX_DiscardUnknown() { xxx_messageInfo_ListPublicKeysResponse.DiscardUnknown(m) } var xxx_messageInfo_ListPublicKeysResponse proto.InternalMessageInfo func (m *ListPublicKeysResponse) GetValidatingPublicKeys() [][]byte { if m != nil { return m.ValidatingPublicKeys } return nil } type SignRequest struct { PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` SigningRoot []byte `protobuf:"bytes,2,opt,name=signing_root,json=signingRoot,proto3" json:"signing_root,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *SignRequest) Reset() { *m = SignRequest{} } func (m *SignRequest) String() string { return proto.CompactTextString(m) } func (*SignRequest) ProtoMessage() {} func (*SignRequest) Descriptor() ([]byte, []int) { return fileDescriptor_795e98bd0a473d79, []int{1} } func (m *SignRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SignRequest.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 *SignRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_SignRequest.Merge(m, src) } func (m *SignRequest) XXX_Size() int { return m.Size() } func (m *SignRequest) XXX_DiscardUnknown() { xxx_messageInfo_SignRequest.DiscardUnknown(m) } var xxx_messageInfo_SignRequest proto.InternalMessageInfo func (m *SignRequest) GetPublicKey() []byte { if m != nil { return m.PublicKey } return nil } func (m *SignRequest) GetSigningRoot() []byte { if m != nil { return m.SigningRoot } return nil } type SignResponse struct { Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` Status SignResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=ethereum.validator.accounts.v2.SignResponse_Status" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *SignResponse) Reset() { *m = SignResponse{} } func (m *SignResponse) String() string { return proto.CompactTextString(m) } func (*SignResponse) ProtoMessage() {} func (*SignResponse) Descriptor() ([]byte, []int) { return fileDescriptor_795e98bd0a473d79, []int{2} } func (m *SignResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SignResponse.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 *SignResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_SignResponse.Merge(m, src) } func (m *SignResponse) XXX_Size() int { return m.Size() } func (m *SignResponse) XXX_DiscardUnknown() { xxx_messageInfo_SignResponse.DiscardUnknown(m) } var xxx_messageInfo_SignResponse proto.InternalMessageInfo func (m *SignResponse) GetSignature() []byte { if m != nil { return m.Signature } return nil } func (m *SignResponse) GetStatus() SignResponse_Status { if m != nil { return m.Status } return SignResponse_UNKNOWN } func init() { proto.RegisterEnum("ethereum.validator.accounts.v2.SignResponse_Status", SignResponse_Status_name, SignResponse_Status_value) proto.RegisterType((*ListPublicKeysResponse)(nil), "ethereum.validator.accounts.v2.ListPublicKeysResponse") proto.RegisterType((*SignRequest)(nil), "ethereum.validator.accounts.v2.SignRequest") proto.RegisterType((*SignResponse)(nil), "ethereum.validator.accounts.v2.SignResponse") } func init() { proto.RegisterFile("proto/validator/accounts/v2/keymanager.proto", fileDescriptor_795e98bd0a473d79) } var fileDescriptor_795e98bd0a473d79 = []byte{ // 450 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xdd, 0x8a, 0xd3, 0x40, 0x18, 0x75, 0xb2, 0x52, 0xe9, 0xd7, 0x28, 0x65, 0x90, 0x12, 0x62, 0x0d, 0x35, 0x78, 0xb1, 0xe0, 0x32, 0x81, 0xae, 0x78, 0xe5, 0x8d, 0x6e, 0x22, 0x2c, 0x5d, 0xb2, 0x92, 0xb2, 0x7a, 0xb9, 0x4c, 0xeb, 0x67, 0x0c, 0xdb, 0xce, 0xc4, 0xcc, 0xa4, 0xd0, 0x5b, 0x7d, 0x01, 0xc1, 0x87, 0xf0, 0x11, 0x7c, 0x05, 0x2f, 0x05, 0x5f, 0x40, 0x8a, 0x0f, 0x22, 0x99, 0x24, 0xad, 0x42, 0xf1, 0xe7, 0x2e, 0xf9, 0xbe, 0x73, 0xce, 0x77, 0x72, 0x4e, 0xe0, 0x28, 0x2f, 0xa4, 0x96, 0xc1, 0x8a, 0x2f, 0xb2, 0x57, 0x5c, 0xcb, 0x22, 0xe0, 0xf3, 0xb9, 0x2c, 0x85, 0x56, 0xc1, 0x6a, 0x1c, 0x5c, 0xe1, 0x7a, 0xc9, 0x05, 0x4f, 0xb1, 0x60, 0x06, 0x46, 0x3d, 0xd4, 0x6f, 0xb0, 0xc0, 0x72, 0xc9, 0xb6, 0x04, 0xd6, 0x12, 0xd8, 0x6a, 0xec, 0x0e, 0x53, 0x29, 0xd3, 0x05, 0x06, 0x3c, 0xcf, 0x02, 0x2e, 0x84, 0xd4, 0x5c, 0x67, 0x52, 0xa8, 0x9a, 0xed, 0xde, 0x69, 0xb6, 0xe6, 0x6d, 0x56, 0xbe, 0x0e, 0x70, 0x99, 0xeb, 0x75, 0xbd, 0xf4, 0x63, 0x18, 0x9c, 0x65, 0x4a, 0x3f, 0x2f, 0x67, 0x8b, 0x6c, 0x3e, 0xc1, 0xb5, 0x4a, 0x50, 0xe5, 0x52, 0x28, 0xa4, 0x0f, 0x61, 0xd0, 0x5c, 0xcb, 0x44, 0x7a, 0x99, 0x1b, 0xc0, 0xe5, 0x15, 0xae, 0x95, 0x63, 0x8d, 0x0e, 0x0e, 0xed, 0xe4, 0xf6, 0x6e, 0xbb, 0x63, 0xfb, 0xe7, 0xd0, 0x9b, 0x66, 0xa9, 0x48, 0xf0, 0x6d, 0x89, 0x4a, 0xd3, 0xbb, 0x00, 0x3b, 0xa6, 0x43, 0x46, 0xe4, 0xd0, 0x4e, 0xba, 0x79, 0x0b, 0xa7, 0xf7, 0xc0, 0x56, 0x59, 0x2a, 0xaa, 0x03, 0x85, 0x94, 0xda, 0xb1, 0x0c, 0xa0, 0xd7, 0xcc, 0x12, 0x29, 0xb5, 0xff, 0x99, 0x80, 0x5d, 0x2b, 0x36, 0xbe, 0x86, 0xd0, 0xad, 0xf6, 0x5c, 0x97, 0x05, 0xb6, 0x8a, 0xdb, 0x01, 0x9d, 0x40, 0x47, 0x69, 0xae, 0x4b, 0x65, 0xb4, 0x6e, 0x8d, 0x8f, 0xd9, 0x9f, 0xb3, 0x63, 0xbf, 0x6a, 0xb3, 0xa9, 0xa1, 0x26, 0x8d, 0x84, 0xff, 0x18, 0x3a, 0xf5, 0x84, 0xf6, 0xe0, 0xc6, 0x45, 0x3c, 0x89, 0xcf, 0x5f, 0xc6, 0xfd, 0x6b, 0xf4, 0x26, 0x74, 0xa7, 0x17, 0x27, 0x27, 0x51, 0x14, 0x46, 0x61, 0x9f, 0x50, 0x80, 0x4e, 0x18, 0xc5, 0xa7, 0x51, 0xd8, 0xb7, 0xaa, 0xe7, 0x67, 0x4f, 0x4e, 0xcf, 0xa2, 0xb0, 0x7f, 0x30, 0xfe, 0x64, 0x81, 0x9d, 0xe0, 0x52, 0x6a, 0xac, 0x6e, 0x60, 0x41, 0x3f, 0x10, 0x70, 0xaa, 0xb0, 0x5f, 0xec, 0x09, 0x8e, 0x0e, 0x58, 0x5d, 0x13, 0x6b, 0x6b, 0x62, 0x51, 0x55, 0x93, 0xfb, 0xe8, 0x6f, 0x1f, 0xb0, 0xbf, 0x3e, 0xff, 0xfe, 0xbb, 0x6f, 0x3f, 0x3e, 0x5a, 0x1e, 0x1d, 0xfe, 0xf6, 0x6b, 0x15, 0xc6, 0xcf, 0x76, 0x44, 0xdf, 0x13, 0xb8, 0x5e, 0xb9, 0xa3, 0x0f, 0xfe, 0x2d, 0x27, 0xd3, 0xaa, 0x7b, 0xf4, 0x3f, 0xa1, 0xfa, 0x23, 0xe3, 0xc4, 0xf5, 0x9d, 0x7d, 0x4e, 0xaa, 0xe6, 0x9e, 0xda, 0x5f, 0x36, 0x1e, 0xf9, 0xba, 0xf1, 0xc8, 0xf7, 0x8d, 0x47, 0x66, 0x1d, 0x93, 0xc0, 0xf1, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x49, 0x89, 0x51, 0x24, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // RemoteSignerClient is the client API for RemoteSigner service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type RemoteSignerClient interface { ListValidatingPublicKeys(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ListPublicKeysResponse, error) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) } type remoteSignerClient struct { cc *grpc.ClientConn } func NewRemoteSignerClient(cc *grpc.ClientConn) RemoteSignerClient { return &remoteSignerClient{cc} } func (c *remoteSignerClient) ListValidatingPublicKeys(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ListPublicKeysResponse, error) { out := new(ListPublicKeysResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.RemoteSigner/ListValidatingPublicKeys", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *remoteSignerClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) { out := new(SignResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.RemoteSigner/Sign", in, out, opts...) if err != nil { return nil, err } return out, nil } // RemoteSignerServer is the server API for RemoteSigner service. type RemoteSignerServer interface { ListValidatingPublicKeys(context.Context, *types.Empty) (*ListPublicKeysResponse, error) Sign(context.Context, *SignRequest) (*SignResponse, error) } // UnimplementedRemoteSignerServer can be embedded to have forward compatible implementations. type UnimplementedRemoteSignerServer struct { } func (*UnimplementedRemoteSignerServer) ListValidatingPublicKeys(ctx context.Context, req *types.Empty) (*ListPublicKeysResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListValidatingPublicKeys not implemented") } func (*UnimplementedRemoteSignerServer) Sign(ctx context.Context, req *SignRequest) (*SignResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented") } func RegisterRemoteSignerServer(s *grpc.Server, srv RemoteSignerServer) { s.RegisterService(&_RemoteSigner_serviceDesc, srv) } func _RemoteSigner_ListValidatingPublicKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(types.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RemoteSignerServer).ListValidatingPublicKeys(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/ethereum.validator.accounts.v2.RemoteSigner/ListValidatingPublicKeys", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RemoteSignerServer).ListValidatingPublicKeys(ctx, req.(*types.Empty)) } return interceptor(ctx, in, info, handler) } func _RemoteSigner_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SignRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RemoteSignerServer).Sign(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/ethereum.validator.accounts.v2.RemoteSigner/Sign", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RemoteSignerServer).Sign(ctx, req.(*SignRequest)) } return interceptor(ctx, in, info, handler) } var _RemoteSigner_serviceDesc = grpc.ServiceDesc{ ServiceName: "ethereum.validator.accounts.v2.RemoteSigner", HandlerType: (*RemoteSignerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListValidatingPublicKeys", Handler: _RemoteSigner_ListValidatingPublicKeys_Handler, }, { MethodName: "Sign", Handler: _RemoteSigner_Sign_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/validator/accounts/v2/keymanager.proto", } func (m *ListPublicKeysResponse) 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 *ListPublicKeysResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ListPublicKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ValidatingPublicKeys) > 0 { for iNdEx := len(m.ValidatingPublicKeys) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ValidatingPublicKeys[iNdEx]) copy(dAtA[i:], m.ValidatingPublicKeys[iNdEx]) i = encodeVarintKeymanager(dAtA, i, uint64(len(m.ValidatingPublicKeys[iNdEx]))) i-- dAtA[i] = 0x12 } } return len(dAtA) - i, nil } func (m *SignRequest) 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 *SignRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SignRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if len(m.SigningRoot) > 0 { i -= len(m.SigningRoot) copy(dAtA[i:], m.SigningRoot) i = encodeVarintKeymanager(dAtA, i, uint64(len(m.SigningRoot))) i-- dAtA[i] = 0x12 } if len(m.PublicKey) > 0 { i -= len(m.PublicKey) copy(dAtA[i:], m.PublicKey) i = encodeVarintKeymanager(dAtA, i, uint64(len(m.PublicKey))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *SignResponse) 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 *SignResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SignResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if m.Status != 0 { i = encodeVarintKeymanager(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x10 } if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintKeymanager(dAtA, i, uint64(len(m.Signature))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintKeymanager(dAtA []byte, offset int, v uint64) int { offset -= sovKeymanager(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *ListPublicKeysResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.ValidatingPublicKeys) > 0 { for _, b := range m.ValidatingPublicKeys { l = len(b) n += 1 + l + sovKeymanager(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *SignRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.PublicKey) if l > 0 { n += 1 + l + sovKeymanager(uint64(l)) } l = len(m.SigningRoot) if l > 0 { n += 1 + l + sovKeymanager(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *SignResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Signature) if l > 0 { n += 1 + l + sovKeymanager(uint64(l)) } if m.Status != 0 { n += 1 + sovKeymanager(uint64(m.Status)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovKeymanager(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozKeymanager(x uint64) (n int) { return sovKeymanager(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *ListPublicKeysResponse) 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 ErrIntOverflowKeymanager } 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: ListPublicKeysResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListPublicKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatingPublicKeys", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowKeymanager } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthKeymanager } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthKeymanager } if postIndex > l { return io.ErrUnexpectedEOF } m.ValidatingPublicKeys = append(m.ValidatingPublicKeys, make([]byte, postIndex-iNdEx)) copy(m.ValidatingPublicKeys[len(m.ValidatingPublicKeys)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipKeymanager(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthKeymanager } if (iNdEx + skippy) < 0 { return ErrInvalidLengthKeymanager } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SignRequest) 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 ErrIntOverflowKeymanager } 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: SignRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SignRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowKeymanager } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthKeymanager } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthKeymanager } if postIndex > l { return io.ErrUnexpectedEOF } m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) if m.PublicKey == nil { m.PublicKey = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SigningRoot", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowKeymanager } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthKeymanager } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthKeymanager } if postIndex > l { return io.ErrUnexpectedEOF } m.SigningRoot = append(m.SigningRoot[:0], dAtA[iNdEx:postIndex]...) if m.SigningRoot == nil { m.SigningRoot = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipKeymanager(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthKeymanager } if (iNdEx + skippy) < 0 { return ErrInvalidLengthKeymanager } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SignResponse) 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 ErrIntOverflowKeymanager } 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: SignResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SignResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowKeymanager } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthKeymanager } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthKeymanager } if postIndex > l { return io.ErrUnexpectedEOF } m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) if m.Signature == nil { m.Signature = []byte{} } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowKeymanager } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Status |= SignResponse_Status(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipKeymanager(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthKeymanager } if (iNdEx + skippy) < 0 { return ErrInvalidLengthKeymanager } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipKeymanager(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, ErrIntOverflowKeymanager } 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, ErrIntOverflowKeymanager } 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, ErrIntOverflowKeymanager } 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, ErrInvalidLengthKeymanager } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupKeymanager } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthKeymanager } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthKeymanager = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowKeymanager = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupKeymanager = fmt.Errorf("proto: unexpected end of group") )