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

// Package blockchain_api defines the gRPC service interface for blockchain operations.

package blockchain_api

import (
	context "context"
	model "github.com/bsv-blockchain/teranode/model"
	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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	BlockchainAPI_HealthGRPC_FullMethodName                           = "/blockchain_api.BlockchainAPI/HealthGRPC"
	BlockchainAPI_AddBlock_FullMethodName                             = "/blockchain_api.BlockchainAPI/AddBlock"
	BlockchainAPI_GetBlock_FullMethodName                             = "/blockchain_api.BlockchainAPI/GetBlock"
	BlockchainAPI_GetBlocks_FullMethodName                            = "/blockchain_api.BlockchainAPI/GetBlocks"
	BlockchainAPI_GetBlockByHeight_FullMethodName                     = "/blockchain_api.BlockchainAPI/GetBlockByHeight"
	BlockchainAPI_GetBlockByID_FullMethodName                         = "/blockchain_api.BlockchainAPI/GetBlockByID"
	BlockchainAPI_GetNextBlockID_FullMethodName                       = "/blockchain_api.BlockchainAPI/GetNextBlockID"
	BlockchainAPI_GetBlockStats_FullMethodName                        = "/blockchain_api.BlockchainAPI/GetBlockStats"
	BlockchainAPI_GetBlockGraphData_FullMethodName                    = "/blockchain_api.BlockchainAPI/GetBlockGraphData"
	BlockchainAPI_GetLastNBlocks_FullMethodName                       = "/blockchain_api.BlockchainAPI/GetLastNBlocks"
	BlockchainAPI_GetLastNInvalidBlocks_FullMethodName                = "/blockchain_api.BlockchainAPI/GetLastNInvalidBlocks"
	BlockchainAPI_GetSuitableBlock_FullMethodName                     = "/blockchain_api.BlockchainAPI/GetSuitableBlock"
	BlockchainAPI_GetHashOfAncestorBlock_FullMethodName               = "/blockchain_api.BlockchainAPI/GetHashOfAncestorBlock"
	BlockchainAPI_GetLatestBlockHeaderFromBlockLocator_FullMethodName = "/blockchain_api.BlockchainAPI/GetLatestBlockHeaderFromBlockLocator"
	BlockchainAPI_GetBlockHeadersFromOldest_FullMethodName            = "/blockchain_api.BlockchainAPI/GetBlockHeadersFromOldest"
	BlockchainAPI_GetNextWorkRequired_FullMethodName                  = "/blockchain_api.BlockchainAPI/GetNextWorkRequired"
	BlockchainAPI_GetBlockExists_FullMethodName                       = "/blockchain_api.BlockchainAPI/GetBlockExists"
	BlockchainAPI_GetBlockHeaders_FullMethodName                      = "/blockchain_api.BlockchainAPI/GetBlockHeaders"
	BlockchainAPI_GetBlockHeadersToCommonAncestor_FullMethodName      = "/blockchain_api.BlockchainAPI/GetBlockHeadersToCommonAncestor"
	BlockchainAPI_GetBlockHeadersFromCommonAncestor_FullMethodName    = "/blockchain_api.BlockchainAPI/GetBlockHeadersFromCommonAncestor"
	BlockchainAPI_GetBlockHeadersFromTill_FullMethodName              = "/blockchain_api.BlockchainAPI/GetBlockHeadersFromTill"
	BlockchainAPI_GetBlockHeadersFromHeight_FullMethodName            = "/blockchain_api.BlockchainAPI/GetBlockHeadersFromHeight"
	BlockchainAPI_GetBlockHeadersByHeight_FullMethodName              = "/blockchain_api.BlockchainAPI/GetBlockHeadersByHeight"
	BlockchainAPI_GetBlockHeaderIDs_FullMethodName                    = "/blockchain_api.BlockchainAPI/GetBlockHeaderIDs"
	BlockchainAPI_GetBestBlockHeader_FullMethodName                   = "/blockchain_api.BlockchainAPI/GetBestBlockHeader"
	BlockchainAPI_CheckBlockIsInCurrentChain_FullMethodName           = "/blockchain_api.BlockchainAPI/CheckBlockIsInCurrentChain"
	BlockchainAPI_GetChainTips_FullMethodName                         = "/blockchain_api.BlockchainAPI/GetChainTips"
	BlockchainAPI_GetBlockHeader_FullMethodName                       = "/blockchain_api.BlockchainAPI/GetBlockHeader"
	BlockchainAPI_InvalidateBlock_FullMethodName                      = "/blockchain_api.BlockchainAPI/InvalidateBlock"
	BlockchainAPI_RevalidateBlock_FullMethodName                      = "/blockchain_api.BlockchainAPI/RevalidateBlock"
	BlockchainAPI_Subscribe_FullMethodName                            = "/blockchain_api.BlockchainAPI/Subscribe"
	BlockchainAPI_SendNotification_FullMethodName                     = "/blockchain_api.BlockchainAPI/SendNotification"
	BlockchainAPI_GetState_FullMethodName                             = "/blockchain_api.BlockchainAPI/GetState"
	BlockchainAPI_SetState_FullMethodName                             = "/blockchain_api.BlockchainAPI/SetState"
	BlockchainAPI_GetBlockIsMined_FullMethodName                      = "/blockchain_api.BlockchainAPI/GetBlockIsMined"
	BlockchainAPI_SetBlockMinedSet_FullMethodName                     = "/blockchain_api.BlockchainAPI/SetBlockMinedSet"
	BlockchainAPI_GetBlocksMinedNotSet_FullMethodName                 = "/blockchain_api.BlockchainAPI/GetBlocksMinedNotSet"
	BlockchainAPI_SetBlockSubtreesSet_FullMethodName                  = "/blockchain_api.BlockchainAPI/SetBlockSubtreesSet"
	BlockchainAPI_GetBlocksSubtreesNotSet_FullMethodName              = "/blockchain_api.BlockchainAPI/GetBlocksSubtreesNotSet"
	BlockchainAPI_SetBlockProcessedAt_FullMethodName                  = "/blockchain_api.BlockchainAPI/SetBlockProcessedAt"
	BlockchainAPI_SendFSMEvent_FullMethodName                         = "/blockchain_api.BlockchainAPI/SendFSMEvent"
	BlockchainAPI_GetFSMCurrentState_FullMethodName                   = "/blockchain_api.BlockchainAPI/GetFSMCurrentState"
	BlockchainAPI_WaitFSMToTransitionToGivenState_FullMethodName      = "/blockchain_api.BlockchainAPI/WaitFSMToTransitionToGivenState"
	BlockchainAPI_WaitUntilFSMTransitionFromIdleState_FullMethodName  = "/blockchain_api.BlockchainAPI/WaitUntilFSMTransitionFromIdleState"
	BlockchainAPI_Run_FullMethodName                                  = "/blockchain_api.BlockchainAPI/Run"
	BlockchainAPI_CatchUpBlocks_FullMethodName                        = "/blockchain_api.BlockchainAPI/CatchUpBlocks"
	BlockchainAPI_LegacySync_FullMethodName                           = "/blockchain_api.BlockchainAPI/LegacySync"
	BlockchainAPI_Idle_FullMethodName                                 = "/blockchain_api.BlockchainAPI/Idle"
	BlockchainAPI_ReportPeerFailure_FullMethodName                    = "/blockchain_api.BlockchainAPI/ReportPeerFailure"
	BlockchainAPI_GetBlockLocator_FullMethodName                      = "/blockchain_api.BlockchainAPI/GetBlockLocator"
	BlockchainAPI_LocateBlockHeaders_FullMethodName                   = "/blockchain_api.BlockchainAPI/LocateBlockHeaders"
	BlockchainAPI_GetBestHeightAndTime_FullMethodName                 = "/blockchain_api.BlockchainAPI/GetBestHeightAndTime"
)

