UNPKG

bitcoin-cli-ts

Version:

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

21 lines (20 loc) 1.06 kB
"use strict"; // Auto synced from github actions. Don't change this file Object.defineProperty(exports, "__esModule", { value: true }); exports.getBlock = void 0; var tslib_1 = require("tslib"); var rpc_request_1 = tslib_1.__importDefault(require("../../rpc-request")); /** * getblock "blockhash" ( verbosity ) * * If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'. * If verbosity is 1, returns an Object with information about block 'hash'. * If verbosity is 2, returns an Object with information about block <hash> and information about each transaction. * If verbosity is 3, returns an Object with information about block <hash> and information about each transaction, including prevout information for inputs (only for unpruned blocks in the current best chain). * */ function getBlock(params) { var bitcoind = params.bitcoind, methodParams = tslib_1.__rest(params, ["bitcoind"]); return (0, rpc_request_1.default)({ method: 'getblock', params: methodParams }, bitcoind); } exports.getBlock = getBlock;