// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.29.3
// source: spark_token_internal.proto

package spark_token_internal

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 (
	SparkTokenInternalService_PrepareTransaction_FullMethodName                   = "/spark_token.SparkTokenInternalService/prepare_transaction"
	SparkTokenInternalService_SignTokenTransactionFromCoordination_FullMethodName = "/spark_token.SparkTokenInternalService/sign_token_transaction_from_coordination"
	SparkTokenInternalService_ExchangeRevocationSecretsShares_FullMethodName      = "/spark_token.SparkTokenInternalService/exchange_revocation_secrets_shares"
)

// SparkTokenInternalServiceClient is the client API for SparkTokenInternalService 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 SparkTokenInternalServiceClient interface {
	// Validate input and prepare transaction (SO-to-SO)
	PrepareTransaction(ctx context.Context, in *PrepareTransactionRequest, opts ...grpc.CallOption) (*PrepareTransactionResponse, error)
	// Sign the token transaction from coordination
	SignTokenTransactionFromCoordination(ctx context.Context, in *SignTokenTransactionFromCoordinationRequest, opts ...grpc.CallOption) (*SignTokenTransactionFromCoordinationResponse, error)
	// Exchange revocation secrets between SOs after all signatures are gathered
	// Once an SO has all the revocation secret shares, it can finalize the
	// transaction.
	ExchangeRevocationSecretsShares(ctx context.Context, in *ExchangeRevocationSecretsSharesRequest, opts ...grpc.CallOption) (*ExchangeRevocationSecretsSharesResponse, error)
}

type sparkTokenInternalServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSparkTokenInternalServiceClient(cc grpc.ClientConnInterface) SparkTokenInternalServiceClient {
	return &sparkTokenInternalServiceClient{cc}
}

func (c *sparkTokenInternalServiceClient) PrepareTransaction(ctx context.Context, in *PrepareTransactionRequest, opts ...grpc.CallOption) (*PrepareTransactionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PrepareTransactionResponse)
	err := c.cc.Invoke(ctx, SparkTokenInternalService_PrepareTransaction_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sparkTokenInternalServiceClient) SignTokenTransactionFromCoordination(ctx context.Context, in *SignTokenTransactionFromCoordinationRequest, opts ...grpc.CallOption) (*SignTokenTransactionFromCoordinationResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SignTokenTransactionFromCoordinationResponse)
	err := c.cc.Invoke(ctx, SparkTokenInternalService_SignTokenTransactionFromCoordination_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sparkTokenInternalServiceClient) ExchangeRevocationSecretsShares(ctx context.Context, in *ExchangeRevocationSecretsSharesRequest, opts ...grpc.CallOption) (*ExchangeRevocationSecretsSharesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ExchangeRevocationSecretsSharesResponse)
	err := c.cc.Invoke(ctx, SparkTokenInternalService_ExchangeRevocationSecretsShares_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SparkTokenInternalServiceServer is the server API for SparkTokenInternalService service.
// All implementations must embed UnimplementedSparkTokenInternalServiceServer
// for forward compatibility.
type SparkTokenInternalServiceServer interface {
	// Validate input and prepare transaction (SO-to-SO)
	PrepareTransaction(context.Context, *PrepareTransactionRequest) (*PrepareTransactionResponse, error)
	// Sign the token transaction from coordination
	SignTokenTransactionFromCoordination(context.Context, *SignTokenTransactionFromCoordinationRequest) (*SignTokenTransactionFromCoordinationResponse, error)
	// Exchange revocation secrets between SOs after all signatures are gathered
	// Once an SO has all the revocation secret shares, it can finalize the
	// transaction.
	ExchangeRevocationSecretsShares(context.Context, *ExchangeRevocationSecretsSharesRequest) (*ExchangeRevocationSecretsSharesResponse, error)
	mustEmbedUnimplementedSparkTokenInternalServiceServer()
}

// UnimplementedSparkTokenInternalServiceServer 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 UnimplementedSparkTokenInternalServiceServer struct{}

func (UnimplementedSparkTokenInternalServiceServer) PrepareTransaction(context.Context, *PrepareTransactionRequest) (*PrepareTransactionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PrepareTransaction not implemented")
}
func (UnimplementedSparkTokenInternalServiceServer) SignTokenTransactionFromCoordination(context.Context, *SignTokenTransactionFromCoordinationRequest) (*SignTokenTransactionFromCoordinationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SignTokenTransactionFromCoordination not implemented")
}
func (UnimplementedSparkTokenInternalServiceServer) ExchangeRevocationSecretsShares(context.Context, *ExchangeRevocationSecretsSharesRequest) (*ExchangeRevocationSecretsSharesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ExchangeRevocationSecretsShares not implemented")
}
func (UnimplementedSparkTokenInternalServiceServer) mustEmbedUnimplementedSparkTokenInternalServiceServer() {
}
func (UnimplementedSparkTokenInternalServiceServer) testEmbeddedByValue() {}

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

func RegisterSparkTokenInternalServiceServer(s grpc.ServiceRegistrar, srv SparkTokenInternalServiceServer) {
	// If the following call pancis, it indicates UnimplementedSparkTokenInternalServiceServer 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(&SparkTokenInternalService_ServiceDesc, srv)
}

func _SparkTokenInternalService_PrepareTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PrepareTransactionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenInternalServiceServer).PrepareTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenInternalService_PrepareTransaction_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenInternalServiceServer).PrepareTransaction(ctx, req.(*PrepareTransactionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SparkTokenInternalService_SignTokenTransactionFromCoordination_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SignTokenTransactionFromCoordinationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenInternalServiceServer).SignTokenTransactionFromCoordination(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenInternalService_SignTokenTransactionFromCoordination_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenInternalServiceServer).SignTokenTransactionFromCoordination(ctx, req.(*SignTokenTransactionFromCoordinationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SparkTokenInternalService_ExchangeRevocationSecretsShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ExchangeRevocationSecretsSharesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenInternalServiceServer).ExchangeRevocationSecretsShares(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenInternalService_ExchangeRevocationSecretsShares_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenInternalServiceServer).ExchangeRevocationSecretsShares(ctx, req.(*ExchangeRevocationSecretsSharesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SparkTokenInternalService_ServiceDesc is the grpc.ServiceDesc for SparkTokenInternalService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SparkTokenInternalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spark_token.SparkTokenInternalService",
	HandlerType: (*SparkTokenInternalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "prepare_transaction",
			Handler:    _SparkTokenInternalService_PrepareTransaction_Handler,
		},
		{
			MethodName: "sign_token_transaction_from_coordination",
			Handler:    _SparkTokenInternalService_SignTokenTransactionFromCoordination_Handler,
		},
		{
			MethodName: "exchange_revocation_secrets_shares",
			Handler:    _SparkTokenInternalService_ExchangeRevocationSecretsShares_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "spark_token_internal.proto",
}
