diff --git a/lib/node.js b/lib/node.js index 5728a3d..34f36ab 100644 --- a/lib/node.js +++ b/lib/node.js @@ -146,6 +146,17 @@ class NodeClient extends Client { return this.get(`/block/${block}`); } + /** + * Retrieve a block header. + * @param {Hash|Number} block + * @returns {Promise} + */ + + getBlockHeader(block) { + assert(typeof block === 'string' || typeof block === 'number'); + return this.get(`/header/${block}`); + } + /** * Add a transaction to the mempool and broadcast it. * @param {TX} tx