@vafanassieff/bitcoin-cli-ts
Version:
Auto-generated Bitcoin client library for bitcoind JSON-RPC API
20 lines (16 loc) • 517 B
text/typescript
// Auto synced from github actions. Don't change this file
import { Bitcoind } from '../../types.js'
import request from '../../rpc-request.js'
type GetBestBlockHashParams = {
bitcoind: Bitcoind
}
/**
* getbestblockhash
*
* Returns the hash of the best (tip) block in the most-work fully-validated chain.
*
*/
export function getBestBlockHash(params: GetBestBlockHashParams) {
const { bitcoind, ...methodParams } = params
return request({ method: 'getbestblockhash', params: methodParams }, bitcoind)
}