bitcoin-cli-ts
Version:
Auto-generated Bitcoin client library for bitcoind JSON-RPC API
24 lines (23 loc) • 1.25 kB
JavaScript
;
// Auto synced from github actions. Don't change this file
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBlockTemplate = void 0;
var tslib_1 = require("tslib");
var rpc_request_1 = tslib_1.__importDefault(require("../../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
*
*/
function getBlockTemplate(params) {
var bitcoind = params.bitcoind, methodParams = tslib_1.__rest(params, ["bitcoind"]);
return (0, rpc_request_1.default)({ method: 'getblocktemplate', params: methodParams }, bitcoind);
}
exports.getBlockTemplate = getBlockTemplate;