bitcoin-cli-ts
Version:
Auto-generated Bitcoin client library for bitcoind JSON-RPC API
20 lines (19 loc) • 1.04 kB
JavaScript
// Auto synced from github actions. Don't change this file
import { __rest } from "tslib";
import request from '../../rpc-request';
/**
* 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) {
var bitcoind = params.bitcoind, methodParams = __rest(params, ["bitcoind"]);
return request({ method: 'getblocktemplate', params: methodParams }, bitcoind);
}