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

package ethrpcv1

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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

// ProtoEthServiceClient is the client API for ProtoEthService 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 ProtoEthServiceClient interface {
	GetBalance(ctx context.Context, in *GetBalanceReq, opts ...grpc.CallOption) (*GetBalanceResp, error)
	GetNonce(ctx context.Context, in *GetNonceReq, opts ...grpc.CallOption) (*GetNonceResp, error)
	GetTransaction(ctx context.Context, in *GetTxReq, opts ...grpc.CallOption) (*TransactionInfo, error)
	GetTransactionReceipt(ctx context.Context, in *TxHash, opts ...grpc.CallOption) (*TxReceipt, error)
	ContractCall(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
	GetHashrate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NumResult, error)
	GetGasPrice(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NumResult, error)
	GetBlockNumber(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BlockNumber, error)
	GetBlockTransactionCount(ctx context.Context, in *HashStringOrNumber, opts ...grpc.CallOption) (*CountResp, error)
	GetBlock(ctx context.Context, in *HashStringOrNumber, opts ...grpc.CallOption) (*ObjResp, error)
	GetTransactionFromBlock(ctx context.Context, in *InfoWithIndex, opts ...grpc.CallOption) (*ObjResp, error)
	// eth_sendRawTransaction should have simple requests but stream of responses
	SendRawTransactions(ctx context.Context, in *RawTxRequest, opts ...grpc.CallOption) (*TxResponse, error)
}

type protoEthServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewProtoEthServiceClient(cc grpc.ClientConnInterface) ProtoEthServiceClient {
	return &protoEthServiceClient{cc}
}

