UNPKG

bitcoin-cli-ts

Version:

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

25 lines (24 loc) 1.33 kB
"use strict"; // Auto synced from github actions. Don't change this file Object.defineProperty(exports, "__esModule", { value: true }); exports.getRawTransaction = void 0; var tslib_1 = require("tslib"); var rpc_request_1 = tslib_1.__importDefault(require("../../rpc-request")); /** * getrawtransaction "txid" ( verbosity "blockhash" ) * * By default, this call only returns a transaction if it is in the mempool. If -txindex is enabled * and no blockhash argument is passed, it will return the transaction if it is in the mempool or any block. * If a blockhash argument is passed, it will return the transaction if * the specified block is available and the transaction is in that block. * Hint: Use gettransaction for wallet transactions. * If verbosity is 0 or omitted, returns the serialized transaction as a hex-encoded string. * If verbosity is 1, returns a JSON Object with information about the transaction. * If verbosity is 2, returns a JSON Object with information about the transaction, including fee and prevout information. * */ function getRawTransaction(params) { var bitcoind = params.bitcoind, methodParams = tslib_1.__rest(params, ["bitcoind"]); return (0, rpc_request_1.default)({ method: 'getrawtransaction', params: methodParams }, bitcoind); } exports.getRawTransaction = getRawTransaction;