// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: sentry/v1/service.proto

package sentryv1

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

// SentryServiceClient is the client API for SentryService 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 SentryServiceClient interface {
	// LimitInfo get latest param for make batch tx.
	GetLimitInfo(ctx context.Context, in *LimitInfoRequest, opts ...grpc.CallOption) (*LimitInfoResponse, error)
	// CommitBatchTx used to commit batch tx to tx-sort-network
	CommitBatchTx(ctx context.Context, in *CommitBatchTxRequest, opts ...grpc.CallOption) (*CommitBatchTxResponse, error)
	// GetTxReceipt from tx-sort-network with txhash
	GetBatchTxResult(ctx context.Context, in *GetReceiptRequest, opts ...grpc.CallOption) (*GetReceiptResponse, error)
	// for val
	// GetNewBlock used for nebula get new virtual block info from contract with lastblock.
	GetNewBlock(ctx context.Context, in *GetNewBlockRequest, opts ...grpc.CallOption) (*GetNewBlockResponse, error)
	// CommitBlock used for nebula commit new block and state info to contract.
	CommitBlock(ctx context.Context, in *CommitBlockRequest, opts ...grpc.CallOption) (*CommitBlockResponse, error)
	// GetConsensusedBlock used for nebula get special block consensus result.
	GetConfirmedBlock(ctx context.Context, in *GetConsensusedBlockRequest, opts ...grpc.CallOption) (*GetConsensusedBlockResponse, error)
}

type sentryServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSentryServiceClient(cc grpc.ClientConnInterface) SentryServiceClient {
	return &sentryServiceClient{cc}
}