// BlockchainAPIClient is the client API for BlockchainAPI 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.
//
// BlockchainAPI service provides comprehensive blockchain management functionality.
type BlockchainAPIClient interface {
	// HealthGRPC checks the health status of the blockchain service.
	HealthGRPC(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error)
	// AddBlock adds a new block to the blockchain.
	// Called by BlockValidator to add validated blocks.
	AddBlock(ctx context.Context, in *AddBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetBlock retrieves a block by its hash.
	GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error)
	// GetBlocks retrieves multiple blocks starting from a specific hash.
	GetBlocks(ctx context.Context, in *GetBlocksRequest, opts ...grpc.CallOption) (*GetBlocksResponse, error)
	// GetBlockByHeight retrieves a block at a specific height.
	GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockResponse, error)
	// GetBlockByID retrieves a block by its id.
	GetBlockByID(ctx context.Context, in *GetBlockByIDRequest, opts ...grpc.CallOption) (*GetBlockResponse, error)
	// GetNextBlockID retrieves the next available block ID.
	GetNextBlockID(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNextBlockIDResponse, error)
	// GetBlockStats retrieves statistical information about the blockchain.
	GetBlockStats(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*model.BlockStats, error)
	// GetBlockGraphData retrieves data points for blockchain visualization.
	GetBlockGraphData(ctx context.Context, in *GetBlockGraphDataRequest, opts ...grpc.CallOption) (*model.BlockDataPoints, error)
	// GetLastNBlocks retrieves the most recent N blocks from the blockchain.
	GetLastNBlocks(ctx context.Context, in *GetLastNBlocksRequest, opts ...grpc.CallOption) (*GetLastNBlocksResponse, error)
	// GetLastNInvalidBlocks retrieves the most recent N blocks that have been marked as invalid.
	GetLastNInvalidBlocks(ctx context.Context, in *GetLastNInvalidBlocksRequest, opts ...grpc.CallOption) (*GetLastNInvalidBlocksResponse, error)
	// GetSuitableBlock finds a suitable block for mining purposes.
	GetSuitableBlock(ctx context.Context, in *GetSuitableBlockRequest, opts ...grpc.CallOption) (*GetSuitableBlockResponse, error)
	// GetHashOfAncestorBlock retrieves the hash of an ancestor block at a specified depth.
	GetHashOfAncestorBlock(ctx context.Context, in *GetHashOfAncestorBlockRequest, opts ...grpc.CallOption) (*GetHashOfAncestorBlockResponse, error)
	// GetLatestBlockHeaderFromBlockLocator retrieves the latest block header using a block locator.
	GetLatestBlockHeaderFromBlockLocator(ctx context.Context, in *GetLatestBlockHeaderFromBlockLocatorRequest, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error)
	// GetBlockHeadersFromOldest retrieves block headers starting from the oldest block.
	GetBlockHeadersFromOldest(ctx context.Context, in *GetBlockHeadersFromOldestRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error)
	// GetNextWorkRequired calculates the required proof of work for the next block.
	GetNextWorkRequired(ctx context.Context, in *GetNextWorkRequiredRequest, opts ...grpc.CallOption) (*GetNextWorkRequiredResponse, error)
	// GetBlockExists checks if a block exists in the blockchain.
	GetBlockExists(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockExistsResponse, error)
	// GetBlockHeaders retrieves headers for multiple blocks.
	GetBlockHeaders(ctx context.Context, in *GetBlockHeadersRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersToCommonAncestor retrieves headers from a block to its common ancestor.
	GetBlockHeadersToCommonAncestor(ctx context.Context, in *GetBlockHeadersToCommonAncestorRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersFromCommonAncestor retrieves headers from a common ancestor to a target block.
	GetBlockHeadersFromCommonAncestor(ctx context.Context, in *GetBlockHeadersFromCommonAncestorRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersFromTill retrieves block headers between two specified blocks.
	GetBlockHeadersFromTill(ctx context.Context, in *GetBlockHeadersFromTillRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersFromHeight retrieves block headers starting from a specific height.
	GetBlockHeadersFromHeight(ctx context.Context, in *GetBlockHeadersFromHeightRequest, opts ...grpc.CallOption) (*GetBlockHeadersFromHeightResponse, error)
	// GetBlockHeadersByHeight retrieves block headers between two specified heights.
	GetBlockHeadersByHeight(ctx context.Context, in *GetBlockHeadersByHeightRequest, opts ...grpc.CallOption) (*GetBlockHeadersByHeightResponse, error)
	// GetBlockHeaderIDs retrieves block header IDs for a range of blocks.
	GetBlockHeaderIDs(ctx context.Context, in *GetBlockHeadersRequest, opts ...grpc.CallOption) (*GetBlockHeaderIDsResponse, error)
	// GetBestBlockHeader retrieves the header of the current best block.
	GetBestBlockHeader(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error)
	// CheckBlockIsInCurrentChain verifies if specified blocks are in the main chain.
	CheckBlockIsInCurrentChain(ctx context.Context, in *CheckBlockIsCurrentChainRequest, opts ...grpc.CallOption) (*CheckBlockIsCurrentChainResponse, error)
	// GetChainTips retrieves information about all known tips in the block tree.
	GetChainTips(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetChainTipsResponse, error)
	// GetBlockHeader retrieves the header of a specific block.
	GetBlockHeader(ctx context.Context, in *GetBlockHeaderRequest, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error)
	// InvalidateBlock marks a block as invalid in the blockchain.
	InvalidateBlock(ctx context.Context, in *InvalidateBlockRequest, opts ...grpc.CallOption) (*InvalidateBlockResponse, error)
	// RevalidateBlock restores a previously invalidated block.
	RevalidateBlock(ctx context.Context, in *RevalidateBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Subscribe creates a subscription for blockchain notifications.
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Notification], error)
	// SendNotification broadcasts a notification to subscribers.
	SendNotification(ctx context.Context, in *Notification, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetState retrieves state data by key.
	GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*StateResponse, error)
	// SetState stores state data with a key.
	SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetBlockIsMined checks if a block is marked as mined.
	GetBlockIsMined(ctx context.Context, in *GetBlockIsMinedRequest, opts ...grpc.CallOption) (*GetBlockIsMinedResponse, error)
	// SetBlockMinedSet marks a block as mined.
	SetBlockMinedSet(ctx context.Context, in *SetBlockMinedSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetBlocksMinedNotSet retrieves blocks not marked as mined.
	GetBlocksMinedNotSet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBlocksMinedNotSetResponse, error)
	// SetBlockSubtreesSet marks a block's subtrees as set.
	SetBlockSubtreesSet(ctx context.Context, in *SetBlockSubtreesSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetBlocksSubtreesNotSet retrieves blocks with unset subtrees.
	GetBlocksSubtreesNotSet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBlocksSubtreesNotSetResponse, error)
	// SetBlockProcessedAt sets or clears the processed_at timestamp for a block.
	SetBlockProcessedAt(ctx context.Context, in *SetBlockProcessedAtRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// SendFSMEvent sends an event to the blockchain FSM.
	SendFSMEvent(ctx context.Context, in *SendFSMEventRequest, opts ...grpc.CallOption) (*GetFSMStateResponse, error)
	// GetFSMCurrentState retrieves the current state of the FSM.
	GetFSMCurrentState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFSMStateResponse, error)
	// WaitFSMToTransitionToGivenState waits for FSM to reach a specific state.
	WaitFSMToTransitionToGivenState(ctx context.Context, in *WaitFSMToTransitionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// WaitUntilFSMTransitionFromIdleState waits for FSM to transition from IDLE state.
	WaitUntilFSMTransitionFromIdleState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Run transitions the blockchain service to running state.
	Run(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// CatchUpBlocks initiates block catch-up process.
	CatchUpBlocks(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// LegacySync initiates legacy synchronization process.
	LegacySync(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Idle marks the service as idle.
	Idle(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ReportPeerFailure notifies about peer download failures (catchup, subtree, block, etc).
	ReportPeerFailure(ctx context.Context, in *ReportPeerFailureRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetBlockLocator retrieves a block locator for chain synchronization.
	GetBlockLocator(ctx context.Context, in *GetBlockLocatorRequest, opts ...grpc.CallOption) (*GetBlockLocatorResponse, error)
	// LocateBlockHeaders finds block headers using a locator.
	LocateBlockHeaders(ctx context.Context, in *LocateBlockHeadersRequest, opts ...grpc.CallOption) (*LocateBlockHeadersResponse, error)
	// GetBestHeightAndTime retrieves the current best height and median time.
	GetBestHeightAndTime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBestHeightAndTimeResponse, error)
}

type blockchainAPIClient struct {
	cc grpc.ClientConnInterface
}

func NewBlockchainAPIClient(cc grpc.ClientConnInterface) BlockchainAPIClient {
	return &blockchainAPIClient{cc}
}

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

func (c *blockchainAPIClient) AddBlock(ctx context.Context, in *AddBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_AddBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlocks(ctx context.Context, in *GetBlocksRequest, opts ...grpc.CallOption) (*GetBlocksResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlocksResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlocks_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockByHeight_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockByID(ctx context.Context, in *GetBlockByIDRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockByID_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetNextBlockID(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNextBlockIDResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetNextBlockIDResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetNextBlockID_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockStats(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*model.BlockStats, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(model.BlockStats)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockStats_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockGraphData(ctx context.Context, in *GetBlockGraphDataRequest, opts ...grpc.CallOption) (*model.BlockDataPoints, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(model.BlockDataPoints)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockGraphData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetLastNBlocks(ctx context.Context, in *GetLastNBlocksRequest, opts ...grpc.CallOption) (*GetLastNBlocksResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetLastNBlocksResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetLastNBlocks_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetLastNInvalidBlocks(ctx context.Context, in *GetLastNInvalidBlocksRequest, opts ...grpc.CallOption) (*GetLastNInvalidBlocksResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetLastNInvalidBlocksResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetLastNInvalidBlocks_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetSuitableBlock(ctx context.Context, in *GetSuitableBlockRequest, opts ...grpc.CallOption) (*GetSuitableBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetSuitableBlockResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetSuitableBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetHashOfAncestorBlock(ctx context.Context, in *GetHashOfAncestorBlockRequest, opts ...grpc.CallOption) (*GetHashOfAncestorBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetHashOfAncestorBlockResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetHashOfAncestorBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetLatestBlockHeaderFromBlockLocator(ctx context.Context, in *GetLatestBlockHeaderFromBlockLocatorRequest, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeaderResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetLatestBlockHeaderFromBlockLocator_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeadersFromOldest(ctx context.Context, in *GetBlockHeadersFromOldestRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeadersResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeadersFromOldest_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetNextWorkRequired(ctx context.Context, in *GetNextWorkRequiredRequest, opts ...grpc.CallOption) (*GetNextWorkRequiredResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetNextWorkRequiredResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetNextWorkRequired_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockExists(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockExistsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockExistsResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockExists_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeaders(ctx context.Context, in *GetBlockHeadersRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeadersResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeaders_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeadersToCommonAncestor(ctx context.Context, in *GetBlockHeadersToCommonAncestorRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeadersResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeadersToCommonAncestor_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeadersFromCommonAncestor(ctx context.Context, in *GetBlockHeadersFromCommonAncestorRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeadersResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeadersFromCommonAncestor_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeadersFromTill(ctx context.Context, in *GetBlockHeadersFromTillRequest, opts ...grpc.CallOption) (*GetBlockHeadersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeadersResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeadersFromTill_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeadersFromHeight(ctx context.Context, in *GetBlockHeadersFromHeightRequest, opts ...grpc.CallOption) (*GetBlockHeadersFromHeightResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeadersFromHeightResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeadersFromHeight_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeadersByHeight(ctx context.Context, in *GetBlockHeadersByHeightRequest, opts ...grpc.CallOption) (*GetBlockHeadersByHeightResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeadersByHeightResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeadersByHeight_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeaderIDs(ctx context.Context, in *GetBlockHeadersRequest, opts ...grpc.CallOption) (*GetBlockHeaderIDsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeaderIDsResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeaderIDs_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBestBlockHeader(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeaderResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBestBlockHeader_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) CheckBlockIsInCurrentChain(ctx context.Context, in *CheckBlockIsCurrentChainRequest, opts ...grpc.CallOption) (*CheckBlockIsCurrentChainResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CheckBlockIsCurrentChainResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_CheckBlockIsInCurrentChain_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetChainTips(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetChainTipsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetChainTipsResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetChainTips_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockHeader(ctx context.Context, in *GetBlockHeaderRequest, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockHeaderResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockHeader_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) InvalidateBlock(ctx context.Context, in *InvalidateBlockRequest, opts ...grpc.CallOption) (*InvalidateBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(InvalidateBlockResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_InvalidateBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) RevalidateBlock(ctx context.Context, in *RevalidateBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_RevalidateBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Notification], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &BlockchainAPI_ServiceDesc.Streams[0], BlockchainAPI_Subscribe_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[SubscribeRequest, Notification]{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 BlockchainAPI_SubscribeClient = grpc.ServerStreamingClient[Notification]

func (c *blockchainAPIClient) SendNotification(ctx context.Context, in *Notification, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_SendNotification_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StateResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetState_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_SetState_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockIsMined(ctx context.Context, in *GetBlockIsMinedRequest, opts ...grpc.CallOption) (*GetBlockIsMinedResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockIsMinedResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockIsMined_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) SetBlockMinedSet(ctx context.Context, in *SetBlockMinedSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_SetBlockMinedSet_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlocksMinedNotSet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBlocksMinedNotSetResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlocksMinedNotSetResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlocksMinedNotSet_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) SetBlockSubtreesSet(ctx context.Context, in *SetBlockSubtreesSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_SetBlockSubtreesSet_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlocksSubtreesNotSet(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBlocksSubtreesNotSetResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlocksSubtreesNotSetResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlocksSubtreesNotSet_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) SetBlockProcessedAt(ctx context.Context, in *SetBlockProcessedAtRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_SetBlockProcessedAt_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) SendFSMEvent(ctx context.Context, in *SendFSMEventRequest, opts ...grpc.CallOption) (*GetFSMStateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetFSMStateResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_SendFSMEvent_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetFSMCurrentState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFSMStateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetFSMStateResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetFSMCurrentState_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) WaitFSMToTransitionToGivenState(ctx context.Context, in *WaitFSMToTransitionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_WaitFSMToTransitionToGivenState_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) WaitUntilFSMTransitionFromIdleState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_WaitUntilFSMTransitionFromIdleState_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) Run(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_Run_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) CatchUpBlocks(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_CatchUpBlocks_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) LegacySync(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_LegacySync_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) Idle(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_Idle_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) ReportPeerFailure(ctx context.Context, in *ReportPeerFailureRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, BlockchainAPI_ReportPeerFailure_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBlockLocator(ctx context.Context, in *GetBlockLocatorRequest, opts ...grpc.CallOption) (*GetBlockLocatorResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBlockLocatorResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBlockLocator_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) LocateBlockHeaders(ctx context.Context, in *LocateBlockHeadersRequest, opts ...grpc.CallOption) (*LocateBlockHeadersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LocateBlockHeadersResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_LocateBlockHeaders_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockchainAPIClient) GetBestHeightAndTime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBestHeightAndTimeResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetBestHeightAndTimeResponse)
	err := c.cc.Invoke(ctx, BlockchainAPI_GetBestHeightAndTime_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BlockchainAPIServer is the server API for BlockchainAPI service.
// All implementations must embed UnimplementedBlockchainAPIServer
// for forward compatibility.
//
// BlockchainAPI service provides comprehensive blockchain management functionality.
type BlockchainAPIServer interface {
	// HealthGRPC checks the health status of the blockchain service.
	HealthGRPC(context.Context, *emptypb.Empty) (*HealthResponse, error)
	// AddBlock adds a new block to the blockchain.
	// Called by BlockValidator to add validated blocks.
	AddBlock(context.Context, *AddBlockRequest) (*emptypb.Empty, error)
	// GetBlock retrieves a block by its hash.
	GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error)
	// GetBlocks retrieves multiple blocks starting from a specific hash.
	GetBlocks(context.Context, *GetBlocksRequest) (*GetBlocksResponse, error)
	// GetBlockByHeight retrieves a block at a specific height.
	GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockResponse, error)
	// GetBlockByID retrieves a block by its id.
	GetBlockByID(context.Context, *GetBlockByIDRequest) (*GetBlockResponse, error)
	// GetNextBlockID retrieves the next available block ID.
	GetNextBlockID(context.Context, *emptypb.Empty) (*GetNextBlockIDResponse, error)
	// GetBlockStats retrieves statistical information about the blockchain.
	GetBlockStats(context.Context, *emptypb.Empty) (*model.BlockStats, error)
	// GetBlockGraphData retrieves data points for blockchain visualization.
	GetBlockGraphData(context.Context, *GetBlockGraphDataRequest) (*model.BlockDataPoints, error)
	// GetLastNBlocks retrieves the most recent N blocks from the blockchain.
	GetLastNBlocks(context.Context, *GetLastNBlocksRequest) (*GetLastNBlocksResponse, error)
	// GetLastNInvalidBlocks retrieves the most recent N blocks that have been marked as invalid.
	GetLastNInvalidBlocks(context.Context, *GetLastNInvalidBlocksRequest) (*GetLastNInvalidBlocksResponse, error)
	// GetSuitableBlock finds a suitable block for mining purposes.
	GetSuitableBlock(context.Context, *GetSuitableBlockRequest) (*GetSuitableBlockResponse, error)
	// GetHashOfAncestorBlock retrieves the hash of an ancestor block at a specified depth.
	GetHashOfAncestorBlock(context.Context, *GetHashOfAncestorBlockRequest) (*GetHashOfAncestorBlockResponse, error)
	// GetLatestBlockHeaderFromBlockLocator retrieves the latest block header using a block locator.
	GetLatestBlockHeaderFromBlockLocator(context.Context, *GetLatestBlockHeaderFromBlockLocatorRequest) (*GetBlockHeaderResponse, error)
	// GetBlockHeadersFromOldest retrieves block headers starting from the oldest block.
	GetBlockHeadersFromOldest(context.Context, *GetBlockHeadersFromOldestRequest) (*GetBlockHeadersResponse, error)
	// GetNextWorkRequired calculates the required proof of work for the next block.
	GetNextWorkRequired(context.Context, *GetNextWorkRequiredRequest) (*GetNextWorkRequiredResponse, error)
	// GetBlockExists checks if a block exists in the blockchain.
	GetBlockExists(context.Context, *GetBlockRequest) (*GetBlockExistsResponse, error)
	// GetBlockHeaders retrieves headers for multiple blocks.
	GetBlockHeaders(context.Context, *GetBlockHeadersRequest) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersToCommonAncestor retrieves headers from a block to its common ancestor.
	GetBlockHeadersToCommonAncestor(context.Context, *GetBlockHeadersToCommonAncestorRequest) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersFromCommonAncestor retrieves headers from a common ancestor to a target block.
	GetBlockHeadersFromCommonAncestor(context.Context, *GetBlockHeadersFromCommonAncestorRequest) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersFromTill retrieves block headers between two specified blocks.
	GetBlockHeadersFromTill(context.Context, *GetBlockHeadersFromTillRequest) (*GetBlockHeadersResponse, error)
	// GetBlockHeadersFromHeight retrieves block headers starting from a specific height.
	GetBlockHeadersFromHeight(context.Context, *GetBlockHeadersFromHeightRequest) (*GetBlockHeadersFromHeightResponse, error)
	// GetBlockHeadersByHeight retrieves block headers between two specified heights.
	GetBlockHeadersByHeight(context.Context, *GetBlockHeadersByHeightRequest) (*GetBlockHeadersByHeightResponse, error)
	// GetBlockHeaderIDs retrieves block header IDs for a range of blocks.
	GetBlockHeaderIDs(context.Context, *GetBlockHeadersRequest) (*GetBlockHeaderIDsResponse, error)
	// GetBestBlockHeader retrieves the header of the current best block.
	GetBestBlockHeader(context.Context, *emptypb.Empty) (*GetBlockHeaderResponse, error)
	// CheckBlockIsInCurrentChain verifies if specified blocks are in the main chain.
	CheckBlockIsInCurrentChain(context.Context, *CheckBlockIsCurrentChainRequest) (*CheckBlockIsCurrentChainResponse, error)
	// GetChainTips retrieves information about all known tips in the block tree.
	GetChainTips(context.Context, *emptypb.Empty) (*GetChainTipsResponse, error)
	// GetBlockHeader retrieves the header of a specific block.
	GetBlockHeader(context.Context, *GetBlockHeaderRequest) (*GetBlockHeaderResponse, error)
	// InvalidateBlock marks a block as invalid in the blockchain.
	InvalidateBlock(context.Context, *InvalidateBlockRequest) (*InvalidateBlockResponse, error)
	// RevalidateBlock restores a previously invalidated block.
	RevalidateBlock(context.Context, *RevalidateBlockRequest) (*emptypb.Empty, error)
	// Subscribe creates a subscription for blockchain notifications.
	Subscribe(*SubscribeRequest, grpc.ServerStreamingServer[Notification]) error
	// SendNotification broadcasts a notification to subscribers.
	SendNotification(context.Context, *Notification) (*emptypb.Empty, error)
	// GetState retrieves state data by key.
	GetState(context.Context, *GetStateRequest) (*StateResponse, error)
	// SetState stores state data with a key.
	SetState(context.Context, *SetStateRequest) (*emptypb.Empty, error)
	// GetBlockIsMined checks if a block is marked as mined.
	GetBlockIsMined(context.Context, *GetBlockIsMinedRequest) (*GetBlockIsMinedResponse, error)
	// SetBlockMinedSet marks a block as mined.
	SetBlockMinedSet(context.Context, *SetBlockMinedSetRequest) (*emptypb.Empty, error)
	// GetBlocksMinedNotSet retrieves blocks not marked as mined.
	GetBlocksMinedNotSet(context.Context, *emptypb.Empty) (*GetBlocksMinedNotSetResponse, error)
	// SetBlockSubtreesSet marks a block's subtrees as set.
	SetBlockSubtreesSet(context.Context, *SetBlockSubtreesSetRequest) (*emptypb.Empty, error)
	// GetBlocksSubtreesNotSet retrieves blocks with unset subtrees.
	GetBlocksSubtreesNotSet(context.Context, *emptypb.Empty) (*GetBlocksSubtreesNotSetResponse, error)
	// SetBlockProcessedAt sets or clears the processed_at timestamp for a block.
	SetBlockProcessedAt(context.Context, *SetBlockProcessedAtRequest) (*emptypb.Empty, error)
	// SendFSMEvent sends an event to the blockchain FSM.
	SendFSMEvent(context.Context, *SendFSMEventRequest) (*GetFSMStateResponse, error)
	// GetFSMCurrentState retrieves the current state of the FSM.
	GetFSMCurrentState(context.Context, *emptypb.Empty) (*GetFSMStateResponse, error)
	// WaitFSMToTransitionToGivenState waits for FSM to reach a specific state.
	WaitFSMToTransitionToGivenState(context.Context, *WaitFSMToTransitionRequest) (*emptypb.Empty, error)
	// WaitUntilFSMTransitionFromIdleState waits for FSM to transition from IDLE state.
	WaitUntilFSMTransitionFromIdleState(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Run transitions the blockchain service to running state.
	Run(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// CatchUpBlocks initiates block catch-up process.
	CatchUpBlocks(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// LegacySync initiates legacy synchronization process.
	LegacySync(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Idle marks the service as idle.
	Idle(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// ReportPeerFailure notifies about peer download failures (catchup, subtree, block, etc).
	ReportPeerFailure(context.Context, *ReportPeerFailureRequest) (*emptypb.Empty, error)
	// GetBlockLocator retrieves a block locator for chain synchronization.
	GetBlockLocator(context.Context, *GetBlockLocatorRequest) (*GetBlockLocatorResponse, error)
	// LocateBlockHeaders finds block headers using a locator.
	LocateBlockHeaders(context.Context, *LocateBlockHeadersRequest) (*LocateBlockHeadersResponse, error)
	// GetBestHeightAndTime retrieves the current best height and median time.
	GetBestHeightAndTime(context.Context, *emptypb.Empty) (*GetBestHeightAndTimeResponse, error)
	mustEmbedUnimplementedBlockchainAPIServer()
}

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

func (UnimplementedBlockchainAPIServer) HealthGRPC(context.Context, *emptypb.Empty) (*HealthResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HealthGRPC not implemented")
}
func (UnimplementedBlockchainAPIServer) AddBlock(context.Context, *AddBlockRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddBlock not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlocks(context.Context, *GetBlocksRequest) (*GetBlocksResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlocks not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHeight not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockByID(context.Context, *GetBlockByIDRequest) (*GetBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockByID not implemented")
}
func (UnimplementedBlockchainAPIServer) GetNextBlockID(context.Context, *emptypb.Empty) (*GetNextBlockIDResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNextBlockID not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockStats(context.Context, *emptypb.Empty) (*model.BlockStats, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockStats not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockGraphData(context.Context, *GetBlockGraphDataRequest) (*model.BlockDataPoints, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockGraphData not implemented")
}
func (UnimplementedBlockchainAPIServer) GetLastNBlocks(context.Context, *GetLastNBlocksRequest) (*GetLastNBlocksResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLastNBlocks not implemented")
}
func (UnimplementedBlockchainAPIServer) GetLastNInvalidBlocks(context.Context, *GetLastNInvalidBlocksRequest) (*GetLastNInvalidBlocksResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLastNInvalidBlocks not implemented")
}
func (UnimplementedBlockchainAPIServer) GetSuitableBlock(context.Context, *GetSuitableBlockRequest) (*GetSuitableBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSuitableBlock not implemented")
}
func (UnimplementedBlockchainAPIServer) GetHashOfAncestorBlock(context.Context, *GetHashOfAncestorBlockRequest) (*GetHashOfAncestorBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetHashOfAncestorBlock not implemented")
}
func (UnimplementedBlockchainAPIServer) GetLatestBlockHeaderFromBlockLocator(context.Context, *GetLatestBlockHeaderFromBlockLocatorRequest) (*GetBlockHeaderResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLatestBlockHeaderFromBlockLocator not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeadersFromOldest(context.Context, *GetBlockHeadersFromOldestRequest) (*GetBlockHeadersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeadersFromOldest not implemented")
}
func (UnimplementedBlockchainAPIServer) GetNextWorkRequired(context.Context, *GetNextWorkRequiredRequest) (*GetNextWorkRequiredResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNextWorkRequired not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockExists(context.Context, *GetBlockRequest) (*GetBlockExistsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockExists not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeaders(context.Context, *GetBlockHeadersRequest) (*GetBlockHeadersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeaders not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeadersToCommonAncestor(context.Context, *GetBlockHeadersToCommonAncestorRequest) (*GetBlockHeadersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeadersToCommonAncestor not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeadersFromCommonAncestor(context.Context, *GetBlockHeadersFromCommonAncestorRequest) (*GetBlockHeadersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeadersFromCommonAncestor not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeadersFromTill(context.Context, *GetBlockHeadersFromTillRequest) (*GetBlockHeadersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeadersFromTill not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeadersFromHeight(context.Context, *GetBlockHeadersFromHeightRequest) (*GetBlockHeadersFromHeightResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeadersFromHeight not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeadersByHeight(context.Context, *GetBlockHeadersByHeightRequest) (*GetBlockHeadersByHeightResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeadersByHeight not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeaderIDs(context.Context, *GetBlockHeadersRequest) (*GetBlockHeaderIDsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeaderIDs not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBestBlockHeader(context.Context, *emptypb.Empty) (*GetBlockHeaderResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBestBlockHeader not implemented")
}
func (UnimplementedBlockchainAPIServer) CheckBlockIsInCurrentChain(context.Context, *CheckBlockIsCurrentChainRequest) (*CheckBlockIsCurrentChainResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CheckBlockIsInCurrentChain not implemented")
}
func (UnimplementedBlockchainAPIServer) GetChainTips(context.Context, *emptypb.Empty) (*GetChainTipsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetChainTips not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockHeader(context.Context, *GetBlockHeaderRequest) (*GetBlockHeaderResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented")
}
func (UnimplementedBlockchainAPIServer) InvalidateBlock(context.Context, *InvalidateBlockRequest) (*InvalidateBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method InvalidateBlock not implemented")
}
func (UnimplementedBlockchainAPIServer) RevalidateBlock(context.Context, *RevalidateBlockRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RevalidateBlock not implemented")
}
func (UnimplementedBlockchainAPIServer) Subscribe(*SubscribeRequest, grpc.ServerStreamingServer[Notification]) error {
	return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
}
func (UnimplementedBlockchainAPIServer) SendNotification(context.Context, *Notification) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SendNotification not implemented")
}
func (UnimplementedBlockchainAPIServer) GetState(context.Context, *GetStateRequest) (*StateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetState not implemented")
}
func (UnimplementedBlockchainAPIServer) SetState(context.Context, *SetStateRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetState not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockIsMined(context.Context, *GetBlockIsMinedRequest) (*GetBlockIsMinedResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockIsMined not implemented")
}
func (UnimplementedBlockchainAPIServer) SetBlockMinedSet(context.Context, *SetBlockMinedSetRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetBlockMinedSet not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlocksMinedNotSet(context.Context, *emptypb.Empty) (*GetBlocksMinedNotSetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlocksMinedNotSet not implemented")
}
func (UnimplementedBlockchainAPIServer) SetBlockSubtreesSet(context.Context, *SetBlockSubtreesSetRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetBlockSubtreesSet not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlocksSubtreesNotSet(context.Context, *emptypb.Empty) (*GetBlocksSubtreesNotSetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlocksSubtreesNotSet not implemented")
}
func (UnimplementedBlockchainAPIServer) SetBlockProcessedAt(context.Context, *SetBlockProcessedAtRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetBlockProcessedAt not implemented")
}
func (UnimplementedBlockchainAPIServer) SendFSMEvent(context.Context, *SendFSMEventRequest) (*GetFSMStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SendFSMEvent not implemented")
}
func (UnimplementedBlockchainAPIServer) GetFSMCurrentState(context.Context, *emptypb.Empty) (*GetFSMStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetFSMCurrentState not implemented")
}
func (UnimplementedBlockchainAPIServer) WaitFSMToTransitionToGivenState(context.Context, *WaitFSMToTransitionRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method WaitFSMToTransitionToGivenState not implemented")
}
func (UnimplementedBlockchainAPIServer) WaitUntilFSMTransitionFromIdleState(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method WaitUntilFSMTransitionFromIdleState not implemented")
}
func (UnimplementedBlockchainAPIServer) Run(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Run not implemented")
}
func (UnimplementedBlockchainAPIServer) CatchUpBlocks(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CatchUpBlocks not implemented")
}
func (UnimplementedBlockchainAPIServer) LegacySync(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LegacySync not implemented")
}
func (UnimplementedBlockchainAPIServer) Idle(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Idle not implemented")
}
func (UnimplementedBlockchainAPIServer) ReportPeerFailure(context.Context, *ReportPeerFailureRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportPeerFailure not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBlockLocator(context.Context, *GetBlockLocatorRequest) (*GetBlockLocatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBlockLocator not implemented")
}
func (UnimplementedBlockchainAPIServer) LocateBlockHeaders(context.Context, *LocateBlockHeadersRequest) (*LocateBlockHeadersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LocateBlockHeaders not implemented")
}
func (UnimplementedBlockchainAPIServer) GetBestHeightAndTime(context.Context, *emptypb.Empty) (*GetBestHeightAndTimeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBestHeightAndTime not implemented")
}
func (UnimplementedBlockchainAPIServer) mustEmbedUnimplementedBlockchainAPIServer() {}
func (UnimplementedBlockchainAPIServer) testEmbeddedByValue()                       {}

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

func RegisterBlockchainAPIServer(s grpc.ServiceRegistrar, srv BlockchainAPIServer) {
	// If the following call pancis, it indicates UnimplementedBlockchainAPIServer 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(&BlockchainAPI_ServiceDesc, srv)
}

func _BlockchainAPI_HealthGRPC_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.(BlockchainAPIServer).HealthGRPC(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_HealthGRPC_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).HealthGRPC(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_AddBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).AddBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_AddBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).AddBlock(ctx, req.(*AddBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlock(ctx, req.(*GetBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlocksRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlocks(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlocks_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlocks(ctx, req.(*GetBlocksRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockByHeightRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockByHeight(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockByHeight_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockByHeight(ctx, req.(*GetBlockByHeightRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockByIDRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockByID(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockByID_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockByID(ctx, req.(*GetBlockByIDRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetNextBlockID_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.(BlockchainAPIServer).GetNextBlockID(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetNextBlockID_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetNextBlockID(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockStats_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.(BlockchainAPIServer).GetBlockStats(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockStats_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockStats(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockGraphData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockGraphDataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockGraphData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockGraphData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockGraphData(ctx, req.(*GetBlockGraphDataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetLastNBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetLastNBlocksRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetLastNBlocks(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetLastNBlocks_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetLastNBlocks(ctx, req.(*GetLastNBlocksRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetLastNInvalidBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetLastNInvalidBlocksRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetLastNInvalidBlocks(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetLastNInvalidBlocks_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetLastNInvalidBlocks(ctx, req.(*GetLastNInvalidBlocksRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetSuitableBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetSuitableBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetSuitableBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetSuitableBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetSuitableBlock(ctx, req.(*GetSuitableBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetHashOfAncestorBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetHashOfAncestorBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetHashOfAncestorBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetHashOfAncestorBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetHashOfAncestorBlock(ctx, req.(*GetHashOfAncestorBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetLatestBlockHeaderFromBlockLocator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetLatestBlockHeaderFromBlockLocatorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetLatestBlockHeaderFromBlockLocator(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetLatestBlockHeaderFromBlockLocator_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetLatestBlockHeaderFromBlockLocator(ctx, req.(*GetLatestBlockHeaderFromBlockLocatorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeadersFromOldest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersFromOldestRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromOldest(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeadersFromOldest_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromOldest(ctx, req.(*GetBlockHeadersFromOldestRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetNextWorkRequired_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNextWorkRequiredRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetNextWorkRequired(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetNextWorkRequired_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetNextWorkRequired(ctx, req.(*GetNextWorkRequiredRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockExists(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockExists_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockExists(ctx, req.(*GetBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeaders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeaders(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeaders_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeaders(ctx, req.(*GetBlockHeadersRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeadersToCommonAncestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersToCommonAncestorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeadersToCommonAncestor(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeadersToCommonAncestor_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeadersToCommonAncestor(ctx, req.(*GetBlockHeadersToCommonAncestorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeadersFromCommonAncestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersFromCommonAncestorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromCommonAncestor(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeadersFromCommonAncestor_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromCommonAncestor(ctx, req.(*GetBlockHeadersFromCommonAncestorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeadersFromTill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersFromTillRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromTill(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeadersFromTill_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromTill(ctx, req.(*GetBlockHeadersFromTillRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeadersFromHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersFromHeightRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromHeight(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeadersFromHeight_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeadersFromHeight(ctx, req.(*GetBlockHeadersFromHeightRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeadersByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersByHeightRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeadersByHeight(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeadersByHeight_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeadersByHeight(ctx, req.(*GetBlockHeadersByHeightRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeaderIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeadersRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeaderIDs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeaderIDs_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeaderIDs(ctx, req.(*GetBlockHeadersRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBestBlockHeader_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.(BlockchainAPIServer).GetBestBlockHeader(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBestBlockHeader_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBestBlockHeader(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_CheckBlockIsInCurrentChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CheckBlockIsCurrentChainRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).CheckBlockIsInCurrentChain(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_CheckBlockIsInCurrentChain_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).CheckBlockIsInCurrentChain(ctx, req.(*CheckBlockIsCurrentChainRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetChainTips_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.(BlockchainAPIServer).GetChainTips(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetChainTips_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetChainTips(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockHeaderRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockHeader(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockHeader_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockHeader(ctx, req.(*GetBlockHeaderRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_InvalidateBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InvalidateBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).InvalidateBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_InvalidateBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).InvalidateBlock(ctx, req.(*InvalidateBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_RevalidateBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RevalidateBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).RevalidateBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_RevalidateBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).RevalidateBlock(ctx, req.(*RevalidateBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubscribeRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(BlockchainAPIServer).Subscribe(m, &grpc.GenericServerStream[SubscribeRequest, Notification]{ServerStream: stream})
}

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

func _BlockchainAPI_SendNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Notification)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).SendNotification(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_SendNotification_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).SendNotification(ctx, req.(*Notification))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetState_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetState(ctx, req.(*GetStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_SetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).SetState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_SetState_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).SetState(ctx, req.(*SetStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockIsMined_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockIsMinedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockIsMined(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockIsMined_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockIsMined(ctx, req.(*GetBlockIsMinedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_SetBlockMinedSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetBlockMinedSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).SetBlockMinedSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_SetBlockMinedSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).SetBlockMinedSet(ctx, req.(*SetBlockMinedSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlocksMinedNotSet_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.(BlockchainAPIServer).GetBlocksMinedNotSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlocksMinedNotSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlocksMinedNotSet(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_SetBlockSubtreesSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetBlockSubtreesSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).SetBlockSubtreesSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_SetBlockSubtreesSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).SetBlockSubtreesSet(ctx, req.(*SetBlockSubtreesSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlocksSubtreesNotSet_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.(BlockchainAPIServer).GetBlocksSubtreesNotSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlocksSubtreesNotSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlocksSubtreesNotSet(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_SetBlockProcessedAt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetBlockProcessedAtRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).SetBlockProcessedAt(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_SetBlockProcessedAt_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).SetBlockProcessedAt(ctx, req.(*SetBlockProcessedAtRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_SendFSMEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SendFSMEventRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).SendFSMEvent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_SendFSMEvent_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).SendFSMEvent(ctx, req.(*SendFSMEventRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetFSMCurrentState_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.(BlockchainAPIServer).GetFSMCurrentState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetFSMCurrentState_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetFSMCurrentState(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_WaitFSMToTransitionToGivenState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(WaitFSMToTransitionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).WaitFSMToTransitionToGivenState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_WaitFSMToTransitionToGivenState_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).WaitFSMToTransitionToGivenState(ctx, req.(*WaitFSMToTransitionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_WaitUntilFSMTransitionFromIdleState_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.(BlockchainAPIServer).WaitUntilFSMTransitionFromIdleState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_WaitUntilFSMTransitionFromIdleState_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).WaitUntilFSMTransitionFromIdleState(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_Run_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.(BlockchainAPIServer).Run(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_Run_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).Run(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_CatchUpBlocks_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.(BlockchainAPIServer).CatchUpBlocks(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_CatchUpBlocks_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).CatchUpBlocks(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_LegacySync_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.(BlockchainAPIServer).LegacySync(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_LegacySync_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).LegacySync(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_Idle_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.(BlockchainAPIServer).Idle(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_Idle_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).Idle(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_ReportPeerFailure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportPeerFailureRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).ReportPeerFailure(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_ReportPeerFailure_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).ReportPeerFailure(ctx, req.(*ReportPeerFailureRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBlockLocator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBlockLocatorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).GetBlockLocator(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBlockLocator_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBlockLocator(ctx, req.(*GetBlockLocatorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_LocateBlockHeaders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LocateBlockHeadersRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockchainAPIServer).LocateBlockHeaders(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_LocateBlockHeaders_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).LocateBlockHeaders(ctx, req.(*LocateBlockHeadersRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockchainAPI_GetBestHeightAndTime_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.(BlockchainAPIServer).GetBestHeightAndTime(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockchainAPI_GetBestHeightAndTime_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockchainAPIServer).GetBestHeightAndTime(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// BlockchainAPI_ServiceDesc is the grpc.ServiceDesc for BlockchainAPI service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BlockchainAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blockchain_api.BlockchainAPI",
	HandlerType: (*BlockchainAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthGRPC",
			Handler:    _BlockchainAPI_HealthGRPC_Handler,
		},
		{
			MethodName: "AddBlock",
			Handler:    _BlockchainAPI_AddBlock_Handler,
		},
		{
			MethodName: "GetBlock",
			Handler:    _BlockchainAPI_GetBlock_Handler,
		},
		{
			MethodName: "GetBlocks",
			Handler:    _BlockchainAPI_GetBlocks_Handler,
		},
		{
			MethodName: "GetBlockByHeight",
			Handler:    _BlockchainAPI_GetBlockByHeight_Handler,
		},
		{
			MethodName: "GetBlockByID",
			Handler:    _BlockchainAPI_GetBlockByID_Handler,
		},
		{
			MethodName: "GetNextBlockID",
			Handler:    _BlockchainAPI_GetNextBlockID_Handler,
		},
		{
			MethodName: "GetBlockStats",
			Handler:    _BlockchainAPI_GetBlockStats_Handler,
		},
		{
			MethodName: "GetBlockGraphData",
			Handler:    _BlockchainAPI_GetBlockGraphData_Handler,
		},
		{
			MethodName: "GetLastNBlocks",
			Handler:    _BlockchainAPI_GetLastNBlocks_Handler,
		},
		{
			MethodName: "GetLastNInvalidBlocks",
			Handler:    _BlockchainAPI_GetLastNInvalidBlocks_Handler,
		},
		{
			MethodName: "GetSuitableBlock",
			Handler:    _BlockchainAPI_GetSuitableBlock_Handler,
		},
		{
			MethodName: "GetHashOfAncestorBlock",
			Handler:    _BlockchainAPI_GetHashOfAncestorBlock_Handler,
		},
		{
			MethodName: "GetLatestBlockHeaderFromBlockLocator",
			Handler:    _BlockchainAPI_GetLatestBlockHeaderFromBlockLocator_Handler,
		},
		{
			MethodName: "GetBlockHeadersFromOldest",
			Handler:    _BlockchainAPI_GetBlockHeadersFromOldest_Handler,
		},
		{
			MethodName: "GetNextWorkRequired",
			Handler:    _BlockchainAPI_GetNextWorkRequired_Handler,
		},
		{
			MethodName: "GetBlockExists",
			Handler:    _BlockchainAPI_GetBlockExists_Handler,
		},
		{
			MethodName: "GetBlockHeaders",
			Handler:    _BlockchainAPI_GetBlockHeaders_Handler,
		},
		{
			MethodName: "GetBlockHeadersToCommonAncestor",
			Handler:    _BlockchainAPI_GetBlockHeadersToCommonAncestor_Handler,
		},
		{
			MethodName: "GetBlockHeadersFromCommonAncestor",
			Handler:    _BlockchainAPI_GetBlockHeadersFromCommonAncestor_Handler,
		},
		{
			MethodName: "GetBlockHeadersFromTill",
			Handler:    _BlockchainAPI_GetBlockHeadersFromTill_Handler,
		},
		{
			MethodName: "GetBlockHeadersFromHeight",
			Handler:    _BlockchainAPI_GetBlockHeadersFromHeight_Handler,
		},
		{
			MethodName: "GetBlockHeadersByHeight",
			Handler:    _BlockchainAPI_GetBlockHeadersByHeight_Handler,
		},
		{
			MethodName: "GetBlockHeaderIDs",
			Handler:    _BlockchainAPI_GetBlockHeaderIDs_Handler,
		},
		{
			MethodName: "GetBestBlockHeader",
			Handler:    _BlockchainAPI_GetBestBlockHeader_Handler,
		},
		{
			MethodName: "CheckBlockIsInCurrentChain",
			Handler:    _BlockchainAPI_CheckBlockIsInCurrentChain_Handler,
		},
		{
			MethodName: "GetChainTips",
			Handler:    _BlockchainAPI_GetChainTips_Handler,
		},
		{
			MethodName: "GetBlockHeader",
			Handler:    _BlockchainAPI_GetBlockHeader_Handler,
		},
		{
			MethodName: "InvalidateBlock",
			Handler:    _BlockchainAPI_InvalidateBlock_Handler,
		},
		{
			MethodName: "RevalidateBlock",
			Handler:    _BlockchainAPI_RevalidateBlock_Handler,
		},
		{
			MethodName: "SendNotification",
			Handler:    _BlockchainAPI_SendNotification_Handler,
		},
		{
			MethodName: "GetState",
			Handler:    _BlockchainAPI_GetState_Handler,
		},
		{
			MethodName: "SetState",
			Handler:    _BlockchainAPI_SetState_Handler,
		},
		{
			MethodName: "GetBlockIsMined",
			Handler:    _BlockchainAPI_GetBlockIsMined_Handler,
		},
		{
			MethodName: "SetBlockMinedSet",
			Handler:    _BlockchainAPI_SetBlockMinedSet_Handler,
		},
		{
			MethodName: "GetBlocksMinedNotSet",
			Handler:    _BlockchainAPI_GetBlocksMinedNotSet_Handler,
		},
		{
			MethodName: "SetBlockSubtreesSet",
			Handler:    _BlockchainAPI_SetBlockSubtreesSet_Handler,
		},
		{
			MethodName: "GetBlocksSubtreesNotSet",
			Handler:    _BlockchainAPI_GetBlocksSubtreesNotSet_Handler,
		},
		{
			MethodName: "SetBlockProcessedAt",
			Handler:    _BlockchainAPI_SetBlockProcessedAt_Handler,
		},
		{
			MethodName: "SendFSMEvent",
			Handler:    _BlockchainAPI_SendFSMEvent_Handler,
		},
		{
			MethodName: "GetFSMCurrentState",
			Handler:    _BlockchainAPI_GetFSMCurrentState_Handler,
		},
		{
			MethodName: "WaitFSMToTransitionToGivenState",
			Handler:    _BlockchainAPI_WaitFSMToTransitionToGivenState_Handler,
		},
		{
			MethodName: "WaitUntilFSMTransitionFromIdleState",
			Handler:    _BlockchainAPI_WaitUntilFSMTransitionFromIdleState_Handler,
		},
		{
			MethodName: "Run",
			Handler:    _BlockchainAPI_Run_Handler,
		},
		{
			MethodName: "CatchUpBlocks",
			Handler:    _BlockchainAPI_CatchUpBlocks_Handler,
		},
		{
			MethodName: "LegacySync",
			Handler:    _BlockchainAPI_LegacySync_Handler,
		},
		{
			MethodName: "Idle",
			Handler:    _BlockchainAPI_Idle_Handler,
		},
		{
			MethodName: "ReportPeerFailure",
			Handler:    _BlockchainAPI_ReportPeerFailure_Handler,
		},
		{
			MethodName: "GetBlockLocator",
			Handler:    _BlockchainAPI_GetBlockLocator_Handler,
		},
		{
			MethodName: "LocateBlockHeaders",
			Handler:    _BlockchainAPI_LocateBlockHeaders_Handler,
		},
		{
			MethodName: "GetBestHeightAndTime",
			Handler:    _BlockchainAPI_GetBestHeightAndTime_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _BlockchainAPI_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "services/blockchain/blockchain_api/blockchain_api.proto",
}