func (c *protoEthServiceClient) GetBalance(ctx context.Context, in *GetBalanceReq, opts ...grpc.CallOption) (*GetBalanceResp, error) {
	out := new(GetBalanceResp)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetBalance", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetNonce(ctx context.Context, in *GetNonceReq, opts ...grpc.CallOption) (*GetNonceResp, error) {
	out := new(GetNonceResp)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetNonce", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetTransaction(ctx context.Context, in *GetTxReq, opts ...grpc.CallOption) (*TransactionInfo, error) {
	out := new(TransactionInfo)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetTransaction", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetTransactionReceipt(ctx context.Context, in *TxHash, opts ...grpc.CallOption) (*TxReceipt, error) {
	out := new(TxReceipt)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetTransactionReceipt", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) ContractCall(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) {
	out := new(CallResponse)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/ContractCall", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetHashrate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NumResult, error) {
	out := new(NumResult)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetHashrate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetGasPrice(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NumResult, error) {
	out := new(NumResult)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetGasPrice", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetBlockNumber(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BlockNumber, error) {
	out := new(BlockNumber)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetBlockNumber", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetBlockTransactionCount(ctx context.Context, in *HashStringOrNumber, opts ...grpc.CallOption) (*CountResp, error) {
	out := new(CountResp)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetBlockTransactionCount", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetBlock(ctx context.Context, in *HashStringOrNumber, opts ...grpc.CallOption) (*ObjResp, error) {
	out := new(ObjResp)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetBlock", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) GetTransactionFromBlock(ctx context.Context, in *InfoWithIndex, opts ...grpc.CallOption) (*ObjResp, error) {
	out := new(ObjResp)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/GetTransactionFromBlock", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *protoEthServiceClient) SendRawTransactions(ctx context.Context, in *RawTxRequest, opts ...grpc.CallOption) (*TxResponse, error) {
	out := new(TxResponse)
	err := c.cc.Invoke(ctx, "/ethrpc.v1.ProtoEthService/SendRawTransactions", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ProtoEthServiceServer is the server API for ProtoEthService service.
// All implementations must embed UnimplementedProtoEthServiceServer
// for forward compatibility
type ProtoEthServiceServer interface {
	GetBalance(context.Context, *GetBalanceReq) (*GetBalanceResp, error)
	GetNonce(context.Context, *GetNonceReq) (*GetNonceResp, error)
	GetTransaction(context.Context, *GetTxReq) (*TransactionInfo, error)
	GetTransactionReceipt(context.Context, *TxHash) (*TxReceipt, error)
	ContractCall(context.Context, *CallRequest) (*CallResponse, error)
	GetHashrate(context.Context, *emptypb.Empty) (*NumResult, error)
	GetGasPrice(context.Context, *emptypb.Empty) (*NumResult, error)
	GetBlockNumber(context.Context, *emptypb.Empty) (*BlockNumber, error)
	GetBlockTransactionCount(context.Context, *HashStringOrNumber) (*CountResp, error)
	GetBlock(context.Context, *HashStringOrNumber) (*ObjResp, error)
	GetTransactionFromBlock(context.Context, *InfoWithIndex) (*ObjResp, error)
	// eth_sendRawTransaction should have simple requests but stream of responses
	SendRawTransactions(context.Context, *RawTxRequest) (*TxResponse, error)
	mustEmbedUnimplementedProtoEthServiceServer()
}

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

func (UnimplementedProtoEthServiceServer) GetBalance(context.Context, *GetBalanceReq) (*GetBalanceResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBalance not implemented")
}
func (UnimplementedProtoEthServiceServer) GetNonce(context.Context, *GetNonceReq) (*GetNonceResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNonce not implemented")
}
func (UnimplementedProtoEthServiceServer) GetTransaction(context.Context, *GetTxReq) (*TransactionInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented")
}
func (UnimplementedProtoEthServiceServer) GetTransactionReceipt(context.Context, *TxHash) (*TxReceipt, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTransactionReceipt not implemented")
}
func (UnimplementedProtoEthServiceServer) ContractCall(context.Context, *CallRequest) (*CallResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ContractCall not implemented")
}
func (UnimplementedProtoEthServiceServer) GetHashrate(context.Context, *emptypb.Empty) (*NumResult, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetHashrate not implemented")
}
func (UnimplementedProtoEthServiceServer) GetGasPrice(context.Context, *emptypb.Empty) (*NumResult, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetGasPrice not implemented")
}
func (UnimplementedProtoEthServiceServer) GetBlockNumber(context.Context, *emptypb.Empty) (*BlockNumber, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockNumber not implemented")
}
func (UnimplementedProtoEthServiceServer) GetBlockTransactionCount(context.Context, *HashStringOrNumber) (*CountResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockTransactionCount not implemented")
}
func (UnimplementedProtoEthServiceServer) GetBlock(context.Context, *HashStringOrNumber) (*ObjResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented")
}
func (UnimplementedProtoEthServiceServer) GetTransactionFromBlock(context.Context, *InfoWithIndex) (*ObjResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTransactionFromBlock not implemented")
}
func (UnimplementedProtoEthServiceServer) SendRawTransactions(context.Context, *RawTxRequest) (*TxResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SendRawTransactions not implemented")
}
func (UnimplementedProtoEthServiceServer) mustEmbedUnimplementedProtoEthServiceServer() {}

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

func RegisterProtoEthServiceServer(s grpc.ServiceRegistrar, srv ProtoEthServiceServer) {
	s.RegisterService(&ProtoEthService_ServiceDesc, srv)
}

func _ProtoEthService_GetBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBalanceReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetBalance(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetBalance",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetBalance(ctx, req.(*GetBalanceReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetNonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNonceReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetNonce(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetNonce",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetNonce(ctx, req.(*GetNonceReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTxReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetTransaction",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetTransaction(ctx, req.(*GetTxReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetTransactionReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TxHash)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetTransactionReceipt(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetTransactionReceipt",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetTransactionReceipt(ctx, req.(*TxHash))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_ContractCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CallRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).ContractCall(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/ContractCall",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).ContractCall(ctx, req.(*CallRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetHashrate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetHashrate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetHashrate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetHashrate(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetGasPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetGasPrice(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetGasPrice",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetGasPrice(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetBlockNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetBlockNumber(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetBlockNumber",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetBlockNumber(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetBlockTransactionCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HashStringOrNumber)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetBlockTransactionCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetBlockTransactionCount",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetBlockTransactionCount(ctx, req.(*HashStringOrNumber))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HashStringOrNumber)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetBlock(ctx, req.(*HashStringOrNumber))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_GetTransactionFromBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InfoWithIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).GetTransactionFromBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/GetTransactionFromBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).GetTransactionFromBlock(ctx, req.(*InfoWithIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProtoEthService_SendRawTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RawTxRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProtoEthServiceServer).SendRawTransactions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ethrpc.v1.ProtoEthService/SendRawTransactions",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProtoEthServiceServer).SendRawTransactions(ctx, req.(*RawTxRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ProtoEthService_ServiceDesc is the grpc.ServiceDesc for ProtoEthService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ProtoEthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ethrpc.v1.ProtoEthService",
	HandlerType: (*ProtoEthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetBalance",
			Handler:    _ProtoEthService_GetBalance_Handler,
		},
		{
			MethodName: "GetNonce",
			Handler:    _ProtoEthService_GetNonce_Handler,
		},
		{
			MethodName: "GetTransaction",
			Handler:    _ProtoEthService_GetTransaction_Handler,
		},
		{
			MethodName: "GetTransactionReceipt",
			Handler:    _ProtoEthService_GetTransactionReceipt_Handler,
		},
		{
			MethodName: "ContractCall",
			Handler:    _ProtoEthService_ContractCall_Handler,
		},
		{
			MethodName: "GetHashrate",
			Handler:    _ProtoEthService_GetHashrate_Handler,
		},
		{
			MethodName: "GetGasPrice",
			Handler:    _ProtoEthService_GetGasPrice_Handler,
		},
		{
			MethodName: "GetBlockNumber",
			Handler:    _ProtoEthService_GetBlockNumber_Handler,
		},
		{
			MethodName: "GetBlockTransactionCount",
			Handler:    _ProtoEthService_GetBlockTransactionCount_Handler,
		},
		{
			MethodName: "GetBlock",
			Handler:    _ProtoEthService_GetBlock_Handler,
		},
		{
			MethodName: "GetTransactionFromBlock",
			Handler:    _ProtoEthService_GetTransactionFromBlock_Handler,
		},
		{
			MethodName: "SendRawTransactions",
			Handler:    _ProtoEthService_SendRawTransactions_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ethrpc/v1/eth.proto",
}
