import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { BlockNumber } from '@polkadot/types/interfaces';
import type { Observable } from '@polkadot/x-rxjs';
/**
* @name bestNumberLag
* @returns A number of blocks
* @description Calculates the lag between finalized head and best head
* @example
*
*
* ```javascript
* api.derive.chain.bestNumberLag((lag) => {
* console.log(`finalized is ${lag} blocks behind head`);
* });
* ```
*/
export declare function bestNumberLag(instanceId: string, api: ApiInterfaceRx): () => Observable;