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

package spark_token

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 (
	SparkTokenService_StartTransaction_FullMethodName       = "/spark_token.SparkTokenService/start_transaction"
	SparkTokenService_CommitTransaction_FullMethodName      = "/spark_token.SparkTokenService/commit_transaction"
	SparkTokenService_QueryTokenMetadata_FullMethodName     = "/spark_token.SparkTokenService/query_token_metadata"
	SparkTokenService_QueryTokenTransactions_FullMethodName = "/spark_token.SparkTokenService/query_token_transactions"
	SparkTokenService_QueryTokenOutputs_FullMethodName      = "/spark_token.SparkTokenService/query_token_outputs"
	SparkTokenService_FreezeTokens_FullMethodName           = "/spark_token.SparkTokenService/freeze_tokens"
)

// SparkTokenServiceClient is the client API for SparkTokenService 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 SparkTokenServiceClient interface {
	// Start process to create final token transaction with all inputs required
	// from user and SOs (including revocation secret commitment)
	StartTransaction(ctx context.Context, in *StartTransactionRequest, opts ...grpc.CallOption) (*StartTransactionResponse, error)
	// Complete the transaction and commit it with all SOs. This will be
	// coordinated by one SO.
	CommitTransaction(ctx context.Context, in *CommitTransactionRequest, opts ...grpc.CallOption) (*CommitTransactionResponse, error)
	QueryTokenMetadata(ctx context.Context, in *QueryTokenMetadataRequest, opts ...grpc.CallOption) (*QueryTokenMetadataResponse, error)
	QueryTokenTransactions(ctx context.Context, in *QueryTokenTransactionsRequest, opts ...grpc.CallOption) (*QueryTokenTransactionsResponse, error)
	QueryTokenOutputs(ctx context.Context, in *QueryTokenOutputsRequest, opts ...grpc.CallOption) (*QueryTokenOutputsResponse, error)
	FreezeTokens(ctx context.Context, in *FreezeTokensRequest, opts ...grpc.CallOption) (*FreezeTokensResponse, error)
}

type sparkTokenServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSparkTokenServiceClient(cc grpc.ClientConnInterface) SparkTokenServiceClient {
	return &sparkTokenServiceClient{cc}
}

