// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package tofnd

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// MultisigClient is the client API for Multisig service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MultisigClient interface {
	KeyPresence(ctx context.Context, in *KeyPresenceRequest, opts ...grpc.CallOption) (*KeyPresenceResponse, error)
	Keygen(ctx context.Context, in *KeygenRequest, opts ...grpc.CallOption) (*KeygenResponse, error)
	Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error)
}

type multisigClient struct {
	cc grpc.ClientConnInterface
}

func NewMultisigClient(cc grpc.ClientConnInterface) MultisigClient {
	return &multisigClient{cc}
}

func (c *multisigClient) KeyPresence(ctx context.Context, in *KeyPresenceRequest, opts ...grpc.CallOption) (*KeyPresenceResponse, error) {
	out := new(KeyPresenceResponse)
	err := c.cc.Invoke(ctx, "/tofnd.Multisig/KeyPresence", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *multisigClient) Keygen(ctx context.Context, in *KeygenRequest, opts ...grpc.CallOption) (*KeygenResponse, error) {
	out := new(KeygenResponse)
	err := c.cc.Invoke(ctx, "/tofnd.Multisig/Keygen", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *multisigClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) {
	out := new(SignResponse)
	err := c.cc.Invoke(ctx, "/tofnd.Multisig/Sign", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MultisigServer is the server API for Multisig service.
// All implementations must embed UnimplementedMultisigServer
// for forward compatibility
type MultisigServer interface {
	KeyPresence(context.Context, *KeyPresenceRequest) (*KeyPresenceResponse, error)
	Keygen(context.Context, *KeygenRequest) (*KeygenResponse, error)
	Sign(context.Context, *SignRequest) (*SignResponse, error)
	mustEmbedUnimplementedMultisigServer()
}

// UnimplementedMultisigServer must be embedded to have forward compatible implementations.
type UnimplementedMultisigServer struct {
}

func (UnimplementedMultisigServer) KeyPresence(context.Context, *KeyPresenceRequest) (*KeyPresenceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method KeyPresence not implemented")
}
func (UnimplementedMultisigServer) Keygen(context.Context, *KeygenRequest) (*KeygenResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Keygen not implemented")
}
func (UnimplementedMultisigServer) Sign(context.Context, *SignRequest) (*SignResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented")
}
func (UnimplementedMultisigServer) mustEmbedUnimplementedMultisigServer() {}

// UnsafeMultisigServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MultisigServer will
// result in compilation errors.
type UnsafeMultisigServer interface {
	mustEmbedUnimplementedMultisigServer()
}

func RegisterMultisigServer(s grpc.ServiceRegistrar, srv MultisigServer) {
	s.RegisterService(&Multisig_ServiceDesc, srv)
}

func _Multisig_KeyPresence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(KeyPresenceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MultisigServer).KeyPresence(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tofnd.Multisig/KeyPresence",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MultisigServer).KeyPresence(ctx, req.(*KeyPresenceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Multisig_Keygen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(KeygenRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MultisigServer).Keygen(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tofnd.Multisig/Keygen",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MultisigServer).Keygen(ctx, req.(*KeygenRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Multisig_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.(MultisigServer).Sign(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tofnd.Multisig/Sign",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MultisigServer).Sign(ctx, req.(*SignRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Multisig_ServiceDesc is the grpc.ServiceDesc for Multisig service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Multisig_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tofnd.Multisig",
	HandlerType: (*MultisigServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "KeyPresence",
			Handler:    _Multisig_KeyPresence_Handler,
		},
		{
			MethodName: "Keygen",
			Handler:    _Multisig_Keygen_Handler,
		},
		{
			MethodName: "Sign",
			Handler:    _Multisig_Sign_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tss/tofnd/v1beta1/multisig.proto",
}
