UNPKG

@vafanassieff/bitcoin-cli-ts

Version:

Auto-generated Bitcoin client library for bitcoind JSON-RPC API

25 lines (21 loc) 759 B
// Auto synced from github actions. Don't change this file import { Bitcoind } from '../../types.js' import request from '../../rpc-request.js' type GetBlockHeaderParams = { bitcoind: Bitcoind /* The block hash */ blockhash: string /* true for a json object, false for the hex-encoded data */ verbose?: boolean } /** * getblockheader "blockhash" ( verbose ) * * If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'. * If verbose is true, returns an Object with information about blockheader 'hash'. * */ export function getBlockHeader(params: GetBlockHeaderParams) { const { bitcoind, ...methodParams } = params return request({ method: 'getblockheader', params: methodParams }, bitcoind) }