func (c *sparkTokenServiceClient) StartTransaction(ctx context.Context, in *StartTransactionRequest, opts ...grpc.CallOption) (*StartTransactionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StartTransactionResponse)
	err := c.cc.Invoke(ctx, SparkTokenService_StartTransaction_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sparkTokenServiceClient) CommitTransaction(ctx context.Context, in *CommitTransactionRequest, opts ...grpc.CallOption) (*CommitTransactionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CommitTransactionResponse)
	err := c.cc.Invoke(ctx, SparkTokenService_CommitTransaction_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sparkTokenServiceClient) QueryTokenMetadata(ctx context.Context, in *QueryTokenMetadataRequest, opts ...grpc.CallOption) (*QueryTokenMetadataResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(QueryTokenMetadataResponse)
	err := c.cc.Invoke(ctx, SparkTokenService_QueryTokenMetadata_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sparkTokenServiceClient) QueryTokenTransactions(ctx context.Context, in *QueryTokenTransactionsRequest, opts ...grpc.CallOption) (*QueryTokenTransactionsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(QueryTokenTransactionsResponse)
	err := c.cc.Invoke(ctx, SparkTokenService_QueryTokenTransactions_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sparkTokenServiceClient) QueryTokenOutputs(ctx context.Context, in *QueryTokenOutputsRequest, opts ...grpc.CallOption) (*QueryTokenOutputsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(QueryTokenOutputsResponse)
	err := c.cc.Invoke(ctx, SparkTokenService_QueryTokenOutputs_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sparkTokenServiceClient) FreezeTokens(ctx context.Context, in *FreezeTokensRequest, opts ...grpc.CallOption) (*FreezeTokensResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(FreezeTokensResponse)
	err := c.cc.Invoke(ctx, SparkTokenService_FreezeTokens_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SparkTokenServiceServer is the server API for SparkTokenService service.
// All implementations must embed UnimplementedSparkTokenServiceServer
// for forward compatibility.
type SparkTokenServiceServer interface {
	// Start process to create final token transaction with all inputs required
	// from user and SOs (including revocation secret commitment)
	StartTransaction(context.Context, *StartTransactionRequest) (*StartTransactionResponse, error)
	// Complete the transaction and commit it with all SOs. This will be
	// coordinated by one SO.
	CommitTransaction(context.Context, *CommitTransactionRequest) (*CommitTransactionResponse, error)
	QueryTokenMetadata(context.Context, *QueryTokenMetadataRequest) (*QueryTokenMetadataResponse, error)
	QueryTokenTransactions(context.Context, *QueryTokenTransactionsRequest) (*QueryTokenTransactionsResponse, error)
	QueryTokenOutputs(context.Context, *QueryTokenOutputsRequest) (*QueryTokenOutputsResponse, error)
	FreezeTokens(context.Context, *FreezeTokensRequest) (*FreezeTokensResponse, error)
	mustEmbedUnimplementedSparkTokenServiceServer()
}

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

func (UnimplementedSparkTokenServiceServer) StartTransaction(context.Context, *StartTransactionRequest) (*StartTransactionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StartTransaction not implemented")
}
func (UnimplementedSparkTokenServiceServer) CommitTransaction(context.Context, *CommitTransactionRequest) (*CommitTransactionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CommitTransaction not implemented")
}
func (UnimplementedSparkTokenServiceServer) QueryTokenMetadata(context.Context, *QueryTokenMetadataRequest) (*QueryTokenMetadataResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method QueryTokenMetadata not implemented")
}
func (UnimplementedSparkTokenServiceServer) QueryTokenTransactions(context.Context, *QueryTokenTransactionsRequest) (*QueryTokenTransactionsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method QueryTokenTransactions not implemented")
}
func (UnimplementedSparkTokenServiceServer) QueryTokenOutputs(context.Context, *QueryTokenOutputsRequest) (*QueryTokenOutputsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method QueryTokenOutputs not implemented")
}
func (UnimplementedSparkTokenServiceServer) FreezeTokens(context.Context, *FreezeTokensRequest) (*FreezeTokensResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method FreezeTokens not implemented")
}
func (UnimplementedSparkTokenServiceServer) mustEmbedUnimplementedSparkTokenServiceServer() {}
func (UnimplementedSparkTokenServiceServer) testEmbeddedByValue()                           {}

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

func RegisterSparkTokenServiceServer(s grpc.ServiceRegistrar, srv SparkTokenServiceServer) {
	// If the following call pancis, it indicates UnimplementedSparkTokenServiceServer 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(&SparkTokenService_ServiceDesc, srv)
}

func _SparkTokenService_StartTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StartTransactionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenServiceServer).StartTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenService_StartTransaction_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenServiceServer).StartTransaction(ctx, req.(*StartTransactionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SparkTokenService_CommitTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CommitTransactionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenServiceServer).CommitTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenService_CommitTransaction_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenServiceServer).CommitTransaction(ctx, req.(*CommitTransactionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SparkTokenService_QueryTokenMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryTokenMetadataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenServiceServer).QueryTokenMetadata(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenService_QueryTokenMetadata_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenServiceServer).QueryTokenMetadata(ctx, req.(*QueryTokenMetadataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SparkTokenService_QueryTokenTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryTokenTransactionsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenServiceServer).QueryTokenTransactions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenService_QueryTokenTransactions_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenServiceServer).QueryTokenTransactions(ctx, req.(*QueryTokenTransactionsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SparkTokenService_QueryTokenOutputs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryTokenOutputsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenServiceServer).QueryTokenOutputs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenService_QueryTokenOutputs_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenServiceServer).QueryTokenOutputs(ctx, req.(*QueryTokenOutputsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SparkTokenService_FreezeTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FreezeTokensRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SparkTokenServiceServer).FreezeTokens(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SparkTokenService_FreezeTokens_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SparkTokenServiceServer).FreezeTokens(ctx, req.(*FreezeTokensRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SparkTokenService_ServiceDesc is the grpc.ServiceDesc for SparkTokenService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SparkTokenService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spark_token.SparkTokenService",
	HandlerType: (*SparkTokenServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "start_transaction",
			Handler:    _SparkTokenService_StartTransaction_Handler,
		},
		{
			MethodName: "commit_transaction",
			Handler:    _SparkTokenService_CommitTransaction_Handler,
		},
		{
			MethodName: "query_token_metadata",
			Handler:    _SparkTokenService_QueryTokenMetadata_Handler,
		},
		{
			MethodName: "query_token_transactions",
			Handler:    _SparkTokenService_QueryTokenTransactions_Handler,
		},
		{
			MethodName: "query_token_outputs",
			Handler:    _SparkTokenService_QueryTokenOutputs_Handler,
		},
		{
			MethodName: "freeze_tokens",
			Handler:    _SparkTokenService_FreezeTokens_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "spark_token.proto",
}
