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