func (c *sentryServiceClient) GetLimitInfo(ctx context.Context, in *LimitInfoRequest, opts ...grpc.CallOption) (*LimitInfoResponse, error) {
	out := new(LimitInfoResponse)
	err := c.cc.Invoke(ctx, "/sentry.v1.SentryService/GetLimitInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryServiceClient) CommitBatchTx(ctx context.Context, in *CommitBatchTxRequest, opts ...grpc.CallOption) (*CommitBatchTxResponse, error) {
	out := new(CommitBatchTxResponse)
	err := c.cc.Invoke(ctx, "/sentry.v1.SentryService/CommitBatchTx", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryServiceClient) GetBatchTxResult(ctx context.Context, in *GetReceiptRequest, opts ...grpc.CallOption) (*GetReceiptResponse, error) {
	out := new(GetReceiptResponse)
	err := c.cc.Invoke(ctx, "/sentry.v1.SentryService/GetBatchTxResult", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryServiceClient) GetNewBlock(ctx context.Context, in *GetNewBlockRequest, opts ...grpc.CallOption) (*GetNewBlockResponse, error) {
	out := new(GetNewBlockResponse)
	err := c.cc.Invoke(ctx, "/sentry.v1.SentryService/GetNewBlock", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryServiceClient) CommitBlock(ctx context.Context, in *CommitBlockRequest, opts ...grpc.CallOption) (*CommitBlockResponse, error) {
	out := new(CommitBlockResponse)
	err := c.cc.Invoke(ctx, "/sentry.v1.SentryService/CommitBlock", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sentryServiceClient) GetConfirmedBlock(ctx context.Context, in *GetConsensusedBlockRequest, opts ...grpc.CallOption) (*GetConsensusedBlockResponse, error) {
	out := new(GetConsensusedBlockResponse)
	err := c.cc.Invoke(ctx, "/sentry.v1.SentryService/GetConfirmedBlock", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SentryServiceServer is the server API for SentryService service.
// All implementations must embed UnimplementedSentryServiceServer
// for forward compatibility
type SentryServiceServer interface {
	// LimitInfo get latest param for make batch tx.
	GetLimitInfo(context.Context, *LimitInfoRequest) (*LimitInfoResponse, error)
	// CommitBatchTx used to commit batch tx to tx-sort-network
	CommitBatchTx(context.Context, *CommitBatchTxRequest) (*CommitBatchTxResponse, error)
	// GetTxReceipt from tx-sort-network with txhash
	GetBatchTxResult(context.Context, *GetReceiptRequest) (*GetReceiptResponse, error)
	// for val
	// GetNewBlock used for nebula get new virtual block info from contract with lastblock.
	GetNewBlock(context.Context, *GetNewBlockRequest) (*GetNewBlockResponse, error)
	// CommitBlock used for nebula commit new block and state info to contract.
	CommitBlock(context.Context, *CommitBlockRequest) (*CommitBlockResponse, error)
	// GetConsensusedBlock used for nebula get special block consensus result.
	GetConfirmedBlock(context.Context, *GetConsensusedBlockRequest) (*GetConsensusedBlockResponse, error)
	mustEmbedUnimplementedSentryServiceServer()
}

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

func (UnimplementedSentryServiceServer) GetLimitInfo(context.Context, *LimitInfoRequest) (*LimitInfoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLimitInfo not implemented")
}
func (UnimplementedSentryServiceServer) CommitBatchTx(context.Context, *CommitBatchTxRequest) (*CommitBatchTxResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CommitBatchTx not implemented")
}
func (UnimplementedSentryServiceServer) GetBatchTxResult(context.Context, *GetReceiptRequest) (*GetReceiptResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBatchTxResult not implemented")
}
func (UnimplementedSentryServiceServer) GetNewBlock(context.Context, *GetNewBlockRequest) (*GetNewBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNewBlock not implemented")
}
func (UnimplementedSentryServiceServer) CommitBlock(context.Context, *CommitBlockRequest) (*CommitBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CommitBlock not implemented")
}
func (UnimplementedSentryServiceServer) GetConfirmedBlock(context.Context, *GetConsensusedBlockRequest) (*GetConsensusedBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetConfirmedBlock not implemented")
}
func (UnimplementedSentryServiceServer) mustEmbedUnimplementedSentryServiceServer() {}

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

func RegisterSentryServiceServer(s grpc.ServiceRegistrar, srv SentryServiceServer) {
	s.RegisterService(&SentryService_ServiceDesc, srv)
}

func _SentryService_GetLimitInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LimitInfoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServiceServer).GetLimitInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/sentry.v1.SentryService/GetLimitInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServiceServer).GetLimitInfo(ctx, req.(*LimitInfoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SentryService_CommitBatchTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CommitBatchTxRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServiceServer).CommitBatchTx(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/sentry.v1.SentryService/CommitBatchTx",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServiceServer).CommitBatchTx(ctx, req.(*CommitBatchTxRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SentryService_GetBatchTxResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetReceiptRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServiceServer).GetBatchTxResult(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/sentry.v1.SentryService/GetBatchTxResult",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServiceServer).GetBatchTxResult(ctx, req.(*GetReceiptRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SentryService_GetNewBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNewBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServiceServer).GetNewBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/sentry.v1.SentryService/GetNewBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServiceServer).GetNewBlock(ctx, req.(*GetNewBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SentryService_CommitBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CommitBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServiceServer).CommitBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/sentry.v1.SentryService/CommitBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServiceServer).CommitBlock(ctx, req.(*CommitBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SentryService_GetConfirmedBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetConsensusedBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SentryServiceServer).GetConfirmedBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/sentry.v1.SentryService/GetConfirmedBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SentryServiceServer).GetConfirmedBlock(ctx, req.(*GetConsensusedBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SentryService_ServiceDesc is the grpc.ServiceDesc for SentryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SentryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sentry.v1.SentryService",
	HandlerType: (*SentryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetLimitInfo",
			Handler:    _SentryService_GetLimitInfo_Handler,
		},
		{
			MethodName: "CommitBatchTx",
			Handler:    _SentryService_CommitBatchTx_Handler,
		},
		{
			MethodName: "GetBatchTxResult",
			Handler:    _SentryService_GetBatchTxResult_Handler,
		},
		{
			MethodName: "GetNewBlock",
			Handler:    _SentryService_GetNewBlock_Handler,
		},
		{
			MethodName: "CommitBlock",
			Handler:    _SentryService_CommitBlock_Handler,
		},
		{
			MethodName: "GetConfirmedBlock",
			Handler:    _SentryService_GetConfirmedBlock_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sentry/v1/service.proto",
}
