mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-11-03 15:01:06 +00:00
Rebrand: polkadot → pezkuwi, substrate → bizinikiwi, kusama → dicle
This commit is contained in:
commit
d5f038faea
1383 files changed
+1088018
No files matched your search
@@ -0,0 +1,22 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveApi } from '../types.js';
|
||||
|
||||
import { createBlockNumberDerive } from './util.js';
|
||||
|
||||
/**
|
||||
* @name bestNumberFinalized
|
||||
* @returns A BlockNumber
|
||||
* @description Get the latest finalized block number.
|
||||
* @example
|
||||
* ```javascript
|
||||
* api.derive.chain.bestNumberFinalized((blockNumber) => {
|
||||
* console.log(`the current finalized block is #${blockNumber}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export const bestNumberFinalized = /*#__PURE__*/ createBlockNumberDerive(
|
||||
(api: DeriveApi) =>
|
||||
api.rpc.chain.subscribeFinalizedHeads()
|
||||
);
|
||||
Reference in new issue
Block a user