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

package arkv1

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 (
	ArkService_GetInfo_FullMethodName                = "/ark.v1.ArkService/GetInfo"
	ArkService_RegisterIntent_FullMethodName         = "/ark.v1.ArkService/RegisterIntent"
	ArkService_DeleteIntent_FullMethodName           = "/ark.v1.ArkService/DeleteIntent"
	ArkService_ConfirmRegistration_FullMethodName    = "/ark.v1.ArkService/ConfirmRegistration"
	ArkService_SubmitTreeNonces_FullMethodName       = "/ark.v1.ArkService/SubmitTreeNonces"
	ArkService_SubmitTreeSignatures_FullMethodName   = "/ark.v1.ArkService/SubmitTreeSignatures"
	ArkService_SubmitSignedForfeitTxs_FullMethodName = "/ark.v1.ArkService/SubmitSignedForfeitTxs"
	ArkService_GetEventStream_FullMethodName         = "/ark.v1.ArkService/GetEventStream"
	ArkService_SubmitTx_FullMethodName               = "/ark.v1.ArkService/SubmitTx"
	ArkService_FinalizeTx_FullMethodName             = "/ark.v1.ArkService/FinalizeTx"
	ArkService_GetPendingTx_FullMethodName           = "/ark.v1.ArkService/GetPendingTx"
	ArkService_GetTransactionsStream_FullMethodName  = "/ark.v1.ArkService/GetTransactionsStream"
)

// ArkServiceClient is the client API for ArkService 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 ArkServiceClient interface {
	// GetInfo returns information and parameters of the server.
	GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
	// RegisterIntent allows to register a new intent that will be eventually selected by the server
	// for a particular batch.
	// The client should provide a BIP-322 message with the intent information, and the server should
	// respond with an intent id.
	RegisterIntent(ctx context.Context, in *RegisterIntentRequest, opts ...grpc.CallOption) (*RegisterIntentResponse, error)
	// DeleteIntent removes a previously registered intent from the server.
	// The client should provide the BIP-322 signature and message including any of the vtxos used in
	// the registered intent to prove its ownership.
	// The server should delete the intent and return success.
	DeleteIntent(ctx context.Context, in *DeleteIntentRequest, opts ...grpc.CallOption) (*DeleteIntentResponse, error)
	// ConfirmRegistration allows a client that has been selected for the next batch to confirm its
	// participation by revealing the intent id.
	ConfirmRegistration(ctx context.Context, in *ConfirmRegistrationRequest, opts ...grpc.CallOption) (*ConfirmRegistrationResponse, error)
	// SubmitTreeNonces allows a cosigner to submit the tree nonces for the musig2 session of a given
	// batch.
	// The client should provide the batch id, the cosigner public key, and the tree nonces.
	// The server should verify the cosigner public key and the nonces, and store them for later
	// aggregation once nonces from all clients are collected.
	SubmitTreeNonces(ctx context.Context, in *SubmitTreeNoncesRequest, opts ...grpc.CallOption) (*SubmitTreeNoncesResponse, error)
	// SubmitTreeSignatures allows a cosigner to submit the tree signatures for the musig2 session of
	// a given batch.
	// The client should provide the batch id, the cosigner public key, and the tree signatures.
	// The server should verify the cosigner public key and the signatures, and store them for later
	// aggregation once signatures from all clients are collected.
	SubmitTreeSignatures(ctx context.Context, in *SubmitTreeSignaturesRequest, opts ...grpc.CallOption) (*SubmitTreeSignaturesResponse, error)
	// SubmitSignedForfeitTxs allows a client to submit signed forfeit transactions and/or signed
	// commitment transaction (in case of onboarding).
	// The server should verify the signed txs and return success.
	SubmitSignedForfeitTxs(ctx context.Context, in *SubmitSignedForfeitTxsRequest, opts ...grpc.CallOption) (*SubmitSignedForfeitTxsResponse, error)
	// GetEventStream is a server-side streaming RPC that allows clients to receive a stream of
	// events related to batch processing.
	// Clients should use this stream as soon as they are ready to join a batch and can listen for
	// various events such as batch start, batch finalization, and other related activities.
	// The server pushes these events to the client in real-time as soon as its ready to move to the
	// next phase of the batch processing.
	GetEventStream(ctx context.Context, in *GetEventStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetEventStreamResponse], error)
	// SubmitTx is the first leg of the process of spending vtxos offchain and allows a client to
	// submit a signed Ark transaction and the unsigned checkpoint transactions.
	// The server should verify the signed transactions and return the fully signed Ark tx and the
	// signed checkpoint txs.
	SubmitTx(ctx context.Context, in *SubmitTxRequest, opts ...grpc.CallOption) (*SubmitTxResponse, error)
	// FinalizeTx is the last lef of the process of spending vtxos offchain and allows a client to
	// submit the fully signed checkpoint txs for the provided Ark txid .
	// The server verifies the signed checkpoint transactions and returns success if everything is
	// valid.
	FinalizeTx(ctx context.Context, in *FinalizeTxRequest, opts ...grpc.CallOption) (*FinalizeTxResponse, error)
	// GetPendingTx returns not finalized transaction(s) for a given set of inputs.
	// the client should provide a BIP322 proof of ownership of the inputs
	GetPendingTx(ctx context.Context, in *GetPendingTxRequest, opts ...grpc.CallOption) (*GetPendingTxResponse, error)
	// GetTransactionsStream is a server-side streaming RPC that allows clients to receive
	// notifications in real-time about any commitment tx or ark tx processed and finalized by the
	// server.
	// NOTE: the stream doesn't have history support, therefore returns only txs from the moment it's
	// opened until it's closed.
	GetTransactionsStream(ctx context.Context, in *GetTransactionsStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetTransactionsStreamResponse], error)
}

type arkServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewArkServiceClient(cc grpc.ClientConnInterface) ArkServiceClient {
	return &arkServiceClient{cc}
}

func (c *arkServiceClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetInfoResponse)
	err := c.cc.Invoke(ctx, ArkService_GetInfo_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) RegisterIntent(ctx context.Context, in *RegisterIntentRequest, opts ...grpc.CallOption) (*RegisterIntentResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegisterIntentResponse)
	err := c.cc.Invoke(ctx, ArkService_RegisterIntent_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) DeleteIntent(ctx context.Context, in *DeleteIntentRequest, opts ...grpc.CallOption) (*DeleteIntentResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteIntentResponse)
	err := c.cc.Invoke(ctx, ArkService_DeleteIntent_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) ConfirmRegistration(ctx context.Context, in *ConfirmRegistrationRequest, opts ...grpc.CallOption) (*ConfirmRegistrationResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ConfirmRegistrationResponse)
	err := c.cc.Invoke(ctx, ArkService_ConfirmRegistration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) SubmitTreeNonces(ctx context.Context, in *SubmitTreeNoncesRequest, opts ...grpc.CallOption) (*SubmitTreeNoncesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SubmitTreeNoncesResponse)
	err := c.cc.Invoke(ctx, ArkService_SubmitTreeNonces_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) SubmitTreeSignatures(ctx context.Context, in *SubmitTreeSignaturesRequest, opts ...grpc.CallOption) (*SubmitTreeSignaturesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SubmitTreeSignaturesResponse)
	err := c.cc.Invoke(ctx, ArkService_SubmitTreeSignatures_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) SubmitSignedForfeitTxs(ctx context.Context, in *SubmitSignedForfeitTxsRequest, opts ...grpc.CallOption) (*SubmitSignedForfeitTxsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SubmitSignedForfeitTxsResponse)
	err := c.cc.Invoke(ctx, ArkService_SubmitSignedForfeitTxs_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) GetEventStream(ctx context.Context, in *GetEventStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetEventStreamResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &ArkService_ServiceDesc.Streams[0], ArkService_GetEventStream_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[GetEventStreamRequest, GetEventStreamResponse]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ArkService_GetEventStreamClient = grpc.ServerStreamingClient[GetEventStreamResponse]

func (c *arkServiceClient) SubmitTx(ctx context.Context, in *SubmitTxRequest, opts ...grpc.CallOption) (*SubmitTxResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SubmitTxResponse)
	err := c.cc.Invoke(ctx, ArkService_SubmitTx_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) FinalizeTx(ctx context.Context, in *FinalizeTxRequest, opts ...grpc.CallOption) (*FinalizeTxResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(FinalizeTxResponse)
	err := c.cc.Invoke(ctx, ArkService_FinalizeTx_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) GetPendingTx(ctx context.Context, in *GetPendingTxRequest, opts ...grpc.CallOption) (*GetPendingTxResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetPendingTxResponse)
	err := c.cc.Invoke(ctx, ArkService_GetPendingTx_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *arkServiceClient) GetTransactionsStream(ctx context.Context, in *GetTransactionsStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetTransactionsStreamResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &ArkService_ServiceDesc.Streams[1], ArkService_GetTransactionsStream_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[GetTransactionsStreamRequest, GetTransactionsStreamResponse]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ArkService_GetTransactionsStreamClient = grpc.ServerStreamingClient[GetTransactionsStreamResponse]

// ArkServiceServer is the server API for ArkService service.
// All implementations should embed UnimplementedArkServiceServer
// for forward compatibility.
type ArkServiceServer interface {
	// GetInfo returns information and parameters of the server.
	GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
	// RegisterIntent allows to register a new intent that will be eventually selected by the server
	// for a particular batch.
	// The client should provide a BIP-322 message with the intent information, and the server should
	// respond with an intent id.
	RegisterIntent(context.Context, *RegisterIntentRequest) (*RegisterIntentResponse, error)
	// DeleteIntent removes a previously registered intent from the server.
	// The client should provide the BIP-322 signature and message including any of the vtxos used in
	// the registered intent to prove its ownership.
	// The server should delete the intent and return success.
	DeleteIntent(context.Context, *DeleteIntentRequest) (*DeleteIntentResponse, error)
	// ConfirmRegistration allows a client that has been selected for the next batch to confirm its
	// participation by revealing the intent id.
	ConfirmRegistration(context.Context, *ConfirmRegistrationRequest) (*ConfirmRegistrationResponse, error)
	// SubmitTreeNonces allows a cosigner to submit the tree nonces for the musig2 session of a given
	// batch.
	// The client should provide the batch id, the cosigner public key, and the tree nonces.
	// The server should verify the cosigner public key and the nonces, and store them for later
	// aggregation once nonces from all clients are collected.
	SubmitTreeNonces(context.Context, *SubmitTreeNoncesRequest) (*SubmitTreeNoncesResponse, error)
	// SubmitTreeSignatures allows a cosigner to submit the tree signatures for the musig2 session of
	// a given batch.
	// The client should provide the batch id, the cosigner public key, and the tree signatures.
	// The server should verify the cosigner public key and the signatures, and store them for later
	// aggregation once signatures from all clients are collected.
	SubmitTreeSignatures(context.Context, *SubmitTreeSignaturesRequest) (*SubmitTreeSignaturesResponse, error)
	// SubmitSignedForfeitTxs allows a client to submit signed forfeit transactions and/or signed
	// commitment transaction (in case of onboarding).
	// The server should verify the signed txs and return success.
	SubmitSignedForfeitTxs(context.Context, *SubmitSignedForfeitTxsRequest) (*SubmitSignedForfeitTxsResponse, error)
	// GetEventStream is a server-side streaming RPC that allows clients to receive a stream of
	// events related to batch processing.
	// Clients should use this stream as soon as they are ready to join a batch and can listen for
	// various events such as batch start, batch finalization, and other related activities.
	// The server pushes these events to the client in real-time as soon as its ready to move to the
	// next phase of the batch processing.
	GetEventStream(*GetEventStreamRequest, grpc.ServerStreamingServer[GetEventStreamResponse]) error
	// SubmitTx is the first leg of the process of spending vtxos offchain and allows a client to
	// submit a signed Ark transaction and the unsigned checkpoint transactions.
	// The server should verify the signed transactions and return the fully signed Ark tx and the
	// signed checkpoint txs.
	SubmitTx(context.Context, *SubmitTxRequest) (*SubmitTxResponse, error)
	// FinalizeTx is the last lef of the process of spending vtxos offchain and allows a client to
	// submit the fully signed checkpoint txs for the provided Ark txid .
	// The server verifies the signed checkpoint transactions and returns success if everything is
	// valid.
	FinalizeTx(context.Context, *FinalizeTxRequest) (*FinalizeTxResponse, error)
	// GetPendingTx returns not finalized transaction(s) for a given set of inputs.
	// the client should provide a BIP322 proof of ownership of the inputs
	GetPendingTx(context.Context, *GetPendingTxRequest) (*GetPendingTxResponse, error)
	// GetTransactionsStream is a server-side streaming RPC that allows clients to receive
	// notifications in real-time about any commitment tx or ark tx processed and finalized by the
	// server.
	// NOTE: the stream doesn't have history support, therefore returns only txs from the moment it's
	// opened until it's closed.
	GetTransactionsStream(*GetTransactionsStreamRequest, grpc.ServerStreamingServer[GetTransactionsStreamResponse]) error
}

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

func (UnimplementedArkServiceServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedArkServiceServer) RegisterIntent(context.Context, *RegisterIntentRequest) (*RegisterIntentResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegisterIntent not implemented")
}
func (UnimplementedArkServiceServer) DeleteIntent(context.Context, *DeleteIntentRequest) (*DeleteIntentResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteIntent not implemented")
}
func (UnimplementedArkServiceServer) ConfirmRegistration(context.Context, *ConfirmRegistrationRequest) (*ConfirmRegistrationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConfirmRegistration not implemented")
}
func (UnimplementedArkServiceServer) SubmitTreeNonces(context.Context, *SubmitTreeNoncesRequest) (*SubmitTreeNoncesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SubmitTreeNonces not implemented")
}
func (UnimplementedArkServiceServer) SubmitTreeSignatures(context.Context, *SubmitTreeSignaturesRequest) (*SubmitTreeSignaturesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SubmitTreeSignatures not implemented")
}
func (UnimplementedArkServiceServer) SubmitSignedForfeitTxs(context.Context, *SubmitSignedForfeitTxsRequest) (*SubmitSignedForfeitTxsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedForfeitTxs not implemented")
}
func (UnimplementedArkServiceServer) GetEventStream(*GetEventStreamRequest, grpc.ServerStreamingServer[GetEventStreamResponse]) error {
	return status.Errorf(codes.Unimplemented, "method GetEventStream not implemented")
}
func (UnimplementedArkServiceServer) SubmitTx(context.Context, *SubmitTxRequest) (*SubmitTxResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SubmitTx not implemented")
}
func (UnimplementedArkServiceServer) FinalizeTx(context.Context, *FinalizeTxRequest) (*FinalizeTxResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method FinalizeTx not implemented")
}
func (UnimplementedArkServiceServer) GetPendingTx(context.Context, *GetPendingTxRequest) (*GetPendingTxResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetPendingTx not implemented")
}
func (UnimplementedArkServiceServer) GetTransactionsStream(*GetTransactionsStreamRequest, grpc.ServerStreamingServer[GetTransactionsStreamResponse]) error {
	return status.Errorf(codes.Unimplemented, "method GetTransactionsStream not implemented")
}
func (UnimplementedArkServiceServer) testEmbeddedByValue() {}

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

func RegisterArkServiceServer(s grpc.ServiceRegistrar, srv ArkServiceServer) {
	// If the following call pancis, it indicates UnimplementedArkServiceServer 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(&ArkService_ServiceDesc, srv)
}

func _ArkService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetInfoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).GetInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_GetInfo_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).GetInfo(ctx, req.(*GetInfoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_RegisterIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegisterIntentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).RegisterIntent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_RegisterIntent_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).RegisterIntent(ctx, req.(*RegisterIntentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_DeleteIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteIntentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).DeleteIntent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_DeleteIntent_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).DeleteIntent(ctx, req.(*DeleteIntentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_ConfirmRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ConfirmRegistrationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).ConfirmRegistration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_ConfirmRegistration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).ConfirmRegistration(ctx, req.(*ConfirmRegistrationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_SubmitTreeNonces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SubmitTreeNoncesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).SubmitTreeNonces(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_SubmitTreeNonces_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).SubmitTreeNonces(ctx, req.(*SubmitTreeNoncesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_SubmitTreeSignatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SubmitTreeSignaturesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).SubmitTreeSignatures(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_SubmitTreeSignatures_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).SubmitTreeSignatures(ctx, req.(*SubmitTreeSignaturesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_SubmitSignedForfeitTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SubmitSignedForfeitTxsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).SubmitSignedForfeitTxs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_SubmitSignedForfeitTxs_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).SubmitSignedForfeitTxs(ctx, req.(*SubmitSignedForfeitTxsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_GetEventStream_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetEventStreamRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(ArkServiceServer).GetEventStream(m, &grpc.GenericServerStream[GetEventStreamRequest, GetEventStreamResponse]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ArkService_GetEventStreamServer = grpc.ServerStreamingServer[GetEventStreamResponse]

func _ArkService_SubmitTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SubmitTxRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).SubmitTx(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_SubmitTx_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).SubmitTx(ctx, req.(*SubmitTxRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_FinalizeTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FinalizeTxRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).FinalizeTx(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_FinalizeTx_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).FinalizeTx(ctx, req.(*FinalizeTxRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_GetPendingTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetPendingTxRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArkServiceServer).GetPendingTx(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArkService_GetPendingTx_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArkServiceServer).GetPendingTx(ctx, req.(*GetPendingTxRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArkService_GetTransactionsStream_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetTransactionsStreamRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(ArkServiceServer).GetTransactionsStream(m, &grpc.GenericServerStream[GetTransactionsStreamRequest, GetTransactionsStreamResponse]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ArkService_GetTransactionsStreamServer = grpc.ServerStreamingServer[GetTransactionsStreamResponse]

// ArkService_ServiceDesc is the grpc.ServiceDesc for ArkService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ArkService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ark.v1.ArkService",
	HandlerType: (*ArkServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _ArkService_GetInfo_Handler,
		},
		{
			MethodName: "RegisterIntent",
			Handler:    _ArkService_RegisterIntent_Handler,
		},
		{
			MethodName: "DeleteIntent",
			Handler:    _ArkService_DeleteIntent_Handler,
		},
		{
			MethodName: "ConfirmRegistration",
			Handler:    _ArkService_ConfirmRegistration_Handler,
		},
		{
			MethodName: "SubmitTreeNonces",
			Handler:    _ArkService_SubmitTreeNonces_Handler,
		},
		{
			MethodName: "SubmitTreeSignatures",
			Handler:    _ArkService_SubmitTreeSignatures_Handler,
		},
		{
			MethodName: "SubmitSignedForfeitTxs",
			Handler:    _ArkService_SubmitSignedForfeitTxs_Handler,
		},
		{
			MethodName: "SubmitTx",
			Handler:    _ArkService_SubmitTx_Handler,
		},
		{
			MethodName: "FinalizeTx",
			Handler:    _ArkService_FinalizeTx_Handler,
		},
		{
			MethodName: "GetPendingTx",
			Handler:    _ArkService_GetPendingTx_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetEventStream",
			Handler:       _ArkService_GetEventStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetTransactionsStream",
			Handler:       _ArkService_GetTransactionsStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "ark/v1/service.proto",
}
