UNPKG

@vafanassieff/bitcoin-cli-ts

Version:

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

19 lines 1.03 kB
// Auto synced from github actions. Don't change this file import request from '../../rpc-request.js'; /** * getblocktemplate {"mode":"str","capabilities":["str",...],"rules":["segwit","str",...],"longpollid":"str","data":"hex"} * * If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'. * It returns data needed to construct a block to work on. * For full specification, see BIPs 22, 23, 9, and 145: * https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki * https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki * https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes * https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki * */ export function getBlockTemplate(params) { const { bitcoind, ...methodParams } = params; return request({ method: 'getblocktemplate', params: methodParams }, bitcoind); } //# sourceMappingURL=get-block-template.js.map