// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.32.1
// source: services/propagation/propagation_api/propagation_api.proto

package propagation_api

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	PropagationAPI_HealthGRPC_FullMethodName              = "/propagation_api.PropagationAPI/HealthGRPC"
	PropagationAPI_ProcessTransaction_FullMethodName      = "/propagation_api.PropagationAPI/ProcessTransaction"
	PropagationAPI_ProcessTransactionBatch_FullMethodName = "/propagation_api.PropagationAPI/ProcessTransactionBatch"
)

// PropagationAPIClient is the client API for PropagationAPI 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.
//
// PropagationAPI provides services for processing and propagating Bitcoin SV transactions
// across the network. It supports various transaction processing methods including
// individual, batch, and streaming operations.
type PropagationAPIClient interface {
	// HealthGRPC checks the health status of the propagation service and its dependencies.
	// Returns a HealthResponse containing the service status and details.
	HealthGRPC(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*HealthResponse, error)
	// ProcessTransaction processes a single BSV transaction.
	// The transaction must be provided in raw byte format and must be extended.
	// Coinbase transactions are not allowed.
	ProcessTransaction(ctx context.Context, in *ProcessTransactionRequest, opts ...grpc.CallOption) (*EmptyMessage, error)
	// ProcessTransactionBatch processes multiple transactions in a single request.
	// This is more efficient than processing transactions individually when dealing
	// with large numbers of transactions.
	ProcessTransactionBatch(ctx context.Context, in *ProcessTransactionBatchRequest, opts ...grpc.CallOption) (*ProcessTransactionBatchResponse, error)
}

type propagationAPIClient struct {
	cc grpc.ClientConnInterface
}

func NewPropagationAPIClient(cc grpc.ClientConnInterface) PropagationAPIClient {
	return &propagationAPIClient{cc}
}

func (c *propagationAPIClient) HealthGRPC(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*HealthResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HealthResponse)
	err := c.cc.Invoke(ctx, PropagationAPI_HealthGRPC_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *propagationAPIClient) ProcessTransaction(ctx context.Context, in *ProcessTransactionRequest, opts ...grpc.CallOption) (*EmptyMessage, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EmptyMessage)
	err := c.cc.Invoke(ctx, PropagationAPI_ProcessTransaction_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *propagationAPIClient) ProcessTransactionBatch(ctx context.Context, in *ProcessTransactionBatchRequest, opts ...grpc.CallOption) (*ProcessTransactionBatchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ProcessTransactionBatchResponse)
	err := c.cc.Invoke(ctx, PropagationAPI_ProcessTransactionBatch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PropagationAPIServer is the server API for PropagationAPI service.
// All implementations must embed UnimplementedPropagationAPIServer
// for forward compatibility.
//
// PropagationAPI provides services for processing and propagating Bitcoin SV transactions
// across the network. It supports various transaction processing methods including
// individual, batch, and streaming operations.
type PropagationAPIServer interface {
	// HealthGRPC checks the health status of the propagation service and its dependencies.
	// Returns a HealthResponse containing the service status and details.
	HealthGRPC(context.Context, *EmptyMessage) (*HealthResponse, error)
	// ProcessTransaction processes a single BSV transaction.
	// The transaction must be provided in raw byte format and must be extended.
	// Coinbase transactions are not allowed.
	ProcessTransaction(context.Context, *ProcessTransactionRequest) (*EmptyMessage, error)
	// ProcessTransactionBatch processes multiple transactions in a single request.
	// This is more efficient than processing transactions individually when dealing
	// with large numbers of transactions.
	ProcessTransactionBatch(context.Context, *ProcessTransactionBatchRequest) (*ProcessTransactionBatchResponse, error)
	mustEmbedUnimplementedPropagationAPIServer()
}

// UnimplementedPropagationAPIServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPropagationAPIServer struct{}

func (UnimplementedPropagationAPIServer) HealthGRPC(context.Context, *EmptyMessage) (*HealthResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HealthGRPC not implemented")
}
func (UnimplementedPropagationAPIServer) ProcessTransaction(context.Context, *ProcessTransactionRequest) (*EmptyMessage, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ProcessTransaction not implemented")
}
func (UnimplementedPropagationAPIServer) ProcessTransactionBatch(context.Context, *ProcessTransactionBatchRequest) (*ProcessTransactionBatchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ProcessTransactionBatch not implemented")
}
func (UnimplementedPropagationAPIServer) mustEmbedUnimplementedPropagationAPIServer() {}
func (UnimplementedPropagationAPIServer) testEmbeddedByValue()                        {}

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

func RegisterPropagationAPIServer(s grpc.ServiceRegistrar, srv PropagationAPIServer) {
	// If the following call pancis, it indicates UnimplementedPropagationAPIServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&PropagationAPI_ServiceDesc, srv)
}

func _PropagationAPI_HealthGRPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PropagationAPIServer).HealthGRPC(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PropagationAPI_HealthGRPC_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PropagationAPIServer).HealthGRPC(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _PropagationAPI_ProcessTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProcessTransactionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PropagationAPIServer).ProcessTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PropagationAPI_ProcessTransaction_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PropagationAPIServer).ProcessTransaction(ctx, req.(*ProcessTransactionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PropagationAPI_ProcessTransactionBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProcessTransactionBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PropagationAPIServer).ProcessTransactionBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PropagationAPI_ProcessTransactionBatch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PropagationAPIServer).ProcessTransactionBatch(ctx, req.(*ProcessTransactionBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// PropagationAPI_ServiceDesc is the grpc.ServiceDesc for PropagationAPI service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PropagationAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "propagation_api.PropagationAPI",
	HandlerType: (*PropagationAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthGRPC",
			Handler:    _PropagationAPI_HealthGRPC_Handler,
		},
		{
			MethodName: "ProcessTransaction",
			Handler:    _PropagationAPI_ProcessTransaction_Handler,
		},
		{
			MethodName: "ProcessTransactionBatch",
			Handler:    _PropagationAPI_ProcessTransactionBatch_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "services/propagation/propagation_api/propagation_api.proto",
}
