33 lines
584 B
Markdown
33 lines
584 B
Markdown
|
|
|
|
# Functions
|
|
|
|
<a id="bestnumber"></a>
|
|
|
|
## bestNumber
|
|
|
|
▸ **bestNumber**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
|
|
|
*Defined in [chain/bestNumber.ts:23](https://github.com/polkadot-js/api/blob/b846152/packages/api-derive/src/chain/bestNumber.ts#L23)*
|
|
|
|
*__description__*: Get the latest block number.
|
|
|
|
*__example__*:
|
|
|
|
```javascript
|
|
api.derive.chain.bestNumber((blockNumber) => {
|
|
console.log(`the current best block is #${blockNumber}`);
|
|
});
|
|
```
|
|
|
|
**Parameters:**
|
|
|
|
| Name | Type |
|
|
| ------ | ------ |
|
|
| api | `ApiInterface$Rx` |
|
|
|
|
**Returns:** `(Anonymous function)`
|
|
|
|
___
|
|
|